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. absolute value
-=
%
abs(a)
=
2. Symbol to subtract things from each other
print()
read
-
a%b
3. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
|
-=
readline
elif (Else if)
4. This statement exits a function. The remaining lines of the function are not executed.
()
==
return
+
5. turns an object into an integer
int()
len()
=
+=
6. Symbol to add things together
%d
+
%=
for
7. Prints a string to the screen which will be Unicode.
%s
try
<<
a//b
8. Less than or equal to symbol
:
<=
a%b
argv
9. A built-in function that converts its argument to a string.
str()
str
~
assignment
10. A logical operator which compares two operands and produces True if they are equal and False otherwise
/
print()
()
==
11. floor division
int
a//b
>=
del
12. This keyword begins the simplest form of a conditional statement.
def
if
and
**=
13. A keyword that does nothing but fill space to indicate code which will be written later.
pass
not
len()
else
14. returns the length of a string (number of characters)
len()
-=
>
while
15. Create a variable.
#
math.sqrt(a)
=
in
16. unction to read one line of a file
readline
append()
>=
print()
17. Adds a new line character
n
%=
continue
read
18. End header line.
*read
int
float
:
19. floor division
a//b
~
not in
20. Prints a string to the screen which will be Unicode.
def
except
%s
file.truncate()
21. sets the file's current position
file.seek()
file.write(stuff)
except
a//b
22. A statement that ends the current iteration of a loop but continues looping.
readline
<=
continue
*write(stuff)
23. turns an object into a string
|
str()
print
%s
24. Greater than symbol
return
>
argv
%
25. Create a variable.
and
write
=
|
26. A built-in function that converts integers and strings to floating-point numbers.
*
is not
insert()
float
27. exponentiation
a**b
#
*read
n
28. subtract AND assignment operator
>=
-=
.py
return
29. The extension for Python scripts
.py
raise
>
<=
30. Empties the file - watch out if you care about the file.
readline
not
*truncate
read
31. Where the parameters go. A necessary punctuation after any function even if it's empty.
>=
pass
format string
()
32. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
break
#
str()
&
33. Greater than or equal symbol.
int
insert()
>=
open()
34. Argument variable
argv
Variables
pass
|
35. empties the file
truncate
insert()
file.truncate()
a**b
36. inserts an item inside a list at a certain index
file.truncate()
*read
file.write(stuff)
insert()
37. multiply AND assignment operator
*=
write
floating point number
=
38. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
<=
~
a**b
int
39. 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
-
/
=
^
40. modulo
print
n
del
a%b
41. Symbol to multiply things
class
*
try
^
42. Modulus operator. It's the remainder after division
%
*write(stuff)
**=
break
43. Command to print to the screen
%r
-
|
print
44. Greater than or equal symbol.
-=
=
>>
>=
45. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
try
%
n
%s
46. 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
=
argv
<=
47. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
print()
|
~
print
48. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
*truncate
class
#
input()
49. Greater than symbol
==
.py
<=
>
50. divide AND assignment operator
len()
close
/=
.py