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
:
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. 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).
insert()
input()
or
is not
2. add AND assignment operator
*readline
*truncate
+=
*read
3. 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
>>
=
raise
%s
4. The keyword beginning a header that will create a loop.
for
**=
-=
a%b
5. returns the length of a string (number of characters)
==
*write(stuff)
n
len()
6. inserts an item inside a list at a certain index
*
def
&
insert()
7. Prints a string to the screen which will be Unicode.
^
&
%s
/=
8. divide AND assignment operator
>>
file.seek()
<=
/=
9. This statement causes an exception.
>=
float
raise
input()
10. assignment operator
^
class
input()
=
11. square root
math.sqrt(a)
truncate
%r
+=
12. Less than or equal to symbol
-=
*=
<=
int()
13. Symbol to add things together
+
close
else
is not
14. Prints a string to the screen which is converted using repr()
%r
class
<<
+
15. Adds a new line character
>
:
str()
n
16. Modulus operator. It's the remainder after division
readline
|
%
for
17. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
del
/=
in
+
18. Greater than or equal symbol.
insert()
==
round()
>=
19. Modulus operator. It's the remainder after division
file.write(stuff)
open()
%
=
20. asks the user for a response and returns that response
def
input()
n
append()
21. Writes stuff to the file.
a%b
readline
*write(stuff)
if
22. 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
-=
&
^
%s
23. A statement that displays a value on the screen.
str()
except
if
print
24. asks the user for a response and returns that response
+=
<<
input()
~
25. exponentiation
in
try
a**b
==
26. The extension for Python scripts
pass
.py
-=
readline
27. Command to print to the screen
print
print()
input()
%d
28. A logical operator which returns a value of True if either of the conditions is true.
print()
math.sqrt(a)
and
or
29. A built-in function that converts integers and strings to floating-point numbers.
#
float
file.truncate()
is
30. Less than or equal to symbol
raise
<=
:
input()
31. rounds a number to the number of decimal points you choose
read
round()
for
a//b
32. modulus AND assignment operator
file.truncate()
def
%=
-
33. floor division AND assignment operator
readline
del
//=
in
34. Adds something to a variable
-
=
def
argument variable
35. ,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.
%=
and
/=
36. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
<
in
format string
and
37. Function to empty the contents of a file - no recovery is possible
pass
in
truncate
insert()
38. floor division
+
a//b
%r
len()
39. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
&
*=
<
40. Prints a string to the screen which will be Unicode.
%s
int()
()
Variables
41. inserts an item inside a list at a certain index
print()
insert()
+
%s
42. empties the file
while
%s
file.truncate()
input()
43. sets the file's current position
>=
+
open()
file.seek()
44. Function to write something to a file
append()
=
write
except
45. exponent AND assignment operator
str
file.truncate()
**=
while
46. This keyword in the body of a conditional allows chained conditionals.
.py
elif (Else if)
readline
print
47. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
<=
return
is not
try
48. Symbol used to create comments
#
&
in
insert()
49. A logical operator which compares two operands and produces True if they are equal and False otherwise
()
==
*=
open()
50. Function to open or read a file
%s
print()
a**b
open()