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. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
Variables
break
a%b
close
2. Reads just one line of a text file.
if
*readline
return
#
3. Command to print to the screen
for
~
print
**=
4. Prints a string to the screen which is converted using repr()
//=
%r
read
truncate
5. Function to open or read a file
open()
readline
-
close
6. Function to close a file - it will not be able to be used again unless the file is opened.
del
%d
not in
close
7. 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).
%d
is not
insert()
abs(a)
8. This keyword begins a header for a body that repeats until the condition is no longer true.
while
math.sqrt(a)
math.sqrt(a)
*readline
9. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
continue
<=
=
10. This keyword in the body of a conditional - gives an alternative execution.
else
=
read
del
11. absolute value
format string
%=
abs(a)
-
12. Symbol used to create comments
readline
<=
<<
#
13. This keyword begins the simplest form of a conditional statement.
int
if
n
abs(a)
14. A built-in function that converts its argument to a string.
<<
str
>>
%r
15. assignment operator
/
>
=
readline
16. This keyword in the body of a conditional allows chained conditionals.
~
assignment
elif (Else if)
truncate
17. A logical operator which compares two operands and produces True if they are equal and False otherwise
-
==
**=
%s
18. exponent AND assignment operator
not
**=
truncate
insert()
19. Prints a string to the screen which is a signed decimal.
%d
else
file.truncate()
str()
20. Create a variable.
=
file.write(stuff)
for
if
21. inserts an item inside a list at a certain index
n
//=
insert()
else
22. absolute value
while
%=
abs(a)
%=
23. An operator to check whether two variables refer to the same object.
.py
for
is
<
24. The keyword beginning a header that will create a loop.
for
#
<
<<
25. Function to write something to a file
-
write
&
26. exponentiation
a**b
#
if
close
27. A statement that assigns a value to a variable.
for
class
math.sqrt(a)
assignment
28. deletes an item from a list
del
argument variable
.py
not
29. empties the file
input()
file.truncate()
n
%=
30. Less than or equal to symbol
~
**=
open()
<=
31. A statement that displays a value on the screen.
print
elif (Else if)
continue
truncate
32. A keyword that does nothing but fill space to indicate code which will be written later.
pass
^
*
elif (Else if)
33. Symbol to multiply things
|
:
close
*
34. floor division AND assignment operator
abs(a)
//=
/=
elif (Else if)
35. This statement exits a function. The remaining lines of the function are not executed.
>
file.truncate()
^
return
36. A built-in function that converts integers and strings to floating-point numbers.
^
while
~
float
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
write
read
&
append()
38. Function to empty the contents of a file - no recovery is possible
Variables
<
truncate
and
39. Greater than symbol
%=
int()
>
not in
40. This keyword in the body of a conditional - gives an alternative execution.
<=
else
int()
<<
41. Adds a new line character
file.seek()
n
readline
elif (Else if)
42. deletes an item from a list
:
read
str()
del
43. exponentiation
a**b
<<
file.write(stuff)
%
44. Argument variable
argv
%d
in
write
45. Symbol to add things together
>=
*readline
+
not in
46. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
for
|
%r
#
47. unction to read one line of a file
readline
open()
<
str()
48. Function to read the contents of a file
assignment
read
>>
float
49. A data type for representing numbers with fractional values.
a//b
%r
insert()
floating point number
50. multiply AND assignment operator
*=
print()
==
/=