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. Prints a string to the screen which is converted using repr()
else
*=
readline
%r
2. Create a variable.
=
len()
a**b
math.sqrt(a)
3. Symbol to add things together
*=
+
insert()
a//b
4. Command to print to the screen
print
<
==
>>
5. Create a variable.
*read
#
=
math.sqrt(a)
6. A statement that assigns a value to a variable.
try
>>
assignment
^
7. A statement that ends the current iteration of a loop but continues looping.
<<
continue
write
if
8. adds an item to a list
%
=
append()
file.readline()
9. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
except
.py
<
10. Argument variable
n
abs(a)
else
argv
11. A built-in function that converts integers and strings to floating-point numbers.
float
*read
open()
()
12. A statement that displays a value on the screen.
for
print
%d
a//b
13. Function to read the contents of a file
*readline
del
read
while
14. The extension for Python scripts
/=
.py
round()
:
15. writes stuff to the file
file.write(stuff)
assignment
a//b
/=
16. 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.
%=
not in
%
*write(stuff)
17. Turns a line into a comment instead of executable code.
=
*=
str
#
18. Greater than symbol
read
%d
>
-
19. Symbol to subtract things from each other
or
-
append()
==
20. Function to write something to a file
write
a**b
int()
*truncate
21. returns the length of a string (number of characters)
if
input()
len()
readline
22. rounds a number to the number of decimal points you choose
insert()
print()
round()
/
23. inserts an item inside a list at a certain index
for
or
insert()
*read
24. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
**=
|
return
def
25. Function to write something to a file
.py
break
write
truncate
26. add AND assignment operator
+=
str()
-
for
27. The keyword beginning a header that will create a loop.
append()
break
elif (Else if)
for
28. An operator that removes a value from a list.
=
del
%r
argument variable
29. This statement causes an exception.
while
assignment
%d
raise
30. Symbol to divide by the number to the right of the symbol
insert()
/
raise
def
31. exponent AND assignment operator
>
*
-=
**=
32. sets the file's current position
#
file.seek()
a//b
del
33. assignment operator
-
floating point number
=
pass
34. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
not in
format string
math.sqrt(a)
35. Function to empty the contents of a file - no recovery is possible
floating point number
%=
truncate
a%b
36. Symbol to subtract things from each other
-
==
input()
class
37. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
>
|
truncate
raise
38. divide AND assignment operator
a//b
and
/=
%
39. absolute value
abs(a)
<
^
<
40. End header line.
=
:
//=
truncate
41. A logical operator which requires two expressions to both be true.
and
*=
not in
n
42. Evaluates to true if it finds a variable in the specified sequence and false otherwise. x in y - here in results in a 1 if x is a member of sequence y.
return
in
//=
format string
43. single line comment
|
write
#
44. exponentiation
*read
a**b
%s
int
45. inserts an item inside a list at a certain index
open()
argument variable
=
insert()
46. Greater than symbol
floating point number
print
>
=
47. deletes an item from a list
a//b
while
+=
del
48. Symbol used to create comments
^
round()
#
=
49. Less than or equal to symbol
len()
-=
<=
else
50. Function to open or read a file
open()
break
print
**=