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. Where the parameters go. A necessary punctuation after any function even if it's empty.
/=
close
~
()
2. A built-in function that converts its argument to a string.
*
Variables
str
abs(a)
3. add AND assignment operator
for
~
+=
file.readline()
4. exponent AND assignment operator
**=
argv
<=
readline
5. Less than or equal to symbol
close
len()
>>
<=
6. 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
int()
>>
/=
Variables
7. Symbol to add things together
*=
round()
+
*
8. multiply AND assignment operator
()
*=
<<
len()
9. This keyword begins the simplest form of a conditional statement.
%
if
del
close
10. empties the file
file.truncate()
.py
is
Variables
11. A logical operator which requires two expressions to both be true.
=
in
and
>
12. unction to read one line of a file
try
close
read
readline
13. 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.
pass
print
argument variable
math.sqrt(a)
14. Symbol to divide by the number to the right of the symbol
/
/=
write
try
15. modulo
str()
>>
a%b
read
16. turns an object into an integer
append()
insert()
int()
floating point number
17. modulus AND assignment operator
%=
a//b
round()
continue
18. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
int
%s
>
*
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
&
abs(a)
except
file.readline()
20. returns the length of a string (number of characters)
-
**=
>
len()
21. Greater than or equal symbol.
>=
:
%r
while
22. Less than symbol
is
*readline
<
print
23. This keyword begins a header for a body that repeats until the condition is no longer true.
-=
while
=
print
24. 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
>>
+
<<
**=
25. 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.
#
#
format string
in
26. Symbol to multiply things
n
=
*
abs(a)
27. An operator to check whether two variables refer to the same object.
^
is
.py
file.write(stuff)
28. Greater than symbol
>
raise
for
/=
29. exponentiation
str()
print
a**b
<
30. turns an object into a string
and
append()
str()
pass
31. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
/
and
abs(a)
int()
32. 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
>>
%
%s
str
33. writes stuff to the file
abs(a)
file.write(stuff)
or
write
34. Symbol to add things together
in
str
+=
+
35. Where the parameters go. A necessary punctuation after any function even if it's empty.
-
int()
n
()
36. Prints a string to the screen which is a signed decimal.
*read
%d
int()
%
37. Prints a string to the screen which is a signed decimal.
/
%d
argv
<<
38. Function to open or read a file
open()
a//b
n
39. divide AND assignment operator
/=
math.sqrt(a)
a//b
class
40. square root
read
raise
math.sqrt(a)
def
41. This statement causes an exception.
print()
raise
readline
str()
42. Evaluates to true if it does not finds a variable in the specified sequence and false otherwise. x not in y - here not in results in a 1 if x is a member of sequence y.
**=
>=
not in
%
43. square root
argv
continue
|
math.sqrt(a)
44. Prevents a runtime error from stopping the program.
except
write
~
%
45. adds an item to a list
append()
#
&
|
46. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
<=
open()
%r
Variables
47. add AND assignment operator
str()
#
+=
format string
48. returns the length of a string (number of characters)
input()
del
len()
abs(a)
49. single line comment
>=
else
:
#
50. The keyword beginning a header that will create a new function.
write
Variables
def
append()