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. Function to open or read a file
*=
input()
pass
open()
2. A logical operator which compares two operands and produces True if they are equal and False otherwise
*=
==
=
^
3. writes stuff to the file
file.write(stuff)
n
^
#
4. Adds a new line character
n
%r
=
if
5. absolute value
return
str()
truncate
abs(a)
6. End header line.
print()
:
+
=
7. add AND assignment operator
input()
+=
/=
try
8. The keyword beginning a header that will create a new function.
/=
def
//=
class
9. Where the parameters go. A necessary punctuation after any function even if it's empty.
%=
//=
()
elif (Else if)
10. multiply AND assignment operator
def
+=
*=
read
11. Prevents a runtime error from stopping the program.
print()
except
a//b
=
12. turns an object into a string
<
<=
str()
def
13. single line comment
=
del
open()
#
14. A keyword that does nothing but fill space to indicate code which will be written later.
pass
%=
read
&
15. floor division
//=
and
int()
a//b
16. Function to open or read a file
-=
open()
insert()
%=
17. modulo
in
a%b
write
len()
18. turns an object into an integer
n
int()
format string
==
19. modulo
*truncate
**=
%s
a%b
20. Less than symbol
for
close
<
a**b
21. turns an object into a string
str
<
|
str()
22. Argument variable
argv
input()
<=
.py
23. 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
()
24. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
+
abs(a)
Variables
file.seek()
25. inserts an item inside a list at a certain index
insert()
argv
*
str()
26. Function to read the contents of a file
-
a%b
read
27. A built-in function that converts its argument to a string.
elif (Else if)
a**b
str
del
28. multiply AND assignment operator
*readline
Variables
n
*=
29. Prints a string to the screen which is converted using repr()
round()
.py
%r
<<
30. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
readline
format string
not
&
31. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
and
.py
<<
&
32. This statement causes an exception.
input()
raise
/=
float
33. modulus AND assignment operator
%=
#
file.readline()
%
34. exponent AND assignment operator
==
a**b
str()
**=
35. 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).
n
:
is not
close
36. Function to write something to a file
len()
-=
input()
write
37. asks the user for a response and returns that response
=
:
input()
=
38. subtract AND assignment operator
format string
#
()
-=
39. The extension for Python scripts
.py
<=
:
%d
40. The keyword beginning a header that will create a loop.
for
truncate
%
<
41. Adds a new line character
n
str()
del
not in
42. prints its parameter to the console
str()
print()
break
=
43. Reads the contents of the file you can assign the result to a variable.
truncate
argv
<=
*read
44. empties the file
^
open()
file.readline()
file.truncate()
45. deletes an item from a list
#
file.seek()
del
return
46. adds an item to a list
~
insert()
append()
=
47. sets the file's current position
close
<=
write
file.seek()
48. floor division
Variables
a//b
~
#
49. exponentiation
<
a**b
continue
write
50. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
round()
.py
|
<=