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. multiply AND assignment operator
int()
*=
+=
def
2. square root
a%b
%
write
math.sqrt(a)
3. square root
float
math.sqrt(a)
close
//=
4. turns an object into an integer
int()
/
//=
*truncate
5. sets the file's current position
in
abs(a)
file.seek()
print
6. absolute value
*=
insert()
abs(a)
=
7. 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
=
%r
8. Function to write something to a file
write
append()
~
raise
9. Function to empty the contents of a file - no recovery is possible
%
raise
truncate
break
10. A logical operator which returns a value of True if either of the conditions is true.
or
+
<=
in
11. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
def
|
=
readline
12. unction to read one line of a file
str()
print
/=
readline
13. prints its parameter to the console
>=
append()
print()
.py
14. Evaluates to true if it does not finds a variable in the specified sequence and false otherwise. x not in y - here not in results in a 1 if x is a member of sequence y.
not in
del
truncate
for
15. Symbol to subtract things from each other
print
-
append()
else
16. Prevents a runtime error from stopping the program.
readline
del
<=
except
17. Function to close a file - it will not be able to be used again unless the file is opened.
*write(stuff)
del
#
close
18. Less than symbol
elif (Else if)
<<
<
19. The extension for Python scripts
/
print
.py
len()
20. multiply AND assignment operator
&
*=
%d
<
21. Argument variable
argv
=
*=
#
22. Function to read the contents of a file
read
floating point number
#
a%b
23. Reads just one line of a text file.
write
-
*readline
*write(stuff)
24. asks the user for a response and returns that response
*=
%s
input()
readline
25. Empties the file - watch out if you care about the file.
round()
%r
*truncate
or
26. Create a variable.
-
=
a//b
class
27. Function to empty the contents of a file - no recovery is possible
a**b
truncate
int()
del
28. absolute value
abs(a)
del
-
truncate
29. add AND assignment operator
<
int
+=
=
30. Adds something to a variable
while
|
=
a%b
31. asks the user for a response and returns that response
/
str()
if
input()
32. modulus AND assignment operator
insert()
%=
append()
|
33. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
+=
input()
open()
34. Symbol to multiply things
write
=
%r
*
35. add AND assignment operator
+=
%s
>
=
36. exponentiation
a**b
assignment
len()
continue
37. floor division
a//b
#
del
Variables
38. This keyword begins the simplest form of a conditional statement.
<=
if
not in
write
39. Writes stuff to the file.
*write(stuff)
or
>=
readline
40. modulo
a%b
or
in
file.write(stuff)
41. floor division AND assignment operator
>
>>
#
//=
42. floor division
*read
%=
else
a//b
43. This keyword in the body of a conditional - gives an alternative execution.
*truncate
else
len()
write
44. Where the parameters go. A necessary punctuation after any function even if it's empty.
write
()
str
=
45. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
del
&
truncate
n
46. Modulus operator. It's the remainder after division
abs(a)
%
()
>
47. Command to print to the screen
print
>
+
write
48. Symbol used to create comments
append()
while
int()
#
49. 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
()
while
<<
close
50. Greater than or equal symbol.
>=
:
file.seek()
+=