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
def
open()
/=
=
2. 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
and
n
#
^
3. Command to print to the screen
a//b
|
print
=
4. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
|
*
str()
~
5. Function to empty the contents of a file - no recovery is possible
file.seek()
truncate
%s
input()
6. A keyword that does nothing but fill space to indicate code which will be written later.
pass
str
==
*=
7. Greater than or equal symbol.
truncate
>=
Variables
str
8. A statement that breaks out of a loop.
in
/=
break
#
9. Adds a new line character
n
>>
=
readline
10. This keyword begins the simplest form of a conditional statement.
if
/=
**=
insert()
11. Prevents a runtime error from stopping the program.
|
*
del
except
12. 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
<<
del
**=
+
13. prints its parameter to the console
pass
print()
str()
break
14. A logical operator which negates an expression so that it returns a value of True if the expression is false.
=
not
if
print
15. This statement causes an exception.
&
not
in
raise
16. Greater than or equal symbol.
>>
>=
insert()
=
17. This statement exits a function. The remaining lines of the function are not executed.
argv
return
#
%=
18. Symbol to add things together
<=
+
del
input()
19. 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
+
>>
>
/=
20. exponent AND assignment operator
**=
argv
format string
=
21. square root
%=
math.sqrt(a)
#
>>
22. asks the user for a response and returns that response
write
input()
%s
%d
23. 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
class
abs(a)
24. A built-in function that converts integers and strings to floating-point numbers.
print()
def
math.sqrt(a)
float
25. divide AND assignment operator
>
abs(a)
/=
%d
26. Prints a string to the screen which is converted using repr()
del
%r
except
int()
27. multiply AND assignment operator
*=
<<
<
n
28. The keyword beginning a header that will create a new function.
**=
<=
=
def
29. Prints a string to the screen which is a signed decimal.
%s
*truncate
*readline
%d
30. exponentiation
len()
print()
a**b
-=
31. Less than or equal to symbol
=
<=
assignment
#
32. writes stuff to the file
round()
file.write(stuff)
<
/
33. asks the user for a response and returns that response
def
%s
input()
return
34. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
del
format string
*
write
35. adds an item to a list
print
in
**=
append()
36. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
str()
not in
try
for
37. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
-
&
and
a%b
38. Less than or equal to symbol
<=
return
argv
file.readline()
39. sets the file's current position
=
input()
file.seek()
Variables
40. Symbol to divide by the number to the right of the symbol
in
/
Variables
return
41. Modulus operator. It's the remainder after division
int()
def
>>
%
42. A logical operator which compares two operands and produces True if they are equal and False otherwise
=
==
not in
assignment
43. square root
if
pass
math.sqrt(a)
in
44. absolute value
str()
abs(a)
<<
=
45. Argument variable
print()
else
readline
argv
46. 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
%d
float
input()
>>
47. deletes an item from a list
del
if
%s
.py
48. Function to close a file - it will not be able to be used again unless the file is opened.
del
close
/
print()
49. Less than symbol
<
del
n
read
50. A logical operator which returns a value of True if either of the conditions is true.
del
read
or
is not