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. Symbol used to create comments
Variables
round()
#
*readline
2. 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
+
print()
>>
read
3. Prevents a runtime error from stopping the program.
except
for
.py
try
4. Function to write something to a file
else
<<
write
math.sqrt(a)
5. Symbol to subtract things from each other
-
>=
#
else
6. modulus AND assignment operator
write
-
%=
not in
7. An operator that removes a value from a list.
|
a//b
len()
del
8. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
class
Variables
|
del
9. Prints a string to the screen which is a signed decimal.
+
print()
elif (Else if)
%d
10. A logical operator which requires two expressions to both be true.
and
<<
+=
^
11. deletes an item from a list
del
n
append()
for
12. floor division AND assignment operator
open()
math.sqrt(a)
|
//=
13. turns an object into an integer
a//b
int()
%r
%=
14. A statement that ends the current iteration of a loop but continues looping.
a//b
=
readline
continue
15. add AND assignment operator
~
del
+=
=
16. A statement that assigns a value to a variable.
assignment
+
argument variable
%r
17. Prints a string to the screen which will be Unicode.
*read
str()
>>
%s
18. turns an object into a string
str()
open()
|
19. Adds a new line character
math.sqrt(a)
()
n
raise
20. Adds something to a variable
~
=
+=
try
21. absolute value
print()
*=
abs(a)
.py
22. A data type for representing numbers with fractional values.
floating point number
/
len()
%s
23. The keyword beginning a header that will create a loop.
for
readline
=
file.write(stuff)
24. Modulus operator. It's the remainder after division
-
%
append()
<<
25. A statement that displays a value on the screen.
except
is not
print
26. End header line.
+
*truncate
<=
:
27. The keyword beginning a header that will create a new function.
*=
insert()
-=
def
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
insert()
&
break
if
29. Modulus operator. It's the remainder after division
%
break
*truncate
del
30. This keyword in the body of a conditional - gives an alternative execution.
else
for
*
=
31. divide AND assignment operator
%s
~
/=
<
32. 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
floating point number
math.sqrt(a)
^
<<
33. Less than or equal to symbol
not
%s
<=
elif (Else if)
34. Turns a line into a comment instead of executable code.
#
=
is not
return
35. Argument variable
argv
>=
abs(a)
|
36. Where the parameters go. A necessary punctuation after any function even if it's empty.
argument variable
open()
()
Variables
37. Greater than or equal symbol.
+=
>=
print
str()
38. Command to print to the screen
print
-
file.truncate()
open()
39. floor division AND assignment operator
<<
>=
<=
//=
40. exponentiation
a**b
<
~
assignment
41. inserts an item inside a list at a certain index
def
=
insert()
#
42. ,multi-line comment hard-code,Fix (data or parameters) in a program in such a way that they cannot easily be altered by the user.
+
>
format string
43. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
read
Variables
%
~
44. The extension for Python scripts
abs(a)
*write(stuff)
.py
+
45. prints its parameter to the console
is not
%s
float
print()
46. asks the user for a response and returns that response
input()
int
~
-
47. Function to empty the contents of a file - no recovery is possible
truncate
/=
+=
open()
48. multiply AND assignment operator
+
*=
-
abs(a)
49. divide AND assignment operator
=
/=
print
#
50. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
close
read
Variables
print