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. asks the user for a response and returns that response
+
input()
assignment
continue
2. inserts an item inside a list at a certain index
+
and
*write(stuff)
insert()
3. adds an item to a list
append()
()
#
else
4. Greater than or equal symbol.
Variables
except
#
>=
5. add AND assignment operator
<<
|
+=
*
6. A statement that assigns a value to a variable.
read
**=
assignment
a**b
7. Command to print to the screen
#
print
len()
format string
8. A logical operator which compares two operands and produces True if they are equal and False otherwise
Variables
append()
==
argv
9. Evaluates to true if it finds a variable in the specified sequence and false otherwise. x in y - here in results in a 1 if x is a member of sequence y.
is not
input()
in
file.truncate()
10. divide AND assignment operator
insert()
/=
else
file.truncate()
11. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
truncate
try
append()
:
12. The keyword beginning a header that will create a loop.
argument variable
*=
for
and
13. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
insert()
-
argument variable
14. prints its parameter to the console
**=
print()
truncate
class
15. Argument variable
#
write
else
argv
16. Reads just one line of a text file.
<
print
round()
*readline
17. absolute value
%d
n
float
abs(a)
18. The extension for Python scripts
continue
.py
|
str()
19. Command to print to the screen
except
raise
insert()
print
20. A built-in function that converts integers and strings to floating-point numbers.
==
float
Variables
a**b
21. 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
:
^
=
and
22. Function to close a file - it will not be able to be used again unless the file is opened.
-
*
close
del
23. End header line.
:
read
print
>
24. Function to read the contents of a file
n
/
#
read
25. A statement that displays a value on the screen.
*truncate
|
print
floating point number
26. empties the file
//=
-
file.truncate()
truncate
27. The keyword beginning a header that will create a loop.
print
for
-=
a**b
28. floor division AND assignment operator
assignment
/
input()
//=
29. Less than symbol
%
<
=
>=
30. asks the user for a response and returns that response
*truncate
input()
insert()
31. End header line.
print
a**b
:
assignment
32. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
Variables
|
insert()
round()
33. This keyword begins the simplest form of a conditional statement.
if
%=
<<
close
34. This statement exits a function. The remaining lines of the function are not executed.
return
file.seek()
not in
floating point number
35. Less than or equal to symbol
math.sqrt(a)
<=
-
=
36. Prints a string to the screen which is a signed decimal.
*read
%d
a%b
/
37. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
>>
^
try
&
38. Modulus operator. It's the remainder after division
%
print
a**b
in
39. A logical operator which requires two expressions to both be true.
=
else
and
insert()
40. Function to open or read a file
file.write(stuff)
%d
round()
open()
41. Symbol to subtract things from each other
%r
-
math.sqrt(a)
*=
42. floor division
.py
a//b
%=
-=
43. A logical operator which compares two operands and produces True if they are equal and False otherwise
#
if
not in
==
44. exponent AND assignment operator
>>
<=
**=
>>
45. 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
#
floating point number
>>
def
46. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
>
%s
str()
int
47. Symbol to divide by the number to the right of the symbol
~
a%b
/
48. turns an object into an integer
>>
int()
()
%
49. Less than or equal to symbol
<=
%d
>>
input()
50. modulo
a%b
*read
#
*=