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. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
open()
%d
and
>>
2. unction to read one line of a file
truncate
readline
/=
n
3. modulus AND assignment operator
math.sqrt(a)
%=
insert()
#
4. prints its parameter to the console
readline
print()
*readline
=
5. absolute value
>
argument variable
*=
abs(a)
6. rounds a number to the number of decimal points you choose
.py
round()
class
if
7. Prints a string to the screen which will be Unicode.
%r
insert()
is
%s
8. Adds a new line character
<=
n
insert()
%=
9. The keyword beginning a header that will create a new function.
>>
insert()
math.sqrt(a)
def
10. The keyword beginning a header that will create a new function.
file.seek()
def
//=
=
11. Adds something to a variable
=
^
insert()
len()
12. divide AND assignment operator
def
/=
%s
+=
13. deletes an item from a list
~
if
*
del
14. turns an object into an integer
>>
int()
:
for
15. End header line.
>
()
:
*
16. assignment operator
*truncate
=
<
truncate
17. 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
>
file.truncate()
^
raise
18. add AND assignment operator
%
and
if
+=
19. This keyword in the body of a conditional - gives an alternative execution.
<<
%s
else
=
20. modulus AND assignment operator
int()
%=
math.sqrt(a)
class
21. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
format string
insert()
file.truncate()
assignment
22. Symbol to multiply things
Variables
*
readline
^
23. Symbol to subtract things from each other
file.write(stuff)
*
-
round()
24. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
close
truncate
~
Variables
25. asks the user for a response and returns that response
Variables
append()
assignment
input()
26. Turns a line into a comment instead of executable code.
%r
==
#
del
27. A keyword that does nothing but fill space to indicate code which will be written later.
class
or
pass
continue
28. Prevents a runtime error from stopping the program.
except
while
is
a**b
29. Reads just one line of a text file.
*readline
/
write
*
30. subtract AND assignment operator
not in
-=
/
except
31. Argument variable
**=
not
argv
in
32. subtract AND assignment operator
=
readline
-=
*=
33. 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
^
write
open()
del
34. Less than symbol
if
return
<
is not
35. sets the file's current position
/
readline
file.seek()
.py
36. 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
del
>>
*=
%s
37. turns an object into a string
str()
=
=
del
38. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
/=
%=
try
^
39. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
//=
:
del
40. ,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.
truncate
/=
pass
41. Function to open or read a file
.py
a**b
open()
print()
42. A logical operator which negates an expression so that it returns a value of True if the expression is false.
-
not
|
<=
43. Greater than or equal symbol.
==
>=
file.truncate()
44. 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
>>
file.write(stuff)
append()
truncate
45. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
class
#
append()
readline
46. An operator that removes a value from a list.
math.sqrt(a)
del
pass
#
47. 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
try
is not
for
48. Function to write something to a file
n
insert()
file.write(stuff)
write
49. Prints a string to the screen which will be Unicode.
assignment
%=
%s
argument variable
50. adds an item to a list
str()
abs(a)
append()
a%b