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. Less than symbol
%
<
in
%r
2. 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
*read
**=
<<
~
3. Prints a string to the screen which will be Unicode.
~
n
*=
%s
4. The keyword beginning a header that will create a new function.
==
def
float
if
5. Reads the contents of the file you can assign the result to a variable.
del
print()
*read
math.sqrt(a)
6. adds an item to a list
append()
()
//=
.py
7. A built-in function that converts its argument to a string.
str
#
*truncate
else
8. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
%r
format string
=
input()
9. Prints a string to the screen which will be Unicode.
math.sqrt(a)
%s
~
#
10. floor division
a//b
>>
#
<
11. 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
<<
int()
*
12. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
Variables
a**b
=
>
13. absolute value
+
abs(a)
**=
and
14. Function to empty the contents of a file - no recovery is possible
<
==
insert()
truncate
15. Prints a string to the screen which is a signed decimal.
n
str()
int()
%d
16. adds an item to a list
print
abs(a)
append()
del
17. inserts an item inside a list at a certain index
argv
argv
in
insert()
18. writes stuff to the file
raise
truncate
~
file.write(stuff)
19. Less than or equal to symbol
n
argument variable
<=
>>
20. Symbol to multiply things
-
*
round()
/
21. This keyword in the body of a conditional allows chained conditionals.
a**b
%d
append()
elif (Else if)
22. turns an object into a string
readline
str()
except
return
23. Prints a string to the screen which is a signed decimal.
%d
append()
append()
Variables
24. modulo
raise
else
in
a%b
25. turns an object into a string
str()
%s
continue
a//b
26. The keyword beginning a header that will create a loop.
for
or
else
-
27. deletes an item from a list
%r
del
print
argument variable
28. multiply AND assignment operator
*=
print
truncate
=
29. divide AND assignment operator
-
+
truncate
/=
30. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
a//b
insert()
>>
in
31. Less than or equal to symbol
<=
|
class
insert()
32. 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
^
in
file.readline()
*
33. Greater than symbol
pass
a//b
>
%r
34. Function to write something to a file
/=
and
write
round()
35. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
try
-
append()
<<
36. A statement that breaks out of a loop.
%r
break
in
^
37. floor division AND assignment operator
//=
+=
Variables
%s
38. A logical operator which compares two operands and produces True if they are equal and False otherwise
#
==
:
str
39. Symbol to add things together
insert()
*write(stuff)
+
print()
40. exponent AND assignment operator
>=
**=
==
int()
41. Prints a string to the screen which is converted using repr()
open()
%s
>>
%r
42. Modulus operator. It's the remainder after division
try
%
del
=
43. empties the file
len()
del
print
file.truncate()
44. A logical operator which requires two expressions to both be true.
<<
del
and
-=
45. asks the user for a response and returns that response
#
print
input()
%r
46. Adds a new line character
:
n
elif (Else if)
close
47. Command to print to the screen
+
print
<=
write
48. An operator to check whether two variables refer to the same object.
is
-
str
abs(a)
49. modulus AND assignment operator
>>
%s
%=
open()
50. reads just one line of a text file & keeps track of where in the file you're at
>=
file.readline()
argv
except