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. 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
try
<<
|
<
2. A statement that ends the current iteration of a loop but continues looping.
argv
continue
format string
float
3. This keyword in the body of a conditional allows chained conditionals.
elif (Else if)
while
**=
print()
4. Greater than symbol
>
+
.py
len()
5. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
*read
float
pass
Variables
6. A statement that displays a value on the screen.
len()
read
int
print
7. unction to read one line of a file
argv
continue
readline
round()
8. Function to write something to a file
int()
=
write
close
9. floor division
a//b
.py
del
for
10. Argument variable
argv
not in
readline
**=
11. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
in
readline
format string
print
12. inserts an item inside a list at a certain index
not
Variables
insert()
float
13. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
in
read
~
Variables
14. asks the user for a response and returns that response
file.truncate()
<=
input()
else
15. Function to read the contents of a file
//=
>>
read
round()
16. subtract AND assignment operator
/=
==
.py
-=
17. exponentiation
=
read
a**b
>>
18. A built-in function that converts integers and strings to floating-point numbers.
|
len()
=
float
19. turns an object into a string
str
or
not in
str()
20. Prints a string to the screen which will be Unicode.
%s
**=
if
^
21. subtract AND assignment operator
print
len()
-=
append()
22. Command to print to the screen
~
else
print
math.sqrt(a)
23. An operator that removes a value from a list.
()
append()
del
#
24. Function to read the contents of a file
*truncate
()
format string
read
25. Prints a string to the screen which is a signed decimal.
while
+=
%d
%
26. The extension for Python scripts
class
file.seek()
~
.py
27. Modulus operator. It's the remainder after division
print()
argv
%
//=
28. Function to empty the contents of a file - no recovery is possible
file.readline()
truncate
>=
def
29. 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
read
<<
*=
~
30. Evaluates to true if it does not finds a variable in the specified sequence and false otherwise. x not in y - here not in results in a 1 if x is a member of sequence y.
and
n
not in
input()
31. Adds a new line character
n
print()
floating point number
%
32. Reads just one line of a text file.
*readline
round()
%=
a//b
33. modulo
argv
try
append()
a%b
34. Greater than symbol
%d
>
if
str()
35. Less than or equal to symbol
.py
~
<=
36. Symbol to multiply things
*
argv
pass
len()
37. Symbol to add things together
+
truncate
insert()
else
38. Evaluates to false if the variables on either side of the operator point to the same object and true otherwise. x is not y - here is not results in 1 if id(x) is not equal to id(y).
read
argv
is not
a**b
39. A logical operator which returns a value of True if either of the conditions is true.
or
/=
%d
if
40. This statement exits a function. The remaining lines of the function are not executed.
return
+
+=
or
41. unction to read one line of a file
readline
except
for
|
42. The keyword beginning a header that will create a loop.
a**b
else
for
or
43. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
else
len()
and
>
44. The keyword beginning a header that will create a new function.
/
def
*read
<=
45. Empties the file - watch out if you care about the file.
+=
*truncate
truncate
a//b
46. Create a variable.
+
%s
-
=
47. multiply AND assignment operator
%r
*=
del
not
48. Adds a new line character
n
not
%=
insert()
49. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
>=
read
insert()
50. rounds a number to the number of decimal points you choose
round()
def
if
&