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. assignment operator
=
abs(a)
while
^
2. 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
not in
<<
readline
/
3. divide AND assignment operator
read
/=
append()
argv
4. Binary XOR Operator copies the bit if it is set in one operand but not both. (a ^ b) will give 49 which is 0011 0001
is not
^
raise
while
5. square root
|
math.sqrt(a)
truncate
is not
6. reads just one line of a text file & keeps track of where in the file you're at
file.readline()
str()
class
/=
7. A built-in function that converts its argument to a string.
str
n
a**b
float
8. Symbol to multiply things
truncate
*truncate
open()
*
9. Symbol used to create comments
>>
continue
#
%r
10. floor division AND assignment operator
math.sqrt(a)
//=
format string
+
11. exponent AND assignment operator
truncate
#
insert()
**=
12. Greater than symbol
/=
>
floating point number
round()
13. Symbol used to create comments
#
int()
continue
elif (Else if)
14. Create a variable.
print
=
close
int()
15. Prints a string to the screen which is converted using repr()
%r
not
.py
|
16. A data type for representing numbers with fractional values.
len()
read
floating point number
for
17. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
in
%d
del
%s
18. The keyword beginning a header that will create a loop.
()
*
<
for
19. Function to read the contents of a file
input()
insert()
read
if
20. Adds a new line character
=
==
argument variable
n
21. Adds something to a variable
*truncate
=
def
a**b
22. End header line.
write
open()
input()
:
23. Command to print to the screen
~
del
in
print
24. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
^
|
argv
=
25. modulo
input()
+=
a%b
+
26. modulus AND assignment operator
%=
len()
^
for
27. A statement that assigns a value to a variable.
write
assignment
format string
print()
28. A logical operator which returns a value of True if either of the conditions is true.
truncate
format string
if
or
29. Greater than symbol
in
*
#
>
30. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
|
==
%
and
31. A statement that displays a value on the screen.
argv
append()
print
float
32. Less than or equal to symbol
*truncate
<=
str
%=
33. adds an item to a list
write
/
>=
append()
34. floor division
def
>>
*=
a//b
35. adds an item to a list
=
Variables
append()
and
36. absolute value
+=
def
~
abs(a)
37. A logical operator which requires two expressions to both be true.
*
for
or
and
38. Where the parameters go. A necessary punctuation after any function even if it's empty.
math.sqrt(a)
if
abs(a)
()
39. A logical operator which compares two operands and produces True if they are equal and False otherwise
>
==
truncate
#
40. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
/
try
=
41. prints its parameter to the console
/
print()
append()
=
42. The extension for Python scripts
int()
%d
str()
.py
43. asks the user for a response and returns that response
write
floating point number
file.seek()
input()
44. This statement causes an exception.
read
=
*
raise
45. Prints a string to the screen which will be Unicode.
del
del
argv
%s
46. Symbol to add things together
()
+
:
print
47. Function to write something to a file
file.readline()
write
*
**=
48. inserts an item inside a list at a certain index
^
insert()
=
%d
49. deletes an item from a list
del
readline
%s
class
50. Where the parameters go. A necessary punctuation after any function even if it's empty.
write
str()
()
a//b