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. deletes an item from a list
argv
()
/=
del
2. Greater than symbol
int()
print()
>
<<
3. 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
round()
def
&
>>
4. A logical operator which compares two operands and produces True if they are equal and False otherwise
|
==
file.truncate()
float
5. The keyword beginning a header that will create a loop.
is not
int
while
for
6. prints its parameter to the console
str()
+
def
print()
7. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
argument variable
continue
%s
~
8. inserts an item inside a list at a certain index
*truncate
insert()
open()
readline
9. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
*=
|
str
()
10. ,multi-line comment hard-code,Fix (data or parameters) in a program in such a way that they cannot easily be altered by the user.
insert()
%d
~
11. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
:
in
-
for
12. absolute value
abs(a)
*readline
Variables
int
13. An operator to check whether two variables refer to the same object.
read
n
is
truncate
14. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
math.sqrt(a)
is not
=
&
15. Writes stuff to the file.
*write(stuff)
<=
>>
file.readline()
16. reads just one line of a text file & keeps track of where in the file you're at
%s
argv
if
file.readline()
17. Function to close a file - it will not be able to be used again unless the file is opened.
format string
<=
close
continue
18. square root
%
math.sqrt(a)
float
floating point number
19. turns an object into an integer
int()
write
in
int
20. turns an object into a string
len()
readline
str()
+=
21. asks the user for a response and returns that response
else
input()
>=
>>
22. writes stuff to the file
close
file.write(stuff)
<<
truncate
23. This keyword begins a header for a body that repeats until the condition is no longer true.
input()
argv
print
while
24. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
argv
abs(a)
Variables
try
25. 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
^
a**b
>
26. Function to empty the contents of a file - no recovery is possible
append()
truncate
math.sqrt(a)
<<
27. This keyword in the body of a conditional - gives an alternative execution.
def
else
:
%=
28. Symbol to subtract things from each other
int()
<
file.readline()
-
29. Symbol used to create comments
str()
#
<
-
30. Modulus operator. It's the remainder after division
continue
a**b
%
a%b
31. Less than or equal to symbol
<
open()
<=
=
32. Symbol to add things together
math.sqrt(a)
break
%s
+
33. exponent AND assignment operator
file.readline()
**=
n
%d
34. 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).
abs(a)
is not
*readline
append()
35. Less than or equal to symbol
<=
//=
input()
float
36. modulo
*=
&
input()
a%b
37. 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
a**b
*
^
class
38. The extension for Python scripts
|
^
try
.py
39. rounds a number to the number of decimal points you choose
read
*=
round()
n
40. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
Variables
==
n
try
41. Adds something to a variable
=
:
*write(stuff)
+
42. modulo
+=
#
for
a%b
43. Symbol to divide by the number to the right of the symbol
and
pass
truncate
/
44. absolute value
abs(a)
#
math.sqrt(a)
/
45. Command to print to the screen
%d
print
not in
&
46. subtract AND assignment operator
read
append()
-=
file.write(stuff)
47. Prints a string to the screen which is a signed decimal.
print()
%r
%d
48. single line comment
print
>
argument variable
#
49. End header line.
is not
:
append()
==
50. Less than symbol
<
elif (Else if)
*
&