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. Modulus operator. It's the remainder after division
int()
file.truncate()
or
%
2. Create a variable.
int
=
%=
abs(a)
3. Empties the file - watch out if you care about the file.
*readline
:
*truncate
write
4. floor division AND assignment operator
print()
%r
*
//=
5. Symbol used to create comments
elif (Else if)
*read
class
#
6. Prints a string to the screen which is converted using repr()
%r
=
class
n
7. Adds a new line character
for
*=
*=
n
8. Greater than or equal symbol.
>=
>>
round()
+
9. returns the length of a string (number of characters)
continue
if
<
len()
10. subtract AND assignment operator
for
-=
not
or
11. Function to close a file - it will not be able to be used again unless the file is opened.
print()
close
#
12. deletes an item from a list
len()
%d
and
del
13. modulus AND assignment operator
%=
=
in
else
14. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
print
not in
except
|
15. Greater than symbol
>
n
truncate
return
16. Create a variable.
break
%d
=
17. A keyword that does nothing but fill space to indicate code which will be written later.
pass
input()
*read
&
18. Command to print to the screen
print
~
=
>
19. Adds something to a variable
=
argument variable
str
truncate
20. Prints a string to the screen which is converted using repr()
%r
*=
>=
Variables
21. absolute value
**=
continue
abs(a)
read
22. An operator that removes a value from a list.
del
a%b
def
and
23. writes stuff to the file
file.write(stuff)
a%b
int()
in
24. square root
not in
math.sqrt(a)
open()
del
25. This keyword begins a header for a body that repeats until the condition is no longer true.
write
in
while
try
26. Where the parameters go. A necessary punctuation after any function even if it's empty.
print()
()
*
/=
27. A statement that displays a value on the screen.
print()
append()
float
print
28. unction to read one line of a file
#
&
%d
readline
29. End header line.
assignment
-
argv
:
30. multiply AND assignment operator
abs(a)
|
*=
break
31. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
:
argument variable
def
try
32. Symbol to multiply things
int()
append()
try
*
33. Turns a line into a comment instead of executable code.
-
%d
%r
#
34. Function to open or read a file
int()
open()
=
+
35. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
()
>
~
%r
36. A logical operator which requires two expressions to both be true.
del
if
and
=
37. modulo
while
str()
a%b
=
38. Reads just one line of a text file.
*readline
except
%s
39. adds an item to a list
append()
and
^
<
40. inserts an item inside a list at a certain index
append()
format string
insert()
argv
41. exponent AND assignment operator
elif (Else if)
**=
>
%
42. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
a**b
=
%r
Variables
43. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
abs(a)
int()
<<
format string
44. Function to open or read a file
open()
#
==
()
45. ,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.
n
~
>>
46. divide AND assignment operator
/=
Variables
print()
=
47. The keyword beginning a header that will create a loop.
int()
for
<
truncate
48. A statement that assigns a value to a variable.
<
assignment
-=
open()
49. A logical operator which negates an expression so that it returns a value of True if the expression is false.
%d
-=
not
-
50. Function to read the contents of a file
>
readline
read
is not