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. Symbol to subtract things from each other
else
<
raise
-
2. Command to print to the screen
abs(a)
print
*write(stuff)
a%b
3. This keyword begins the simplest form of a conditional statement.
if
()
open()
assignment
4. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
math.sqrt(a)
|
pass
else
5. Prints a string to the screen which is converted using repr()
%r
argument variable
|
append()
6. Function to empty the contents of a file - no recovery is possible
class
truncate
/
while
7. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
in
<=
else
+=
8. assignment operator
def
=
<
format string
9. deletes an item from a list
/=
del
truncate
&
10. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
+=
>
int
%s
11. Modulus operator. It's the remainder after division
for
write
%
//=
12. A keyword that does nothing but fill space to indicate code which will be written later.
pass
n
:
%d
13. Prints a string to the screen which will be Unicode.
n
%s
del
=
14. Reads the contents of the file you can assign the result to a variable.
pass
*read
or
round()
15. The extension for Python scripts
#
*readline
.py
append()
16. modulo
n
open()
:
a%b
17. multiply AND assignment operator
*=
read
print()
round()
18. 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.
insert()
not in
:
>=
19. The keyword beginning a header that will create a loop.
=
print
open()
for
20. Prints a string to the screen which is a signed decimal.
%d
*
abs(a)
not in
21. Function to open or read a file
open()
+
>=
assignment
22. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
pass
break
&
23. This variable holds the arguments you pass to your Python script when you run it. Then you unpack it in your script so you have variables you can work with.
Variables
break
argument variable
<=
24. prints its parameter to the console
>
print()
raise
for
25. turns an object into an integer
input()
~
int()
abs(a)
26. An operator that removes a value from a list.
readline
file.seek()
del
input()
27. Greater than symbol
floating point number
print
>
math.sqrt(a)
28. Symbol to add things together
>
+
and
while
29. adds an item to a list
*truncate
def
is
append()
30. Writes stuff to the file.
*write(stuff)
class
a//b
~
31. Less than or equal to symbol
%r
<=
*truncate
open()
32. Greater than or equal symbol.
=
input()
>=
=
33. Symbol used to create comments
del
#
str
*read
34. A logical operator which compares two operands and produces True if they are equal and False otherwise
<=
&
%r
==
35. Adds something to a variable
=
*readline
-
else
36. subtract AND assignment operator
write
=
-=
#
37. A statement that breaks out of a loop.
%=
break
argv
argv
38. rounds a number to the number of decimal points you choose
*
read
write
round()
39. Reads just one line of a text file.
%s
*readline
argv
is not
40. Symbol to multiply things
read
*
>>
del
41. Prevents a runtime error from stopping the program.
*=
*read
except
continue
42. inserts an item inside a list at a certain index
insert()
close
write
a%b
43. Symbol to divide by the number to the right of the symbol
<<
/
-
is not
44. 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
>>
format string
*
open()
45. inserts an item inside a list at a certain index
~
try
=
insert()
46. The extension for Python scripts
*write(stuff)
%r
print()
.py
47. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
format string
-
not in
readline
48. turns an object into a string
-=
for
str()
#
49. Create a variable.
+=
/=
=
assignment
50. Function to close a file - it will not be able to be used again unless the file is opened.
%r
a**b
format string
close