SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
Basic Python Programming
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. Prints a string to the screen which will be Unicode.
a**b
%
%s
readline
2. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
str()
class
%=
truncate
3. Prints a string to the screen which is converted using repr()
write
write
%r
#
4. Function to empty the contents of a file - no recovery is possible
argv
truncate
write
if
5. Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand. a >> 2 will give 15 which is 0000 1111
assignment
()
>>
%s
6. Prints a string to the screen which is a signed decimal.
input()
del
#
%d
7. Function to empty the contents of a file - no recovery is possible
==
truncate
%=
except
8. This keyword begins the simplest form of a conditional statement.
.py
if
^
*=
9. turns an object into a string
/
-=
str()
a%b
10. A keyword that does nothing but fill space to indicate code which will be written later.
input()
str()
()
pass
11. modulus AND assignment operator
file.seek()
%=
>
write
12. divide AND assignment operator
~
/=
read
truncate
13. A built-in function that converts integers and strings to floating-point numbers.
class
=
float
a**b
14. Less than symbol
abs(a)
//=
and
<
15. This statement causes an exception.
=
raise
n
>=
16. Function to open or read a file
int()
class
str()
open()
17. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
==
:
a**b
&
18. empties the file
and
file.truncate()
a%b
#
19. Prints a string to the screen which is a signed decimal.
~
readline
%d
break
20. multiply AND assignment operator
=
not
+=
*=
21. This keyword in the body of a conditional - gives an alternative execution.
^
%=
else
argv
22. This statement exits a function. The remaining lines of the function are not executed.
return
Variables
+
del
23. Greater than symbol
pass
>
except
append()
24. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
len()
~
math.sqrt(a)
file.truncate()
25. turns an object into an integer
a**b
|
insert()
int()
26. Function to read the contents of a file
>=
*=
read
=
27. exponent AND assignment operator
**=
raise
>>
and
28. Symbol to add things together
^
+
and
insert()
29. turns an object into a string
str()
/=
in
in
30. exponent AND assignment operator
/=
**=
=
insert()
31. A built-in function that converts its argument to a string.
//=
if
int()
str
32. square root
and
math.sqrt(a)
a**b
33. Adds something to a variable
:
=
elif (Else if)
def
34. modulus AND assignment operator
write
%=
+=
append()
35. assignment operator
#
=
input()
file.truncate()
36. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
==
a**b
%=
37. Turns a line into a comment instead of executable code.
#
%=
/
is
38. inserts an item inside a list at a certain index
*=
write
not
insert()
39. Symbol to multiply things
%=
del
*
def
40. Greater than symbol
>
close
file.truncate()
truncate
41. adds an item to a list
=
append()
round()
+
42. Argument variable
is not
while
file.seek()
argv
43. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
append()
*truncate
%=
&
44. Symbol to subtract things from each other
-
==
readline
Variables
45. Symbol used to create comments
()
not in
#
int()
46. End header line.
:
def
for
n
47. Evaluates to true if it finds a variable in the specified sequence and false otherwise. x in y - here in results in a 1 if x is a member of sequence y.
()
is
in
-=
48. reads just one line of a text file & keeps track of where in the file you're at
&
open()
break
file.readline()
49. add AND assignment operator
+=
^
**=
del
50. A statement that assigns a value to a variable.
assignment
#
:
>