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. divide AND assignment operator
assignment
/=
str
=
2. Argument variable
print()
%
%r
argv
3. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
&
#
int
/=
4. Function to empty the contents of a file - no recovery is possible
input()
truncate
**=
print()
5. Greater than symbol
.py
>=
>
6. turns an object into a string
append()
argv
str()
a**b
7. assignment operator
=
write
del
is
8. modulus AND assignment operator
write
%=
a//b
*truncate
9. Symbol to add things together
str()
<<
+
else
10. Command to print to the screen
for
print
#
close
11. Create a variable.
=
a%b
==
else
12. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
**=
|
>
+=
13. 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.
**=
in
len()
*
14. A logical operator which requires two expressions to both be true.
print()
and
<<
in
15. A keyword that does nothing but fill space to indicate code which will be written later.
pass
and
for
/=
16. Symbol to multiply things
*
-
write
%
17. Symbol used to create comments
*truncate
-=
#
int
18. Less than or equal to symbol
=
&
+
<=
19. adds an item to a list
*write(stuff)
not
append()
==
20. reads just one line of a text file & keeps track of where in the file you're at
file.readline()
//=
n
*=
21. This statement causes an exception.
print
raise
file.write(stuff)
:
22. Function to empty the contents of a file - no recovery is possible
str()
truncate
return
a//b
23. Function to write something to a file
<
file.readline()
~
write
24. Empties the file - watch out if you care about the file.
**=
-=
*truncate
print()
25. End header line.
while
:
%
=
26. A statement that assigns a value to a variable.
print
assignment
>=
round()
27. deletes an item from a list
|
.py
str
del
28. Symbol to multiply things
*
elif (Else if)
in
except
29. This statement exits a function. The remaining lines of the function are not executed.
return
is
not
//=
30. floor division
a//b
Variables
>
<=
31. exponent AND assignment operator
try
**=
file.truncate()
*truncate
32. Where the parameters go. A necessary punctuation after any function even if it's empty.
=
()
del
%d
33. Adds a new line character
n
()
%=
not
34. single line comment
#
argv
class
in
35. turns an object into an integer
except
argument variable
int()
a%b
36. sets the file's current position
()
file.seek()
<<
del
37. absolute value
def
abs(a)
%
|
38. inserts an item inside a list at a certain index
#
file.truncate()
continue
insert()
39. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
/
<<
~
del
40. exponentiation
len()
write
a**b
file.seek()
41. Create a variable.
assignment
:
%s
=
42. Where the parameters go. A necessary punctuation after any function even if it's empty.
|
float
%s
()
43. add AND assignment operator
<=
+=
and
<
44. subtract AND assignment operator
insert()
-=
del
input()
45. modulo
a%b
int()
/=
%
46. This keyword begins the simplest form of a conditional statement.
elif (Else if)
or
if
math.sqrt(a)
47. adds an item to a list
/=
*
append()
input()
48. Reads the contents of the file you can assign the result to a variable.
==
/
*read
+=
49. Function to open or read a file
/=
is not
open()
&
50. add AND assignment operator
~
%s
+=
break