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. turns an object into an integer
is not
a**b
open()
int()
2. modulus AND assignment operator
~
<
%=
<=
3. A built-in function that converts its argument to a string.
*write(stuff)
^
argv
str
4. Symbol used to create comments
#
%=
class
print()
5. returns the length of a string (number of characters)
open()
return
len()
%
6. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
insert()
elif (Else if)
=
Variables
7. subtract AND assignment operator
a**b
insert()
int
-=
8. turns an object into a string
del
str()
readline
print
9. Function to write something to a file
~
write
math.sqrt(a)
-
10. Symbol to divide by the number to the right of the symbol
<=
>=
/
+
11. multiply AND assignment operator
*=
del
except
write
12. Argument variable
:
<=
argv
>
13. asks the user for a response and returns that response
input()
%s
#
try
14. Create a variable.
=
append()
def
*=
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
=
//=
raise
>>
16. ,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
//=
class
17. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
*readline
-
Variables
18. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
file.readline()
and
if
*
19. The keyword beginning a header that will create a loop.
break
*truncate
print
for
20. modulo
**=
a%b
+=
len()
21. modulo
insert()
a%b
append()
else
22. floor division
a%b
abs(a)
%=
a//b
23. 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
^
truncate
and
<<
24. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
**=
except
format string
:
25. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
else
<<
>
class
26. Greater than or equal symbol.
for
%r
>=
truncate
27. adds an item to a list
return
continue
>
append()
28. Symbol to multiply things
write
^
print()
*
29. square root
math.sqrt(a)
a//b
=
+=
30. Adds a new line character
n
a%b
<
.py
31. Function to close a file - it will not be able to be used again unless the file is opened.
close
while
print()
is not
32. This keyword begins the simplest form of a conditional statement.
if
del
round()
print
33. rounds a number to the number of decimal points you choose
not in
round()
print()
*=
34. Adds a new line character
n
print()
file.write(stuff)
~
35. inserts an item inside a list at a certain index
insert()
for
format string
append()
36. This keyword in the body of a conditional - gives an alternative execution.
read
pass
else
in
37. The keyword beginning a header that will create a new function.
round()
def
-
>
38. floor division AND assignment operator
//=
str()
for
del
39. 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).
n
**=
-
is not
40. Less than or equal to symbol
*=
not
<=
insert()
41. prints its parameter to the console
def
.py
&
print()
42. deletes an item from a list
-=
truncate
int
del
43. turns an object into an integer
open()
readline
int()
|
44. Prints a string to the screen which is converted using repr()
file.seek()
%r
truncate
file.truncate()
45. A statement that displays a value on the screen.
/
file.write(stuff)
print
*=
46. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
try
*truncate
<<
input()
47. End header line.
pass
:
len()
not in
48. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
=
~
=
**=
49. assignment operator
and
.py
=
in
50. Less than symbol
return
#
<
/