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.
*readline
n
%
%d
2. A built-in function that converts its argument to a string.
str
return
len()
=
3. assignment operator
=
insert()
raise
:
4. A statement that displays a value on the screen.
<=
print
input()
a**b
5. Function to open or read a file
open()
a%b
input()
Variables
6. Writes stuff to the file.
input()
*write(stuff)
open()
int()
7. asks the user for a response and returns that response
file.seek()
read
input()
raise
8. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
-=
del
%d
9. floor division AND assignment operator
//=
*read
*write(stuff)
file.write(stuff)
10. add AND assignment operator
abs(a)
#
+=
n
11. square root
math.sqrt(a)
>
del
%s
12. modulus AND assignment operator
append()
%=
append()
or
13. subtract AND assignment operator
-=
pass
continue
=
14. Argument variable
%r
>>
argv
and
15. Argument variable
math.sqrt(a)
n
argv
or
16. Greater than or equal symbol.
or
>=
input()
int
17. Symbol to add things together
+
not
else
%=
18. turns an object into an integer
in
open()
int()
in
19. The extension for Python scripts
break
.py
del
&
20. Turns a line into a comment instead of executable code.
break
^
//=
#
21. inserts an item inside a list at a certain index
insert()
a//b
*=
print
22. assignment operator
/
readline
=
format string
23. Command to print to the screen
else
pass
%=
print
24. A statement that ends the current iteration of a loop but continues looping.
abs(a)
truncate
open()
continue
25. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
/=
readline
*=
try
26. This keyword in the body of a conditional - gives an alternative execution.
else
%s
~
%
27. exponent AND assignment operator
*
()
>>
**=
28. This keyword begins the simplest form of a conditional statement.
>
try
<
if
29. Prints a string to the screen which will be Unicode.
*
<
%s
len()
30. Symbol used to create comments
#
print
except
str()
31. returns the length of a string (number of characters)
%d
len()
while
=
32. exponent AND assignment operator
**=
<
*write(stuff)
try
33. A keyword that does nothing but fill space to indicate code which will be written later.
a//b
float
pass
#
34. multiply AND assignment operator
*=
round()
if
&
35. Command to print to the screen
=
print
read
:
36. turns an object into a string
str()
def
/
=
37. returns the length of a string (number of characters)
a//b
*=
len()
==
38. A logical operator which negates an expression so that it returns a value of True if the expression is false.
not
print
if
*=
39. This statement causes an exception.
raise
-=
close
>
40. square root
math.sqrt(a)
#
%r
float
41. floor division
a//b
#
input()
math.sqrt(a)
42. prints its parameter to the console
try
print()
close
**=
43. add AND assignment operator
len()
//=
+=
a%b
44. Prints a string to the screen which is a signed decimal.
file.readline()
|
print
%d
45. writes stuff to the file
file.write(stuff)
*
<=
not
46. absolute value
|
=
abs(a)
float
47. Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand. a << 2 will give 240 which is 1111 0000
-
input()
*=
<<
48. An operator to check whether two variables refer to the same object.
is
except
n
%
49. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
assignment
else
readline
50. Adds something to a variable
>>
a**b
*read
=