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. exponent AND assignment operator
**=
if
+=
write
2. writes stuff to the file
file.write(stuff)
>
int()
*read
3. Adds something to a variable
=
<<
round()
int
4. Empties the file - watch out if you care about the file.
-=
%=
*truncate
^
5. Create a variable.
//=
argument variable
=
if
6. Modulus operator. It's the remainder after division
&
.py
is not
%
7. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
read
and
Variables
+=
8. add AND assignment operator
input()
len()
+=
file.truncate()
9. Less than symbol
<
<<
round()
argv
10. exponent AND assignment operator
%d
**=
=
pass
11. Symbol to add things together
n
+
file.truncate()
truncate
12. turns an object into an integer
*write(stuff)
not in
int()
def
13. reads just one line of a text file & keeps track of where in the file you're at
%s
file.readline()
+=
argument variable
14. Where the parameters go. A necessary punctuation after any function even if it's empty.
readline
<=
()
*readline
15. Function to empty the contents of a file - no recovery is possible
insert()
**=
truncate
argv
16. Command to print to the screen
=
len()
and
print
17. multiply AND assignment operator
**=
if
*=
append()
18. Function to empty the contents of a file - no recovery is possible
truncate
**=
readline
-
19. End header line.
insert()
:
*readline
%d
20. A logical operator which compares two operands and produces True if they are equal and False otherwise
argument variable
else
assignment
==
21. floor division
%r
>=
a//b
<=
22. Evaluates to true if it finds a variable in the specified sequence and false otherwise. x in y - here in results in a 1 if x is a member of sequence y.
truncate
in
insert()
raise
23. 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
a**b
/=
pass
>>
24. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
+
not in
int
:
25. Prints a string to the screen which is converted using repr()
n
%r
str
raise
26. The extension for Python scripts
insert()
%d
|
.py
27. asks the user for a response and returns that response
==
input()
>=
**=
28. unction to read one line of a file
abs(a)
readline
~
round()
29. deletes an item from a list
/=
=
not in
del
30. modulo
while
a%b
%
break
31. unction to read one line of a file
and
open()
*
readline
32. Modulus operator. It's the remainder after division
str()
&
assignment
%
33. Function to open or read a file
open()
in
math.sqrt(a)
and
34. turns an object into a string
()
*=
str()
*truncate
35. Symbol to multiply things
|
if
*
is
36. turns an object into a string
()
def
a**b
str()
37. Prints a string to the screen which will be Unicode.
truncate
%s
print()
int
38. ,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.
print
math.sqrt(a)
continue
39. divide AND assignment operator
del
/=
<=
+
40. sets the file's current position
*read
file.write(stuff)
*truncate
file.seek()
41. empties the file
a**b
file.truncate()
~
round()
42. Less than or equal to symbol
in
<=
#
open()
43. assignment operator
=
|
open()
%r
44. Symbol to subtract things from each other
-
~
*truncate
write
45. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
=
continue
~
str
46. Reads the contents of the file you can assign the result to a variable.
*read
insert()
n
>>
47. 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
*
^
>=
round()
48. The keyword beginning a header that will create a loop.
%s
file.seek()
~
for
49. This keyword in the body of a conditional - gives an alternative execution.
continue
else
-=
==
50. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
del
<=
|
*read