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. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
%
&
/=
()
2. This keyword in the body of a conditional allows chained conditionals.
%s
%s
//=
elif (Else if)
3. The keyword beginning a header that will create a loop.
+
//=
for
round()
4. Greater than or equal symbol.
>=
=
is not
*readline
5. rounds a number to the number of decimal points you choose
=
%=
**=
round()
6. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
%d
:
<<
Variables
7. Prints a string to the screen which will be Unicode.
^
del
==
%s
8. Function to write something to a file
continue
format string
write
>=
9. floor division AND assignment operator
//=
>>
def
assignment
10. The keyword beginning a header that will create a new function.
def
~
**=
insert()
11. modulo
*readline
a%b
if
<=
12. The keyword beginning a header that will create a loop.
for
**=
while
<
13. Symbol used to create comments
#
^
%=
truncate
14. subtract AND assignment operator
close
len()
-=
int()
15. This statement causes an exception.
pass
raise
>>
if
16. Symbol to multiply things
%s
*
write
%
17. asks the user for a response and returns that response
input()
-=
a%b
/=
18. turns an object into a string
str()
=
>>
del
19. Modulus operator. It's the remainder after division
*
*readline
%
str()
20. Function to empty the contents of a file - no recovery is possible
else
/
truncate
str
21. unction to read one line of a file
class
%=
~
readline
22. Symbol to multiply things
>
else
*
>=
23. An operator to check whether two variables refer to the same object.
n
and
^
is
24. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
class
a**b
~
-
25. divide AND assignment operator
int()
/=
<<
<=
26. floor division
a//b
=
str()
==
27. 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).
input()
()
<=
is not
28. Symbol to add things together
round()
else
%
+
29. deletes an item from a list
.py
del
//=
>
30. Prints a string to the screen which is converted using repr()
insert()
%r
#
def
31. 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.
+
insert()
argument variable
break
32. The extension for Python scripts
%=
raise
.py
readline
33. A logical operator which returns a value of True if either of the conditions is true.
or
:
input()
del
34. absolute value
else
abs(a)
if
is
35. assignment operator
=
-
#
/
36. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
and
math.sqrt(a)
%s
==
37. single line comment
file.seek()
#
close
a**b
38. Where the parameters go. A necessary punctuation after any function even if it's empty.
argument variable
:
()
for
39. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
*write(stuff)
=
format string
//=
40. Less than symbol
input()
=
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.
for
==
try
42. A built-in function that converts integers and strings to floating-point numbers.
#
elif (Else if)
float
int()
43. Adds something to a variable
%r
argv
=
#
44. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
%d
abs(a)
**=
~
45. Less than or equal to symbol
try
print
:
<=
46. Function to open or read a file
()
input()
raise
open()
47. Less than symbol
print()
while
<
>
48. rounds a number to the number of decimal points you choose
is
round()
=
==
49. Function to read the contents of a file
read
except
//=
-
50. The extension for Python scripts
-
n
.py
print