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. assignment operator
file.truncate()
append()
insert()
=
2. writes stuff to the file
abs(a)
<
-=
file.write(stuff)
3. Prints a string to the screen which is a signed decimal.
or
file.readline()
%d
<<
4. Symbol to add things together
+
a//b
%
*=
5. A statement that breaks out of a loop.
and
#
break
file.seek()
6. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
and
int
pass
len()
7. 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
in
=
^
~
8. Prints a string to the screen which is converted using repr()
%d
%r
<
&
9. Prints a string to the screen which is converted using repr()
%r
=
<
open()
10. floor division
a//b
else
round()
/
11. unction to read one line of a file
>
file.write(stuff)
readline
elif (Else if)
12. Symbol used to create comments
<
#
for
abs(a)
13. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
floating point number
>=
/
14. subtract AND assignment operator
|
-=
readline
15. The keyword beginning a header that will create a new function.
argv
def
Variables
<=
16. The keyword beginning a header that will create a loop.
readline
input()
for
#
17. Less than or equal to symbol
and
.py
>=
<=
18. multiply AND assignment operator
floating point number
%d
=
*=
19. Greater than or equal symbol.
try
read
-=
>=
20. exponentiation
try
for
continue
a**b
21. The extension for Python scripts
/
.py
float
%r
22. Less than or equal to symbol
math.sqrt(a)
<=
append()
raise
23. This keyword begins the simplest form of a conditional statement.
>>
==
read
if
24. Function to empty the contents of a file - no recovery is possible
float
truncate
<=
|
25. Reads the contents of the file you can assign the result to a variable.
>>
round()
*read
-=
26. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
/=
class
print
round()
27. assignment operator
=
if
<<
()
28. modulus AND assignment operator
floating point number
%=
<<
not
29. divide AND assignment operator
readline
#
/=
print
30. Writes stuff to the file.
~
^
def
*write(stuff)
31. Adds a new line character
.py
>>
n
=
32. 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
while
and
>>
33. Command to print to the screen
#
:
and
print
34. Adds something to a variable
/
&
%=
=
35. exponentiation
n
int
a**b
except
36. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
*readline
Variables
^
floating point number
37. absolute value
file.seek()
abs(a)
+
or
38. A data type for representing numbers with fractional values.
floating point number
print
for
/=
39. add AND assignment operator
+=
n
insert()
del
40. A built-in function that converts its argument to a string.
str
len()
close
a%b
41. Argument variable
raise
argv
print()
in
42. Prints a string to the screen which will be Unicode.
insert()
pass
int
%s
43. End header line.
*=
==
**=
:
44. adds an item to a list
#
append()
=
file.seek()
45. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
==
del
%=
46. asks the user for a response and returns that response
input()
readline
-=
try
47. A keyword that does nothing but fill space to indicate code which will be written later.
==
pass
/=
=
48. reads just one line of a text file & keeps track of where in the file you're at
insert()
%r
#
file.readline()
49. Symbol to subtract things from each other
if
a//b
-
50. adds an item to a list
*truncate
=
:
append()