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. divide AND assignment operator
+
<
/=
is
2. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
except
break
%=
&
3. subtract AND assignment operator
=
append()
pass
-=
4. assignment operator
&
=
+=
*read
5. 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.
in
while
<=
file.readline()
6. This keyword in the body of a conditional - gives an alternative execution.
else
round()
a//b
.py
7. 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.
*truncate
not in
+=
str()
8. A data type for representing numbers with fractional values.
floating point number
=
str()
continue
9. Argument variable
argv
=
is not
>=
10. A statement that breaks out of a loop.
assignment
break
==
*write(stuff)
11. Symbol to divide by the number to the right of the symbol
truncate
/
append()
<<
12. 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).
#
or
is not
readline
13. 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
file.write(stuff)
~
*truncate
<<
14. turns an object into an integer
()
|
int()
>>
15. square root
math.sqrt(a)
in
:
open()
16. divide AND assignment operator
write
and
>
/=
17. The extension for Python scripts
#
=
+=
.py
18. Reads the contents of the file you can assign the result to a variable.
a//b
math.sqrt(a)
*read
<<
19. unction to read one line of a file
*=
readline
abs(a)
~
20. prints its parameter to the console
print()
>
is not
abs(a)
21. Symbol to divide by the number to the right of the symbol
/
*=
round()
~
22. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
del
+=
|
=
23. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
insert()
if
int()
&
24. Writes stuff to the file.
*write(stuff)
open()
append()
read
25. Function to open or read a file
/
=
for
open()
26. floor division
len()
a//b
:
<
27. modulo
a%b
insert()
int()
Variables
28. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
floating point number
in
|
*
29. turns an object into a string
.py
#
str()
assignment
30. End header line.
*read
:
#
format string
31. assignment operator
>
open()
=
not in
32. A logical operator which negates an expression so that it returns a value of True if the expression is false.
-=
not
file.write(stuff)
=
33. adds an item to a list
is not
file.truncate()
append()
def
34. Create a variable.
~
insert()
*truncate
=
35. add AND assignment operator
>=
*
try
+=
36. Function to write something to a file
a%b
format string
write
37. Prints a string to the screen which will be Unicode.
%s
write
a//b
read
38. multiply AND assignment operator
truncate
+
*=
while
39. An operator that removes a value from a list.
argument variable
#
del
()
40. Less than or equal to symbol
input()
<=
float
**=
41. 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
|
and
.py
42. deletes an item from a list
def
del
%d
str()
43. Function to open or read a file
^
<=
open()
argv
44. returns the length of a string (number of characters)
print()
or
len()
del
45. floor division AND assignment operator
*
%s
//=
file.truncate()
46. Prints a string to the screen which is converted using repr()
:
read
truncate
%r
47. A logical operator which requires two expressions to both be true.
%=
%
=
and
48. Prints a string to the screen which is a signed decimal.
**=
%d
not in
49. This statement causes an exception.
|
raise
/=
input()
50. returns the length of a string (number of characters)
Variables
len()
print()
//=