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 write something to a file
input()
write
%s
insert()
2. assignment operator
while
-=
=
n
3. rounds a number to the number of decimal points you choose
format string
round()
else
append()
4. unction to read one line of a file
//=
readline
%
//=
5. Evaluates to false if the variables on either side of the operator point to the same object and true otherwise. x is not y - here is not results in 1 if id(x) is not equal to id(y).
write
is not
>
file.seek()
6. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
:
|
float
Variables
7. single line comment
%s
#
*
and
8. An operator that removes a value from a list.
truncate
str
floating point number
del
9. exponent AND assignment operator
**=
file.truncate()
while
math.sqrt(a)
10. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
n
//=
&
else
11. Create a variable.
>
+
&
=
12. Modulus operator. It's the remainder after division
int()
read
%
+
13. Function to close a file - it will not be able to be used again unless the file is opened.
%r
^
close
>=
14. Symbol to multiply things
%d
%=
input()
*
15. The keyword beginning a header that will create a new function.
def
==
argv
*write(stuff)
16. Prints a string to the screen which is a signed decimal.
round()
%d
&
open()
17. sets the file's current position
str()
>>
file.seek()
print()
18. asks the user for a response and returns that response
()
print()
open()
input()
19. 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
is not
>>
open()
**=
20. Function to empty the contents of a file - no recovery is possible
truncate
/
math.sqrt(a)
argv
21. Symbol to divide by the number to the right of the symbol
/
Variables
input()
len()
22. subtract AND assignment operator
*=
-=
#
23. Less than or equal to symbol
<=
=
*=
#
24. Function to open or read a file
+
open()
()
write
25. This keyword in the body of a conditional - gives an alternative execution.
*=
readline
else
Variables
26. Less than symbol
**=
*
<
file.readline()
27. exponentiation
<<
*
a**b
28. This keyword begins the simplest form of a conditional statement.
if
*=
*=
%s
29. This statement causes an exception.
//=
if
raise
class
30. Where the parameters go. A necessary punctuation after any function even if it's empty.
a//b
-
()
=
31. floor division AND assignment operator
%
//=
del
32. An operator to check whether two variables refer to the same object.
elif (Else if)
is
/=
print()
33. Writes stuff to the file.
round()
*write(stuff)
~
truncate
34. A logical operator which returns a value of True if either of the conditions is true.
|
print()
or
n
35. Symbol to add things together
try
.py
+
%s
36. 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
-=
<<
>>
argv
37. This keyword in the body of a conditional - gives an alternative execution.
truncate
else
<=
.py
38. reads just one line of a text file & keeps track of where in the file you're at
int
-=
+
file.readline()
39. subtract AND assignment operator
read
*read
write
-=
40. exponentiation
#
#
a**b
is
41. absolute value
=
%=
print()
abs(a)
42. floor division
a//b
close
format string
print()
43. A built-in function that converts its argument to a string.
math.sqrt(a)
str
argv
/=
44. The extension for Python scripts
|
.py
for
**=
45. This keyword begins a header for a body that repeats until the condition is no longer true.
del
*read
/
while
46. Command to print to the screen
:
print
-=
int()
47. Greater than or equal symbol.
>=
open()
pass
==
48. Empties the file - watch out if you care about the file.
>
*truncate
len()
a**b
49. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
len()
int
and
except
50. unction to read one line of a file
a**b
int()
argv
readline