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. inserts an item inside a list at a certain index
+
while
insert()
<
2. This keyword in the body of a conditional - gives an alternative execution.
else
<<
del
truncate
3. A data type for representing numbers with fractional values.
class
not
a//b
floating point number
4. Function to open or read a file
break
return
*
open()
5. The keyword beginning a header that will create a loop.
for
argument variable
is not
+
6. This keyword begins a header for a body that repeats until the condition is no longer true.
math.sqrt(a)
open()
return
while
7. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
Variables
print
**=
truncate
8. Less than or equal to symbol
-=
len()
open()
<=
9. Symbol to add things together
^
=
file.readline()
+
10. The extension for Python scripts
.py
#
a%b
a//b
11. floor division
a//b
argv
assignment
else
12. deletes an item from a list
del
str()
print
<<
13. modulus AND assignment operator
int()
file.seek()
str
%=
14. 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
and
abs(a)
^
15. Prints a string to the screen which will be Unicode.
==
argument variable
%s
assignment
16. asks the user for a response and returns that response
input()
*
%s
if
17. This keyword in the body of a conditional - gives an alternative execution.
and
else
&
18. An operator to check whether two variables refer to the same object.
is
=
print
-
19. inserts an item inside a list at a certain index
%d
<<
%=
insert()
20. A keyword that does nothing but fill space to indicate code which will be written later.
truncate
//=
and
pass
21. This statement exits a function. The remaining lines of the function are not executed.
|
a**b
return
def
22. 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
>>
del
len()
a%b
23. A logical operator which requires two expressions to both be true.
and
insert()
file.write(stuff)
break
24. Modulus operator. It's the remainder after division
%
input()
.py
if
25. Symbol to divide by the number to the right of the symbol
for
=
/
-=
26. assignment operator
=
:
append()
>=
27. ,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.
append()
^
abs(a)
28. 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
<<
*truncate
Variables
except
29. A logical operator which compares two operands and produces True if they are equal and False otherwise
is not
.py
==
/=
30. Adds a new line character
=
n
a%b
**=
31. Argument variable
=
*write(stuff)
try
argv
32. Writes stuff to the file.
argv
def
and
*write(stuff)
33. modulo
**=
%s
a%b
read
34. unction to read one line of a file
print()
open()
readline
%r
35. Greater than symbol
=
|
>
insert()
36. assignment operator
abs(a)
int()
=
str
37. The keyword beginning a header that will create a loop.
math.sqrt(a)
del
for
return
38. prints its parameter to the console
+=
print()
read
*readline
39. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
int()
not
round()
~
40. Less than or equal to symbol
argument variable
<=
%
=
41. returns the length of a string (number of characters)
len()
.py
%r
%r
42. An operator that removes a value from a list.
else
n
del
==
43. Symbol to multiply things
^
*
/
Variables
44. Adds a new line character
%
%s
n
raise
45. Prevents a runtime error from stopping the program.
file.truncate()
>=
except
print()
46. turns an object into a string
str()
class
%=
//=
47. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
in
del
class
*write(stuff)
48. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
file.seek()
**=
try
abs(a)
49. exponentiation
a**b
a%b
input()
#
50. turns an object into an integer
not
int()
input()
==