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. modulo
%d
%
=
a%b
2. Argument variable
%r
argv
<
=
3. The extension for Python scripts
.py
=
^
/
4. Prints a string to the screen which is converted using repr()
%r
def
*
abs(a)
5. This keyword begins the simplest form of a conditional statement.
if
in
len()
>=
6. exponent AND assignment operator
print
*write(stuff)
argument variable
**=
7. A built-in function that converts integers and strings to floating-point numbers.
str()
float
file.truncate()
-=
8. Less than symbol
&
&
<
<<
9. floor division
str()
readline
a//b
def
10. Function to open or read a file
open()
close
-=
#
11. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
^
%s
try
format string
12. floor division AND assignment operator
<=
int
*
//=
13. Prevents a runtime error from stopping the program.
*
a**b
except
-=
14. Create a variable.
readline
=
for
truncate
15. A data type for representing numbers with fractional values.
argv
floating point number
<
16. This keyword begins a header for a body that repeats until the condition is no longer true.
while
**=
in
=
17. This variable holds the arguments you pass to your Python script when you run it. Then you unpack it in your script so you have variables you can work with.
int()
argument variable
~
<
18. This statement exits a function. The remaining lines of the function are not executed.
return
print()
for
argv
19. inserts an item inside a list at a certain index
insert()
%r
#
a%b
20. The keyword beginning a header that will create a loop.
for
.py
in
float
21. A keyword that does nothing but fill space to indicate code which will be written later.
<
pass
<=
a**b
22. Modulus operator. It's the remainder after division
argv
a**b
*truncate
%
23. Binary XOR Operator copies the bit if it is set in one operand but not both. (a ^ b) will give 49 which is 0011 0001
%r
^
is
else
24. prints its parameter to the console
>=
-
print()
else
25. Command to print to the screen
#
>>
print
round()
26. sets the file's current position
file.seek()
-
*readline
27. This statement causes an exception.
truncate
raise
a//b
for
28. Function to write something to a file
file.write(stuff)
del
else
write
29. modulus AND assignment operator
%=
read
str()
<<
30. add AND assignment operator
print
#
print
+=
31. Symbol to add things together
def
^
+
int()
32. multiply AND assignment operator
+
assignment
read
*=
33. assignment operator
+
=
-=
|
34. Prints a string to the screen which will be Unicode.
>>
print
%s
<<
35. Create a variable.
=
a%b
Variables
str()
36. assignment operator
round()
=
#
print()
37. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
append()
round()
#
Variables
38. modulus AND assignment operator
%=
/=
+
%
39. turns an object into an integer
file.seek()
int()
n
^
40. Binary XOR Operator copies the bit if it is set in one operand but not both. (a ^ b) will give 49 which is 0011 0001
str()
assignment
insert()
^
41. Symbol used to create comments
close
print()
#
class
42. prints its parameter to the console
#
=
print()
n
43. adds an item to a list
and
append()
float
<
44. Function to read the contents of a file
read
except
^
#
45. Function to open or read a file
>
open()
return
insert()
46. Command to print to the screen
*=
%s
print
%=
47. exponentiation
a**b
in
open()
<
48. floor division
a%b
a//b
^
raise
49. Turns a line into a comment instead of executable code.
=
input()
#
-
50. This keyword in the body of a conditional - gives an alternative execution.
a//b
class
else
*=