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. Greater than symbol
is
>
=
*truncate
2. Turns a line into a comment instead of executable code.
#
<
%s
a**b
3. floor division
read
==
a//b
*truncate
4. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
a//b
*truncate
>>
5. Argument variable
write
argv
%=
open()
6. Greater than or equal symbol.
/
>=
while
7. This statement exits a function. The remaining lines of the function are not executed.
return
a//b
format string
-=
8. exponent AND assignment operator
<=
**=
in
not in
9. Adds a new line character
n
if
^
%d
10. Symbol to multiply things
del
readline
*
round()
11. A statement that ends the current iteration of a loop but continues looping.
format string
continue
^
len()
12. Symbol used to create comments
%s
#
|
=
13. Less than symbol
int()
else
not in
<
14. Prints a string to the screen which will be Unicode.
%s
%r
floating point number
truncate
15. Function to empty the contents of a file - no recovery is possible
>=
truncate
del
is
16. add AND assignment operator
file.truncate()
round()
+=
print
17. 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
>>
+=
+
print()
18. returns the length of a string (number of characters)
()
pass
input()
len()
19. floor division
a//b
close
int
=
20. 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
>>
a%b
input()
for
21. multiply AND assignment operator
%
while
len()
*=
22. 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
<<
if
/
insert()
23. The extension for Python scripts
&
.py
>
=
24. Reads just one line of a text file.
*readline
def
in
except
25. Symbol to divide by the number to the right of the symbol
write
/
+
int
26. End header line.
readline
%=
int()
:
27. 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.
a**b
write
not in
len()
28. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
+=
/=
a%b
&
29. absolute value
%r
%d
else
abs(a)
30. multiply AND assignment operator
==
file.truncate()
*=
>
31. divide AND assignment operator
/=
raise
%d
>>
32. prints its parameter to the console
print()
%s
<
is not
33. The keyword beginning a header that will create a new function.
elif (Else if)
try
Variables
def
34. unction to read one line of a file
%
readline
%d
is not
35. returns the length of a string (number of characters)
len()
insert()
>=
%r
36. 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).
is not
a%b
%r
continue
37. End header line.
:
<
del
class
38. modulo
:
%r
a%b
write
39. Symbol to add things together
=
abs(a)
+
close
40. The keyword beginning a header that will create a new function.
format string
append()
def
a**b
41. ,multi-line comment hard-code,Fix (data or parameters) in a program in such a way that they cannot easily be altered by the user.
insert()
int()
Variables
42. square root
math.sqrt(a)
%
int
=
43. Prevents a runtime error from stopping the program.
%=
int()
>
except
44. The keyword beginning a header that will create a loop.
%r
for
%s
append()
45. subtract AND assignment operator
%r
file.seek()
del
-=
46. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
|
a**b
break
return
47. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
int
if
insert()
|
48. A logical operator which negates an expression so that it returns a value of True if the expression is false.
%s
not
%s
print()
49. rounds a number to the number of decimal points you choose
~
str()
round()
//=
50. 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.
argument variable
<<
|
del