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. A statement that breaks out of a loop.
raise
a%b
insert()
break
2. floor division AND assignment operator
a**b
//=
int()
input()
3. A statement that ends the current iteration of a loop but continues looping.
=
else
print
continue
4. Prints a string to the screen which is converted using repr()
/=
try
%r
5. A built-in function that converts integers and strings to floating-point numbers.
>
int()
float
a//b
6. Adds a new line character
not in
file.truncate()
n
else
7. subtract AND assignment operator
round()
for
else
-=
8. A data type for representing numbers with fractional values.
not
floating point number
insert()
else
9. exponentiation
a**b
%
#
not
10. A statement that assigns a value to a variable.
assignment
except
=
write
11. Function to write something to a file
write
>
//=
/
12. 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
=
<<
print()
|
13. turns an object into an integer
int()
math.sqrt(a)
<=
pass
14. Symbol to divide by the number to the right of the symbol
/
>
>
abs(a)
15. adds an item to a list
for
readline
+=
append()
16. inserts an item inside a list at a certain index
insert()
str
#
>>
17. exponent AND assignment operator
raise
elif (Else if)
**=
<<
18. A keyword that does nothing but fill space to indicate code which will be written later.
def
pass
for
print
19. asks the user for a response and returns that response
>
input()
#
truncate
20. Writes stuff to the file.
str()
%s
*write(stuff)
or
21. Function to empty the contents of a file - no recovery is possible
truncate
a%b
=
%=
22. Create a variable.
-
n
else
=
23. Symbol used to create comments
#
%s
n
a**b
24. single line comment
^
#
print()
in
25. rounds a number to the number of decimal points you choose
argv
round()
int()
/
26. modulo
%d
a%b
del
round()
27. This keyword in the body of a conditional - gives an alternative execution.
assignment
read
n
else
28. This keyword begins the simplest form of a conditional statement.
is
if
for
%s
29. A statement that displays a value on the screen.
%r
*readline
for
print
30. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
class
&
readline
assignment
31. square root
math.sqrt(a)
<=
elif (Else if)
^
32. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
+
%
&
*=
33. unction to read one line of a file
readline
*=
floating point number
=
34. A built-in function that converts its argument to a string.
str
//=
in
file.readline()
35. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
.py
append()
in
truncate
36. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
|
floating point number
*
try
37. deletes an item from a list
del
continue
-=
<<
38. Less than or equal to symbol
#
<=
=
*
39. This keyword begins a header for a body that repeats until the condition is no longer true.
==
a**b
while
<<
40. Greater than symbol
a//b
or
>
/=
41. modulus AND assignment operator
%=
#
:
>=
42. Symbol to add things together
a**b
<
+
=
43. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
/=
==
file.readline()
44. 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
print()
+
.py
^
45. A logical operator which negates an expression so that it returns a value of True if the expression is false.
not
argv
-=
raise
46. add AND assignment operator
insert()
+=
Variables
or
47. inserts an item inside a list at a certain index
math.sqrt(a)
a%b
if
insert()
48. floor division
write
a//b
del
>>
49. Prints a string to the screen which is a signed decimal.
%d
continue
floating point number
print
50. turns an object into a string
pass
str()
readline
input()