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 will be Unicode.
%s
-
>
#
2. add AND assignment operator
<
^
print
+=
3. This keyword begins a header for a body that repeats until the condition is no longer true.
math.sqrt(a)
while
|
append()
4. 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
>>
^
str()
>=
5. A statement that assigns a value to a variable.
-=
assignment
input()
open()
6. Less than symbol
~
file.readline()
<
*truncate
7. inserts an item inside a list at a certain index
>=
insert()
int
argv
8. A statement that ends the current iteration of a loop but continues looping.
continue
%s
len()
elif (Else if)
9. returns the length of a string (number of characters)
-
len()
a**b
>>
10. returns the length of a string (number of characters)
argv
del
not in
len()
11. Adds something to a variable
str
=
len()
in
12. Symbol to add things together
file.write(stuff)
-=
+
*truncate
13. Symbol to multiply things
and
+=
.py
*
14. Symbol used to create comments
#
break
round()
&
15. A keyword that does nothing but fill space to indicate code which will be written later.
*readline
a//b
pass
str()
16. Prints a string to the screen which is a signed decimal.
<=
or
%d
and
17. turns an object into an integer
>=
a**b
int()
-
18. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
is
&
Variables
math.sqrt(a)
19. floor division AND assignment operator
//=
math.sqrt(a)
argument variable
write
20. modulo
^
a%b
math.sqrt(a)
*=
21. Adds something to a variable
math.sqrt(a)
=
<<
>
22. This keyword in the body of a conditional allows chained conditionals.
int()
%s
elif (Else if)
=
23. floor division
()
n
print()
a//b
24. Command to print to the screen
*=
=
print
str
25. Greater than or equal symbol.
>=
def
Variables
open()
26. Prints a string to the screen which will be Unicode.
-
&
file.seek()
%s
27. modulus AND assignment operator
=
%=
file.readline()
+
28. Symbol to subtract things from each other
append()
%d
print
-
29. subtract AND assignment operator
-=
append()
~
close
30. rounds a number to the number of decimal points you choose
in
:
file.seek()
round()
31. divide AND assignment operator
()
=
*truncate
/=
32. exponent AND assignment operator
|
**=
#
&
33. This keyword in the body of a conditional - gives an alternative execution.
a%b
print()
else
len()
34. A built-in function that converts its argument to a string.
in
insert()
str
~
35. Function to read the contents of a file
==
#
-=
read
36. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
argument variable
input()
else
int
37. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
|
%s
del
and
38. The extension for Python scripts
not
int()
int()
.py
39. deletes an item from a list
a//b
else
del
|
40. asks the user for a response and returns that response
readline
%
not
input()
41. multiply AND assignment operator
if
*=
try
//=
42. Function to empty the contents of a file - no recovery is possible
truncate
format string
argument variable
43. Modulus operator. It's the remainder after division
argument variable
%
close
&
44. The keyword beginning a header that will create a loop.
for
input()
str
is not
45. A statement that breaks out of a loop.
readline
<
or
break
46. assignment operator
=
*
print
input()
47. Where the parameters go. A necessary punctuation after any function even if it's empty.
**=
()
-
a**b
48. Function to write something to a file
>
argument variable
write
truncate
49. This keyword begins the simplest form of a conditional statement.
-=
str()
if
return
50. sets the file's current position
and
file.seek()
:
<<