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. End header line.
a%b
file.write(stuff)
:
file.seek()
2. multiply AND assignment operator
continue
in
*=
Variables
3. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
Variables
round()
in
#
4. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
class
*truncate
argument variable
5. Modulus operator. It's the remainder after division
%
format string
append()
not
6. Function to write something to a file
continue
round()
and
write
7. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
and
int()
&
8. Greater than symbol
print
>
>>
*=
9. Adds a new line character
n
floating point number
argv
write
10. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
.py
%=
in
for
11. Where the parameters go. A necessary punctuation after any function even if it's empty.
%=
readline
^
()
12. Symbol to subtract things from each other
round()
and
-
del
13. The keyword beginning a header that will create a loop.
not
round()
abs(a)
for
14. square root
=
%
try
math.sqrt(a)
15. This keyword begins the simplest form of a conditional statement.
if
=
&
int()
16. adds an item to a list
*
try
append()
format string
17. Function to read the contents of a file
read
while
~
append()
18. divide AND assignment operator
break
~
**=
/=
19. modulo
a%b
input()
del
argv
20. Symbol to subtract things from each other
*=
float
-
if
21. Less than symbol
print
<
and
-=
22. The keyword beginning a header that will create a new function.
is
<<
def
+
23. Less than symbol
+
<
argv
not
24. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
input()
=
assignment
and
25. Adds something to a variable
str()
read
^
=
26. Argument variable
print()
+
argv
or
27. Prevents a runtime error from stopping the program.
int
except
for
abs(a)
28. turns an object into a string
continue
~
str()
read
29. This keyword begins a header for a body that repeats until the condition is no longer true.
a**b
*readline
==
while
30. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
argv
|
str()
a//b
31. turns an object into a string
+=
for
file.seek()
str()
32. Function to close a file - it will not be able to be used again unless the file is opened.
**=
float
abs(a)
close
33. modulus AND assignment operator
*
def
%=
print
34. Command to print to the screen
<
<<
print
len()
35. 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.
+=
format string
in
.py
36. divide AND assignment operator
>
/=
*=
del
37. single line comment
#
~
in
not
38. Adds something to a variable
#
=
%
for
39. A logical operator which requires two expressions to both be true.
for
floating point number
Variables
and
40. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
abs(a)
**=
&
%
41. Function to empty the contents of a file - no recovery is possible
not
truncate
+=
abs(a)
42. exponent AND assignment operator
**=
*
==
Variables
43. Turns a line into a comment instead of executable code.
argument variable
#
argv
str()
44. inserts an item inside a list at a certain index
Variables
insert()
except
#
45. exponentiation
argv
#
for
a**b
46. prints its parameter to the console
print()
print
in
.py
47. Prints a string to the screen which is converted using repr()
==
>>
%r
floating point number
48. Prints a string to the screen which is converted using repr()
+
-=
&
%r
49. floor division AND assignment operator
//=
<=
open()
+=
50. add AND assignment operator
+=
*read
-
read