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. Where the parameters go. A necessary punctuation after any function even if it's empty.
n
()
try
=
2. Function to open or read a file
file.truncate()
#
open()
%=
3. exponent AND assignment operator
-=
%=
read
**=
4. Function to read the contents of a file
=
read
math.sqrt(a)
str
5. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
%r
^
&
str()
6. 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
^
readline
//=
pass
7. asks the user for a response and returns that response
**=
%
input()
if
8. A statement that breaks out of a loop.
truncate
break
%r
n
9. prints its parameter to the console
a%b
print()
not
//=
10. Function to write something to a file
argument variable
write
del
readline
11. returns the length of a string (number of characters)
==
len()
#
for
12. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
math.sqrt(a)
%=
if
Variables
13. Less than or equal to symbol
**=
=
print
<=
14. This statement causes an exception.
%r
raise
<=
except
15. A statement that assigns a value to a variable.
>>
a//b
assignment
*write(stuff)
16. absolute value
~
.py
abs(a)
str
17. Greater than or equal symbol.
>=
return
Variables
floating point number
18. Prints a string to the screen which is a signed decimal.
**=
%d
class
print
19. Command to print to the screen
readline
:
del
print
20. 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).
format string
print
is not
or
21. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
#
Variables
=
/
22. Turns a line into a comment instead of executable code.
<=
abs(a)
Variables
#
23. Less than or equal to symbol
else
<=
a**b
()
24. An operator to check whether two variables refer to the same object.
is
//=
=
*truncate
25. A logical operator which negates an expression so that it returns a value of True if the expression is false.
not
%s
truncate
input()
26. The keyword beginning a header that will create a loop.
*write(stuff)
a%b
for
*
27. multiply AND assignment operator
else
*=
()
-=
28. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
is
*=
&
open()
29. Function to read the contents of a file
*truncate
print
read
/=
30. Greater than symbol
%s
argument variable
%=
>
31. Greater than symbol
not in
>
append()
()
32. Where the parameters go. A necessary punctuation after any function even if it's empty.
math.sqrt(a)
=
()
*=
33. The keyword beginning a header that will create a new function.
def
>>
else
readline
34. inserts an item inside a list at a certain index
*=
insert()
round()
len()
35. Reads the contents of the file you can assign the result to a variable.
a//b
argv
*read
%
36. turns an object into a string
print()
print
*readline
str()
37. Command to print to the screen
#
%
print
is
38. This keyword begins the simplest form of a conditional statement.
a%b
&
if
math.sqrt(a)
39. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
-=
^
else
|
40. A logical operator which compares two operands and produces True if they are equal and False otherwise
str()
elif (Else if)
==
+
41. Create a variable.
try
>
=
*readline
42. Prints a string to the screen which is converted using repr()
%r
try
is
43. Prints a string to the screen which is converted using repr()
abs(a)
=
elif (Else if)
%r
44. Adds something to a variable
readline
=
round()
>>
45. exponentiation
abs(a)
=
a**b
a//b
46. Less than symbol
<
-=
=
read
47. returns the length of a string (number of characters)
a%b
len()
format string
<=
48. This keyword in the body of a conditional allows chained conditionals.
-
in
or
elif (Else if)
49. deletes an item from a list
append()
is not
a%b
del
50. assignment operator
<<
=
%d
%d