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. Reads just one line of a text file.
try
open()
*readline
>=
2. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
=
~
-
%=
3. Prevents a runtime error from stopping the program.
/=
input()
except
if
4. modulo
read
continue
a%b
%
5. Greater than symbol
>=
file.write(stuff)
>
write
6. exponent AND assignment operator
is
*truncate
int()
**=
7. Symbol to add things together
append()
+
=
open()
8. exponentiation
a**b
int
n
%d
9. sets the file's current position
+=
<<
str
file.seek()
10. Function to read the contents of a file
read
>=
-=
==
11. The keyword beginning a header that will create a loop.
math.sqrt(a)
for
%r
-
12. writes stuff to the file
file.write(stuff)
abs(a)
%
float
13. reads just one line of a text file & keeps track of where in the file you're at
%=
=
**=
file.readline()
14. modulus AND assignment operator
math.sqrt(a)
%=
else
+=
15. Prints a string to the screen which will be Unicode.
%s
|
float
+
16. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
*read
int
del
truncate
17. Greater than or equal symbol.
**=
#
class
>=
18. Symbol to multiply things
*
<<
print()
not
19. unction to read one line of a file
*write(stuff)
readline
argv
a%b
20. add AND assignment operator
>=
+=
-
<
21. Prints a string to the screen which is a signed decimal.
abs(a)
%d
|
elif (Else if)
22. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
readline
>=
*=
|
23. A statement that breaks out of a loop.
break
argument variable
write
write
24. assignment operator
>=
del
<
=
25. Argument variable
argv
.py
**=
round()
26. This keyword begins a header for a body that repeats until the condition is no longer true.
open()
int()
=
while
27. empties the file
file.truncate()
argv
*
len()
28. Symbol to multiply things
=
*
=
29. turns an object into a string
str()
Variables
file.truncate()
*truncate
30. Function to empty the contents of a file - no recovery is possible
is not
truncate
format string
>=
31. exponentiation
a**b
read
truncate
-=
32. Adds something to a variable
=
print()
in
def
33. absolute value
str
abs(a)
a//b
file.truncate()
34. Function to close a file - it will not be able to be used again unless the file is opened.
close
a**b
-
&
35. floor division AND assignment operator
floating point number
+=
//=
raise
36. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
%=
is not
~
*=
37. A keyword that does nothing but fill space to indicate code which will be written later.
pass
print
%s
=
38. Prints a string to the screen which will be Unicode.
insert()
**=
abs(a)
%s
39. add AND assignment operator
open()
while
+=
%=
40. Function to empty the contents of a file - no recovery is possible
a%b
if
truncate
len()
41. Less than symbol
file.write(stuff)
argument variable
<
round()
42. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
n
continue
=
class
43. subtract AND assignment operator
close
is
**=
-=
44. 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
>>
%r
str()
%s
45. adds an item to a list
*=
n
else
append()
46. turns an object into an integer
<<
int()
&
~
47. A logical operator which compares two operands and produces True if they are equal and False otherwise
>>
del
==
len()
48. Symbol to divide by the number to the right of the symbol
is not
/
%d
int()
49. prints its parameter to the console
#
print()
try
math.sqrt(a)
50. Function to open or read a file
open()
.py
n
if