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. Function to close a file - it will not be able to be used again unless the file is opened.
close
a%b
format string
*readline
2. Symbol to subtract things from each other
while
print
del
-
3. Symbol to multiply things
=
argv
*
%=
4. Turns a line into a comment instead of executable code.
#
print
<=
return
5. An operator to check whether two variables refer to the same object.
def
while
read
is
6. Prints a string to the screen which is converted using repr()
except
.py
%r
open()
7. absolute value
*read
input()
abs(a)
a**b
8. The keyword beginning a header that will create a new function.
format string
def
float
a//b
9. assignment operator
|
|
n
=
10. A statement that displays a value on the screen.
print
=
<=
or
11. Greater than symbol
write
>
%d
float
12. Reads the contents of the file you can assign the result to a variable.
+
*read
print
print
13. inserts an item inside a list at a certain index
in
insert()
**=
%=
14. Create a variable.
floating point number
write
*truncate
=
15. add AND assignment operator
==
+=
#
str()
16. Function to close a file - it will not be able to be used again unless the file is opened.
close
*readline
=
math.sqrt(a)
17. Symbol to add things together
readline
<<
+
*truncate
18. Evaluates to false if the variables on either side of the operator point to the same object and true otherwise. x is not y - here is not results in 1 if id(x) is not equal to id(y).
a//b
readline
is not
/=
19. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
%d
>=
&
append()
20. empties the file
del
.py
n
file.truncate()
21. This keyword begins a header for a body that repeats until the condition is no longer true.
while
//=
str()
*readline
22. adds an item to a list
argv
append()
file.write(stuff)
write
23. The extension for Python scripts
^
.py
a%b
print
24. modulo
truncate
file.write(stuff)
=
a%b
25. A logical operator which returns a value of True if either of the conditions is true.
.py
n
or
class
26. floor division AND assignment operator
readline
//=
~
print()
27. modulo
if
def
del
a%b
28. Symbol to subtract things from each other
elif (Else if)
-
write
file.write(stuff)
29. Argument variable
argv
n
*write(stuff)
str()
30. End header line.
:
+=
for
-
31. asks the user for a response and returns that response
or
=
input()
int()
32. single line comment
~
truncate
#
return
33. exponent AND assignment operator
**=
print
^
open()
34. Function to write something to a file
is
write
insert()
read
35. deletes an item from a list
//=
%s
a//b
del
36. Less than symbol
*
<
%s
>
37. Symbol to divide by the number to the right of the symbol
%d
def
/
**=
38. Writes stuff to the file.
%s
*write(stuff)
int
//=
39. Symbol to multiply things
>
open()
not
*
40. End header line.
-=
:
/
-
41. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
while
class
%
*=
42. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
//=
or
and
math.sqrt(a)
43. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
raise
insert()
write
try
44. 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.
in
=
insert()
45. multiply AND assignment operator
*
argument variable
len()
*=
46. Command to print to the screen
truncate
print
//=
-=
47. turns an object into a string
str()
print()
%
<
48. divide AND assignment operator
close
<=
/=
+
49. This keyword begins the simplest form of a conditional statement.
if
round()
>>
%s
50. divide AND assignment operator
&
is not
/=
>=