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. Prevents a runtime error from stopping the program.
while
except
%
>=
2. A built-in function that converts integers and strings to floating-point numbers.
float
.py
()
=
3. Modulus operator. It's the remainder after division
%
*read
a//b
len()
4. Create a variable.
*readline
file.seek()
elif (Else if)
=
5. turns an object into a string
~
#
str()
*=
6. prints its parameter to the console
try
print()
del
round()
7. The keyword beginning a header that will create a new function.
:
#
print()
def
8. Adds something to a variable
//=
+=
else
=
9. Function to close a file - it will not be able to be used again unless the file is opened.
<<
int()
append()
close
10. The extension for Python scripts
.py
input()
-=
%
11. floor division
and
read
=
a//b
12. floor division
/
=
close
a//b
13. Prints a string to the screen which is a signed decimal.
write
%d
and
/
14. add AND assignment operator
+=
continue
insert()
while
15. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
else
|
%s
close
16. This statement exits a function. The remaining lines of the function are not executed.
argv
>=
continue
return
17. The keyword beginning a header that will create a loop.
for
>=
in
insert()
18. exponent AND assignment operator
==
**=
#
assignment
19. single line comment
==
~
#
int
20. This keyword begins the simplest form of a conditional statement.
%d
if
()
return
21. Create a variable.
+
floating point number
<=
=
22. inserts an item inside a list at a certain index
abs(a)
def
len()
insert()
23. rounds a number to the number of decimal points you choose
except
del
close
round()
24. unction to read one line of a file
*readline
>
readline
%r
25. Symbol to multiply things
**=
print
raise
*
26. A statement that breaks out of a loop.
break
<<
a//b
n
27. A built-in function that converts its argument to a string.
for
del
str
if
28. This keyword in the body of a conditional allows chained conditionals.
=
write
>=
elif (Else if)
29. This keyword in the body of a conditional - gives an alternative execution.
print()
elif (Else if)
def
else
30. Function to write something to a file
argv
write
#
>>
31. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
=
&
floating point number
^
32. adds an item to a list
append()
=
and
insert()
33. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
round()
not in
is not
34. returns the length of a string (number of characters)
len()
n
>>
%s
35. The keyword beginning a header that will create a loop.
for
n
&
=
36. Modulus operator. It's the remainder after division
write
%
/=
and
37. A logical operator which returns a value of True if either of the conditions is true.
()
=
or
Variables
38. writes stuff to the file
a**b
file.write(stuff)
==
else
39. An operator that removes a value from a list.
file.seek()
del
read
def
40. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
#
|
=
41. Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand. a << 2 will give 240 which is 1111 0000
<<
print()
argument variable
abs(a)
42. turns an object into an integer
%
int()
^
=
43. Prints a string to the screen which will be Unicode.
-
write
%s
==
44. turns an object into an integer
int()
=
:
file.readline()
45. prints its parameter to the console
append()
print()
str()
file.readline()
46. Prints a string to the screen which is a signed decimal.
:
%d
=
readline
47. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
class
-
<=
48. subtract AND assignment operator
-=
>>
print()
:
49. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
format string
int
continue
input()
50. Prints a string to the screen which is converted using repr()
def
else
%r
del