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. prints its parameter to the console
a**b
print()
return
break
2. adds an item to a list
append()
format string
<=
=
3. Function to empty the contents of a file - no recovery is possible
str()
*=
str
truncate
4. Greater than or equal symbol.
def
write
>=
not
5. 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
^
=
int
|
6. Greater than or equal symbol.
except
readline
>=
*readline
7. inserts an item inside a list at a certain index
/=
insert()
//=
/
8. The keyword beginning a header that will create a new function.
%=
not in
def
.py
9. returns the length of a string (number of characters)
len()
#
if
str()
10. A logical operator which requires two expressions to both be true.
:
#
and
#
11. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
print
argv
/=
~
12. exponentiation
a**b
a//b
*=
else
13. Function to read the contents of a file
#
read
%d
while
14. Prints a string to the screen which will be Unicode.
>>
=
%s
argv
15. 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
&
%s
readline
>>
16. floor division AND assignment operator
//=
-=
-=
file.readline()
17. asks the user for a response and returns that response
-=
|
if
input()
18. Adds a new line character
n
insert()
>>
math.sqrt(a)
19. 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
%
()
20. Command to print to the screen
truncate
in
**=
print
21. Function to close a file - it will not be able to be used again unless the file is opened.
readline
//=
close
abs(a)
22. Greater than symbol
>
<=
print
del
23. A logical operator which compares two operands and produces True if they are equal and False otherwise
*=
^
<=
==
24. inserts an item inside a list at a certain index
%
raise
insert()
>=
25. multiply AND assignment operator
:
else
*=
>
26. The keyword beginning a header that will create a new function.
def
not
argument variable
%r
27. assignment operator
=
/=
<
*=
28. A logical operator which returns a value of True if either of the conditions is true.
#
n
or
+=
29. deletes an item from a list
del
round()
class
a%b
30. Argument variable
file.truncate()
insert()
argv
len()
31. turns an object into an integer
int()
round()
write
==
32. Prints a string to the screen which will be Unicode.
>>
for
%s
^
33. A statement that breaks out of a loop.
break
print()
:
open()
34. modulus AND assignment operator
assignment
int
if
%=
35. unction to read one line of a file
readline
-=
=
else
36. This statement causes an exception.
Variables
raise
%r
37. Less than symbol
>
&
math.sqrt(a)
<
38. A built-in function that converts integers and strings to floating-point numbers.
*truncate
float
>>
a%b
39. Reads the contents of the file you can assign the result to a variable.
*read
:
+=
**=
40. Create a variable.
%=
=
len()
~
41. An operator that removes a value from a list.
a//b
input()
del
+
42. rounds a number to the number of decimal points you choose
a//b
round()
**=
/=
43. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
:
|
.py
print()
44. exponent AND assignment operator
#
class
for
**=
45. A logical operator which negates an expression so that it returns a value of True if the expression is false.
file.truncate()
and
%=
not
46. Symbol to divide by the number to the right of the symbol
int()
/
int
print
47. Reads just one line of a text file.
except
#
*readline
is not
48. Command to print to the screen
#
str()
break
print
49. turns an object into a string
close
str()
*write(stuff)
append()
50. Create a variable.
<
+
=
try