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. A keyword that does nothing but fill space to indicate code which will be written later.
continue
for
pass
append()
2. The extension for Python scripts
%=
math.sqrt(a)
()
.py
3. modulus AND assignment operator
int()
print
%=
append()
4. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
pass
close
str()
in
5. The keyword beginning a header that will create a new function.
def
~
^
*=
6. A statement that displays a value on the screen.
*
print
^
#
7. Where the parameters go. A necessary punctuation after any function even if it's empty.
%
()
<
open()
8. This keyword in the body of a conditional - gives an alternative execution.
~
else
print()
int
9. Function to empty the contents of a file - no recovery is possible
write
()
write
truncate
10. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
close
and
readline
11. Modulus operator. It's the remainder after division
format string
<<
str
%
12. Symbol to multiply things
file.write(stuff)
*truncate
*
Variables
13. turns an object into a string
#
*read
floating point number
str()
14. Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand. a << 2 will give 240 which is 1111 0000
<<
write
n
float
15. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
%s
&
-=
argv
16. Reads the contents of the file you can assign the result to a variable.
file.truncate()
def
*read
%=
17. This statement causes an exception.
floating point number
Variables
raise
not in
18. Symbol to add things together
file.seek()
+
and
Variables
19. Function to close a file - it will not be able to be used again unless the file is opened.
close
argument variable
int()
#
20. Less than symbol
print()
del
<
-=
21. An operator to check whether two variables refer to the same object.
~
is
format string
:
22. Prints a string to the screen which is converted using repr()
*write(stuff)
file.write(stuff)
%r
input()
23. Command to print to the screen
-=
:
round()
print
24. floor division AND assignment operator
>>
*truncate
//=
*=
25. Symbol to add things together
<
+
open()
round()
26. Adds something to a variable
is not
^
*=
=
27. assignment operator
int()
=
assignment
#
28. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
int
<=
%=
is not
29. modulo
break
a%b
format string
file.write(stuff)
30. A logical operator which requires two expressions to both be true.
and
if
%
open()
31. Greater than or equal symbol.
|
>=
=
=
32. Prints a string to the screen which will be Unicode.
read
readline
%s
*write(stuff)
33. floor division
>
and
a//b
open()
34. Less than symbol
>=
:
%
<
35. Symbol to multiply things
raise
*
-
:
36. Adds a new line character
n
input()
math.sqrt(a)
()
37. Create a variable.
=
input()
input()
:
38. An operator that removes a value from a list.
a//b
&
insert()
del
39. Symbol to subtract things from each other
read
&
in
-
40. The keyword beginning a header that will create a loop.
for
==
.py
pass
41. Less than or equal to symbol
<=
*write(stuff)
while
:
42. multiply AND assignment operator
*=
=
and
#
43. sets the file's current position
%s
insert()
*readline
file.seek()
44. Greater than or equal symbol.
#
>=
argv
str
45. absolute value
read
abs(a)
if
+
46. divide AND assignment operator
/=
//=
>
try
47. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
print
int
%s
48. A built-in function that converts its argument to a string.
>
/
str
del
49. asks the user for a response and returns that response
argv
/=
input()
%s
50. adds an item to a list
append()
a**b
^
def