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. End header line.
:
append()
del
|
2. deletes an item from a list
del
=
*read
/
3. The keyword beginning a header that will create a new function.
argv
def
print()
del
4. sets the file's current position
%r
file.seek()
=
int
5. Adds a new line character
if
*truncate
n
print()
6. This keyword begins the simplest form of a conditional statement.
-
()
if
math.sqrt(a)
7. A built-in function that converts integers and strings to floating-point numbers.
try
+
float
>=
8. inserts an item inside a list at a certain index
format string
insert()
print
*readline
9. Less than symbol
open()
=
class
<
10. Symbol to divide by the number to the right of the symbol
-
/
=
str
11. Less than or equal to symbol
>
*
()
<=
12. Less than symbol
<
in
str()
round()
13. Prints a string to the screen which is a signed decimal.
<
for
%d
**=
14. An operator to check whether two variables refer to the same object.
class
is
//=
a//b
15. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
in
<=
format string
**=
16. exponent AND assignment operator
readline
+
**=
-
17. Prints a string to the screen which is converted using repr()
<
def
%r
print()
18. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
+=
int
/
&
19. subtract AND assignment operator
~
-=
=
%d
20. A logical operator which negates an expression so that it returns a value of True if the expression is false.
:
Variables
<<
not
21. prints its parameter to the console
else
in
print()
raise
22. floor division
close
==
a//b
%=
23. Reads the contents of the file you can assign the result to a variable.
try
*read
&
Variables
24. Prints a string to the screen which is converted using repr()
%r
len()
continue
#
25. multiply AND assignment operator
*=
=
try
+=
26. deletes an item from a list
a%b
is not
del
def
27. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
del
//=
try
=
28. Less than or equal to symbol
<=
def
==
#
29. Command to print to the screen
if
^
-=
print
30. exponentiation
int()
input()
a**b
%=
31. A data type for representing numbers with fractional values.
floating point number
float
%s
str()
32. This keyword in the body of a conditional - gives an alternative execution.
else
readline
a**b
floating point number
33. This keyword in the body of a conditional allows chained conditionals.
#
break
-
elif (Else if)
34. 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.
assignment
not in
file.truncate()
def
35. A logical operator which requires two expressions to both be true.
a**b
raise
and
readline
36. Symbol used to create comments
#
while
a**b
str
37. asks the user for a response and returns that response
file.write(stuff)
abs(a)
input()
a//b
38. multiply AND assignment operator
file.truncate()
*=
*truncate
insert()
39. inserts an item inside a list at a certain index
*truncate
close
write
insert()
40. prints its parameter to the console
%s
print()
%s
%=
41. assignment operator
&
file.truncate()
del
=
42. 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
>>
break
-=
.py
43. Function to open or read a file
open()
if
&
print()
44. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
or
for
assignment
~
45. This keyword in the body of a conditional - gives an alternative execution.
.py
format string
else
in
46. unction to read one line of a file
readline
str()
:
%d
47. Symbol to subtract things from each other
>
-
round()
in
48. Prints a string to the screen which will be Unicode.
int()
%s
del
=
49. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
|
not in
=
write
50. The extension for Python scripts
%s
.py
:
return