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. Prevents a runtime error from stopping the program.
read
is not
except
in
2. Symbol to subtract things from each other
else
=
==
-
3. This keyword begins the simplest form of a conditional statement.
insert()
-
if
int
4. Symbol used to create comments
|
#
%d
%d
5. add AND assignment operator
class
print
+=
=
6. unction to read one line of a file
#
readline
is not
str()
7. Less than symbol
<
**=
%d
a%b
8. Create a variable.
str()
truncate
close
=
9. The extension for Python scripts
#
%s
%
.py
10. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
n
write
|
print
11. Greater than or equal symbol.
<=
file.readline()
%
>=
12. A statement that ends the current iteration of a loop but continues looping.
floating point number
return
continue
insert()
13. Less than or equal to symbol
int()
<=
=
<<
14. Command to print to the screen
%=
<
==
print
15. Modulus operator. It's the remainder after division
+=
%
while
print()
16. Adds a new line character
n
print()
def
del
17. Greater than or equal symbol.
abs(a)
^
>=
=
18. Greater than symbol
>
read
is
math.sqrt(a)
19. prints its parameter to the console
print()
close
file.readline()
*=
20. writes stuff to the file
a//b
file.write(stuff)
int()
for
21. A keyword that does nothing but fill space to indicate code which will be written later.
input()
append()
:
pass
22. 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).
/=
is not
close
*=
23. A logical operator which returns a value of True if either of the conditions is true.
==
/=
or
is not
24. The extension for Python scripts
.py
**=
file.seek()
#
25. prints its parameter to the console
%=
a//b
print()
write
26. 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.
close
Variables
not in
file.truncate()
27. 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
^
is not
/=
file.truncate()
28. Argument variable
argv
raise
%
&
29. 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
<<
==
continue
30. The keyword beginning a header that will create a new function.
%=
def
.py
input()
31. add AND assignment operator
.py
insert()
len()
+=
32. Function to write something to a file
a%b
del
write
input()
33. Function to read the contents of a file
int()
break
read
not in
34. Prints a string to the screen which is converted using repr()
a%b
>>
%r
35. turns an object into an integer
int()
=
&
=
36. single line comment
*=
close
elif (Else if)
#
37. floor division AND assignment operator
:
//=
a%b
and
38. sets the file's current position
()
file.seek()
/
~
39. A statement that displays a value on the screen.
print
str
#
//=
40. assignment operator
math.sqrt(a)
%
**=
=
41. Reads just one line of a text file.
print
*readline
**=
file.write(stuff)
42. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
in
%
|
Variables
43. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
#
if
del
format string
44. A logical operator which requires two expressions to both be true.
%=
readline
class
and
45. An operator that removes a value from a list.
int
del
file.truncate()
def
46. Prints a string to the screen which will be Unicode.
/=
+=
%s
argv
47. Function to empty the contents of a file - no recovery is possible
//=
else
truncate
for
48. This keyword in the body of a conditional - gives an alternative execution.
else
print
insert()
%=
49. adds an item to a list
abs(a)
append()
=
n
50. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
in
and
print()
del