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. Prints a string to the screen which will be Unicode.
%=
%s
abs(a)
:
2. multiply AND assignment operator
continue
def
input()
*=
3. This keyword in the body of a conditional - gives an alternative execution.
input()
argument variable
else
>
4. Symbol to subtract things from each other
str()
-
+
//=
5. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
-
>=
Variables
if
6. subtract AND assignment operator
-=
%=
a%b
and
7. A logical operator which returns a value of True if either of the conditions is true.
*read
pass
truncate
or
8. This statement causes an exception.
%=
<
raise
open()
9. Argument variable
def
argv
break
continue
10. Modulus operator. It's the remainder after division
%
/
&
round()
11. This variable holds the arguments you pass to your Python script when you run it. Then you unpack it in your script so you have variables you can work with.
str()
is not
argument variable
append()
12. The keyword beginning a header that will create a new function.
file.readline()
%
Variables
def
13. The keyword beginning a header that will create a new function.
else
+=
.py
def
14. A keyword that does nothing but fill space to indicate code which will be written later.
input()
pass
~
>>
15. Adds something to a variable
floating point number
=
^
elif (Else if)
16. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
file.truncate()
.py
is not
try
17. absolute value
or
abs(a)
=
+
18. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
del
print
*=
19. inserts an item inside a list at a certain index
insert()
:
abs(a)
*=
20. Less than or equal to symbol
float
if
<=
n
21. Symbol to divide by the number to the right of the symbol
=
<<
%=
/
22. reads just one line of a text file & keeps track of where in the file you're at
argv
else
file.readline()
*read
23. Less than symbol
<
//=
<=
.py
24. add AND assignment operator
+=
float
argument variable
%r
25. turns an object into a string
read
#
>=
str()
26. Function to close a file - it will not be able to be used again unless the file is opened.
>>
%=
close
+
27. Adds a new line character
abs(a)
if
n
a%b
28. single line comment
#
int
<
*read
29. prints its parameter to the console
print()
<=
for
.py
30. Command to print to the screen
and
print
<
=
31. asks the user for a response and returns that response
pass
:
**=
input()
32. This keyword begins a header for a body that repeats until the condition is no longer true.
continue
%
else
while
33. rounds a number to the number of decimal points you choose
>
while
round()
assignment
34. adds an item to a list
*truncate
*=
if
append()
35. Empties the file - watch out if you care about the file.
print()
a%b
*truncate
//=
36. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
<<
.py
if
~
37. exponentiation
a**b
%s
append()
math.sqrt(a)
38. turns an object into an integer
*
%s
int()
a//b
39. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
except
^
readline
and
40. asks the user for a response and returns that response
input()
print()
=
//=
41. inserts an item inside a list at a certain index
a//b
round()
insert()
floating point number
42. exponent AND assignment operator
**=
argv
input()
def
43. Function to open or read a file
file.seek()
readline
/=
open()
44. unction to read one line of a file
n
#
<
readline
45. A data type for representing numbers with fractional values.
>
+
floating point number
<<
46. Symbol to add things together
for
Variables
+
del
47. Prints a string to the screen which will be Unicode.
elif (Else if)
%r
%s
a**b
48. A statement that displays a value on the screen.
argv
a%b
print
in
49. Less than or equal to symbol
%
|
<=
len()
50. A statement that ends the current iteration of a loop but continues looping.
open()
continue
in
%r