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. A logical operator which compares two operands and produces True if they are equal and False otherwise
close
==
-=
a//b
2. exponent AND assignment operator
=
/=
in
**=
3. Less than or equal to symbol
int()
<
<=
n
4. prints its parameter to the console
print()
continue
#
<<
5. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
+=
a**b
>>
6. A statement that breaks out of a loop.
break
round()
/
assignment
7. modulo
%
not in
a%b
str()
8. Symbol to subtract things from each other
print
-
/
a**b
9. End header line.
a**b
open()
n
:
10. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
in
*
read
*=
11. inserts an item inside a list at a certain index
insert()
if
open()
int()
12. deletes an item from a list
Variables
del
close
|
13. returns the length of a string (number of characters)
file.readline()
break
%s
len()
14. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
=
try
*=
str()
15. This keyword begins the simplest form of a conditional statement.
%=
write
if
16. adds an item to a list
append()
class
break
/
17. add AND assignment operator
in
+=
<<
:
18. Argument variable
#
argv
*
def
19. Less than or equal to symbol
%d
<=
input()
&
20. square root
not in
%r
*read
math.sqrt(a)
21. Writes stuff to the file.
/
<<
*write(stuff)
=
22. A data type for representing numbers with fractional values.
floating point number
=
//=
Variables
23. sets the file's current position
%=
file.seek()
not
print
24. 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
and
#
assignment
25. asks the user for a response and returns that response
close
input()
%=
<
26. An operator that removes a value from a list.
//=
%
del
round()
27. A logical operator which requires two expressions to both be true.
<=
()
continue
and
28. rounds a number to the number of decimal points you choose
else
round()
~
elif (Else if)
29. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
>=
%d
print
format string
30. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
+=
for
**=
~
31. Modulus operator. It's the remainder after division
*
not in
%
|
32. exponentiation
a**b
int()
<
del
33. Prints a string to the screen which is converted using repr()
read
%r
a**b
-=
34. Turns a line into a comment instead of executable code.
not in
else
#
while
35. exponent AND assignment operator
+
input()
**=
try
36. floor division
a//b
if
|
<
37. Function to empty the contents of a file - no recovery is possible
truncate
argv
>>
*=
38. Greater than or equal symbol.
>=
print
else
==
39. asks the user for a response and returns that response
argument variable
input()
=
print
40. 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
+
=
>>
#
41. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
>=
else
|
>
42. turns an object into an integer
and
else
%r
int()
43. floor division AND assignment operator
a%b
**=
//=
assignment
44. Command to print to the screen
print
=
*truncate
%d
45. ,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.
open()
else
n
46. Function to read the contents of a file
%r
%r
read
del
47. This keyword begins a header for a body that repeats until the condition is no longer true.
while
write
len()
if
48. The keyword beginning a header that will create a loop.
.py
raise
for
read
49. Symbol to add things together
<=
+
*readline
not
50. floor division
a//b
class
Variables
truncate