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
*write(stuff)
<
*=
append()
2. Greater than or equal symbol.
<<
>=
a**b
%d
3. turns an object into a string
=
^
+=
str()
4. assignment operator
close
=
abs(a)
:
5. modulo
~
**=
a%b
%=
6. Prints a string to the screen which will be Unicode.
>>
=
else
%s
7. exponentiation
%
class
a**b
**=
8. Modulus operator. It's the remainder after division
except
-=
%
and
9. A built-in function that converts its argument to a string.
str
read
>=
%=
10. Less than symbol
%
str()
int
<
11. A logical operator which requires two expressions to both be true.
:
print()
print
and
12. End header line.
not in
:
<=
except
13. Symbol to add things together
close
input()
+
14. assignment operator
>>
=
is not
15. floor division AND assignment operator
%s
raise
float
//=
16. Greater than symbol
>
readline
#
not
17. Evaluates to true if it does not finds a variable in the specified sequence and false otherwise. x not in y - here not in results in a 1 if x is a member of sequence y.
not in
=
try
a%b
18. Function to close a file - it will not be able to be used again unless the file is opened.
round()
close
+=
append()
19. modulus AND assignment operator
%=
=
:
//=
20. turns an object into a string
=
str()
%
.py
21. adds an item to a list
+=
a%b
if
append()
22. Function to read the contents of a file
<<
read
argument variable
*
23. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
^
print()
24. unction to read one line of a file
int
a//b
readline
:
25. Adds something to a variable
=
%r
if
^
26. This keyword in the body of a conditional allows chained conditionals.
elif (Else if)
is not
>>
assignment
27. Turns a line into a comment instead of executable code.
#
not
%s
del
28. floor division
a//b
insert()
def
and
29. Create a variable.
print
=
<<
-=
30. Function to open or read a file
else
*read
%s
open()
31. Greater than symbol
file.truncate()
elif (Else if)
close
>
32. A logical operator which compares two operands and produces True if they are equal and False otherwise
read
==
or
is not
33. A statement that breaks out of a loop.
in
break
append()
file.truncate()
34. rounds a number to the number of decimal points you choose
print
()
round()
>
35. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
print()
in
insert()
try
36. This statement exits a function. The remaining lines of the function are not executed.
truncate
a//b
return
append()
37. Reads just one line of a text file.
abs(a)
class
floating point number
*readline
38. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
%r
read
str()
int
39. Argument variable
open()
-
print
argv
40. exponentiation
a**b
print
del
close
41. Symbol to add things together
math.sqrt(a)
+
|
str()
42. 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
*truncate
^
for
43. The keyword beginning a header that will create a new function.
def
%s
close
continue
44. Writes stuff to the file.
*write(stuff)
else
Variables
a%b
45. 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
<<
if
*write(stuff)
file.truncate()
46. sets the file's current position
print()
*readline
file.seek()
n
47. This keyword begins a header for a body that repeats until the condition is no longer true.
round()
while
argv
abs(a)
48. floor division AND assignment operator
//=
or
()
-
49. writes stuff to the file
%
file.write(stuff)
open()
50. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
*=
float
|
a**b