SUBJECTS

BROWSE

CAREER CENTER

POPULAR

JOIN

LOGIN
Business Skills

Soft Skills

Basic Literacy

Certifications
About

Help

Privacy

Terms
Search
Test your basic knowledge 
Basic Python Programming
Start Test
Study First
Subject
:
itskills
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 reenforces your understanding as you take the test each time.
1. multiply AND assignment operator
^
int()
len()
*=
2. asks the user for a response and returns that response
<<
>
input()
and
3. A builtin function that converts integers and strings to floatingpoint numbers.
abs(a)
float
()
.py
4. Symbol to multiply things
del
*
//=
>
5. returns the length of a string (number of characters)
len()
&
write
del
6. Command to print to the screen
print
<=
*write(stuff)
//=
7. Prints a string to the screen which is a signed decimal.
for
~
%d
if
8. modulo
#
*read
a%b
<=
9. exponent AND assignment operator
while
**=
open()
print
10. floor division AND assignment operator
%=
()
//=
in
11. 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
%=
close
%d
^
12. add AND assignment operator
a//b
del
+=
else
13. absolute value
print
abs(a)
len()
>=
14. The keyword beginning a header that will create a new function.
format string
return
for
def
15. Function to read the contents of a file
int()
or
read
is not
16. turns an object into an integer
class
int()
math.sqrt(a)
:
17. turns an object into an integer
.py
>>
is not
int()
18. Prints a string to the screen which is converted using repr()
>>
%r
in
^
19. This statement exits a function. The remaining lines of the function are not executed.
file.truncate()

return
not in
20. Function to open or read a file
open()
*
*truncate
>>
21. Where the parameters go. A necessary punctuation after any function even if it's empty.
raise
write
return
()
22. Empties the file  watch out if you care about the file.
append()
%r
*truncate
or
23. Symbol to divide by the number to the right of the symbol
=
/
not
input()
24. Function to empty the contents of a file  no recovery is possible
readline
~
truncate
else
25. floor division
a//b
not
abs(a)
26. Modulus operator. It's the remainder after division
:
%
if
not in
27. Symbol to add things together
<<
try
*read
+
28. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
*=
+
readline
29. writes stuff to the file
argv
file.write(stuff)
~
math.sqrt(a)
30. 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.
^
argument variable
=
read
31. Prints a string to the screen which is a signed decimal.
:
%d
or
*
32. square root
%=
math.sqrt(a)
if
str()
33. rounds a number to the number of decimal points you choose
round()
for
open()
/
34. A builtin function that takes any value and converts it to an integer if possible  or complains otherwise.
else
int
truncate
35. Adds something to a variable
a%b
int
=
read
36. A logical operator which requires two expressions to both be true.

and
=
/=
37. Prevents a runtime error from stopping the program.
>
str()
str
except
38. The keyword beginning a header that will create a new function.
raise
==
round()
def
39. turns an object into a string
+=
try
str()
open()
40. empties the file
not in
a//b
*=
file.truncate()
41. A statement that ends the current iteration of a loop but continues looping.
#
=
continue
append()
42. Symbol to add things together
print
.py
+
truncate
43. Holds the value of something  e.g. oh_hi = 4 where oh_hi is the variable.
=
int()
or
Variables
44. Symbol used to create comments
/=
return
#
>>
45. A data type for representing numbers with fractional values.
floating point number
%s
is
is not
46. Less than or equal to symbol
int()
=
<=
is not
47. exponentiation
a**b
str()
insert()
48. The extension for Python scripts
.py
=
append()

49. exponentiation
input()
a**b
and
insert()
50. 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
>>
str
argument variable
^