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. Function to close a file - it will not be able to be used again unless the file is opened.
close
str()
a%b
%s
2. 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
#
-=
open()
>>
3. This keyword in the body of a conditional - gives an alternative execution.
and
else
del
=
4. square root
math.sqrt(a)
truncate
<
#
5. inserts an item inside a list at a certain index
%s
*=
insert()
int()
6. A logical operator which compares two operands and produces True if they are equal and False otherwise
<<
str
len()
==
7. adds an item to a list
append()
n
round()
8. Greater than or equal symbol.
>=
/
^
%s
9. Adds something to a variable
open()
close
=
for
10. Reads the contents of the file you can assign the result to a variable.
is
*read
print()
+
11. A logical operator which compares two operands and produces True if they are equal and False otherwise
+=
==
>
|
12. Command to print to the screen
#
pass
%=
print
13. exponentiation
append()
and
abs(a)
a**b
14. Function to write something to a file
except
round()
write
.py
15. 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
in
math.sqrt(a)
^
<<
16. Prints a string to the screen which is a signed decimal.
<
%d
%=
a%b
17. floor division AND assignment operator
continue
//=
input()
<
18. exponent AND assignment operator
**=
%r
|
append()
19. Command to print to the screen
except
/
floating point number
print
20. Function to empty the contents of a file - no recovery is possible
n
truncate
%=
del
21. Function to read the contents of a file
def
-
print
read
22. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
|
=
close
#
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
raise
%d
/
^
24. An operator to check whether two variables refer to the same object.
%s
is
>
math.sqrt(a)
25. Argument variable
#
^
argv
26. turns an object into an integer
Variables
int()
close
for
27. Greater than symbol
n
>
not in
**=
28. deletes an item from a list
<<
del
read
math.sqrt(a)
29. Function to close a file - it will not be able to be used again unless the file is opened.
**=
int
close
input()
30. divide AND assignment operator
**=
/=
#
>>
31. Less than symbol
#
==
+
<
32. floor division
Variables
open()
readline
a//b
33. single line comment
#
file.write(stuff)
assignment
Variables
34. A keyword that does nothing but fill space to indicate code which will be written later.
close
pass
print()
%d
35. prints its parameter to the console
int()
print()
write
close
36. 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
/=
.py
str()
37. modulo
%
>=
%=
a%b
38. A logical operator which returns a value of True if either of the conditions is true.
file.write(stuff)
<<
int()
or
39. asks the user for a response and returns that response
floating point number
insert()
input()
%=
40. A statement that assigns a value to a variable.
in
assignment
for
a%b
41. ,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.
file.seek()
>
n
42. The extension for Python scripts
.py
:
format string
not in
43. Greater than or equal symbol.
/
>=
argv
print
44. returns the length of a string (number of characters)
len()
a//b
a**b
#
45. This keyword begins a header for a body that repeats until the condition is no longer true.
%r
*readline
n
while
46. Writes stuff to the file.
a%b
=
print
*write(stuff)
47. subtract AND assignment operator
int()
^
raise
-=
48. A statement that ends the current iteration of a loop but continues looping.
n
continue
>=
/=
49. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
()
Variables
*
=
50. modulus AND assignment operator
%=
not in
<<
format string