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. Command to print to the screen
truncate
<=
n
print
2. inserts an item inside a list at a certain index
|
%r
insert()
not
3. writes stuff to the file
def
file.write(stuff)
Variables
-
4. A logical operator which returns a value of True if either of the conditions is true.
a**b
or
%d
is
5. absolute value
print()
abs(a)
a//b
a**b
6. inserts an item inside a list at a certain index
*
class
insert()
()
7. prints its parameter to the console
try
del
n
print()
8. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
~
a**b
<
and
9. A built-in function that converts its argument to a string.
-=
/=
str
for
10. Function to read the contents of a file
write
|
read
truncate
11. deletes an item from a list
.py
file.readline()
del
for
12. This keyword begins the simplest form of a conditional statement.
round()
//=
if
*truncate
13. square root
print
%=
open()
math.sqrt(a)
14. Symbol to multiply things
while
<
*
int()
15. This keyword in the body of a conditional - gives an alternative execution.
%=
argv
else
%s
16. floor division AND assignment operator
*readline
%d
//=
del
17. modulus AND assignment operator
==
%=
>>
18. Less than symbol
>=
<
is
-=
19. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
%s
=
+=
20. Symbol to add things together
a%b
+
read
n
21. Create a variable.
=
pass
else
**=
22. Prints a string to the screen which is converted using repr()
#
%r
//=
23. 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
or
>>
//=
readline
24. This keyword begins the simplest form of a conditional statement.
a%b
*truncate
*readline
if
25. Symbol to multiply things
*write(stuff)
+
*truncate
*
26. Prints a string to the screen which will be Unicode.
%s
append()
<=
while
27. Greater than or equal symbol.
.py
>=
len()
%s
28. This keyword in the body of a conditional allows chained conditionals.
:
raise
elif (Else if)
append()
29. Function to read the contents of a file
format string
file.seek()
a//b
read
30. sets the file's current position
+
-
==
file.seek()
31. Function to empty the contents of a file - no recovery is possible
*readline
%r
truncate
*=
32. A logical operator which negates an expression so that it returns a value of True if the expression is false.
print()
print
not
file.truncate()
33. exponent AND assignment operator
|
**=
<
-=
34. 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
print
+
^
Variables
35. 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
if
=
^
int
36. End header line.
a**b
>=
:
-=
37. exponentiation
format string
a**b
truncate
38. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
>>
/
|
-
39. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
/=
del
open()
try
40. The extension for Python scripts
.py
+
%
**=
41. rounds a number to the number of decimal points you choose
-
round()
a//b
str
42. Empties the file - watch out if you care about the file.
%s
format string
*truncate
input()
43. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
<<
continue
|
in
44. Where the parameters go. A necessary punctuation after any function even if it's empty.
#
()
in
&
45. Greater than or equal symbol.
readline
&
del
>=
46. assignment operator
print()
argument variable
break
=
47. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
%r
truncate
>
~
48. A logical operator which compares two operands and produces True if they are equal and False otherwise
str()
or
==
open()
49. add AND assignment operator
Variables
+=
elif (Else if)
=
50. floor division
/
n
()
a//b