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. This statement causes an exception.
()
<=
#
raise
2. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
+
while
|
format string
3. A logical operator which returns a value of True if either of the conditions is true.
def
*truncate
or
<=
4. modulus AND assignment operator
%=
()
=
*
5. Function to close a file - it will not be able to be used again unless the file is opened.
#
close
*write(stuff)
not in
6. An operator to check whether two variables refer to the same object.
is
math.sqrt(a)
del
print()
7. Symbol to add things together
~
+
str
else
8. Less than or equal to symbol
read
<=
>>
else
9. 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
>>
argument variable
/
try
10. rounds a number to the number of decimal points you choose
def
*truncate
not
round()
11. divide AND assignment operator
/=
read
len()
%s
12. Symbol to subtract things from each other
n
-
del
.py
13. A logical operator which compares two operands and produces True if they are equal and False otherwise
print()
in
==
~
14. Adds a new line character
/
n
a//b
*=
15. Symbol to multiply things
*
*write(stuff)
+=
#
16. turns an object into a string
str()
append()
float
write
17. exponent AND assignment operator
=
<=
**=
str
18. multiply AND assignment operator
assignment
=
*=
readline
19. Argument variable
//=
~
<=
argv
20. inserts an item inside a list at a certain index
=
append()
insert()
while
21. An operator that removes a value from a list.
math.sqrt(a)
|
del
%s
22. Function to open or read a file
open()
and
+
del
23. This keyword in the body of a conditional - gives an alternative execution.
%=
and
def
else
24. Reads just one line of a text file.
**=
*readline
~
open()
25. Symbol to add things together
round()
read
insert()
+
26. Command to print to the screen
<
print
del
write
27. The keyword beginning a header that will create a new function.
not in
def
close
/=
28. modulo
()
=
<
a%b
29. single line comment
int()
#
read
//=
30. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
Variables
abs(a)
*readline
<<
31. turns an object into an integer
and
int()
not
del
32. A keyword that does nothing but fill space to indicate code which will be written later.
print
pass
~
*write(stuff)
33. subtract AND assignment operator
is not
-=
str
>
34. deletes an item from a list
>>
~
pass
del
35. empties the file
continue
>=
file.truncate()
file.readline()
36. Symbol to divide by the number to the right of the symbol
insert()
open()
/
37. Turns a line into a comment instead of executable code.
#
and
float
not
38. reads just one line of a text file & keeps track of where in the file you're at
pass
floating point number
file.readline()
a%b
39. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
a**b
readline
format string
*
40. 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
str()
append()
str
<<
41. prints its parameter to the console
open()
<
print()
^
42. A statement that ends the current iteration of a loop but continues looping.
()
.py
%=
continue
43. divide AND assignment operator
/=
=
<=
class
44. Prints a string to the screen which is converted using repr()
%r
+=
a%b
round()
45. This statement exits a function. The remaining lines of the function are not executed.
return
for
Variables
def
46. inserts an item inside a list at a certain index
()
is
insert()
str()
47. exponent AND assignment operator
round()
~
**=
a%b
48. Argument variable
*=
argv
append()
and
49. Adds something to a variable
Variables
+=
=
*=
50. A logical operator which negates an expression so that it returns a value of True if the expression is false.
input()
not
~
%