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. Less than or equal to symbol
<=
in
abs(a)
write
2. This keyword in the body of a conditional - gives an alternative execution.
else
*=
del
/=
3. floor division
round()
elif (Else if)
a//b
*write(stuff)
4. assignment operator
in
open()
=
math.sqrt(a)
5. An operator that removes a value from a list.
n
print
<
del
6. Symbol to divide by the number to the right of the symbol
str
%=
/
else
7. Empties the file - watch out if you care about the file.
+
truncate
readline
*truncate
8. returns the length of a string (number of characters)
.py
+
%s
len()
9. A statement that ends the current iteration of a loop but continues looping.
#
close
file.write(stuff)
continue
10. A built-in function that converts integers and strings to floating-point numbers.
+
math.sqrt(a)
read
float
11. returns the length of a string (number of characters)
try
len()
()
math.sqrt(a)
12. Adds a new line character
n
-
float
//=
13. A logical operator which compares two operands and produces True if they are equal and False otherwise
*readline
argv
==
is not
14. The keyword beginning a header that will create a new function.
**=
def
for
^
15. Modulus operator. It's the remainder after division
math.sqrt(a)
%
()
read
16. This statement exits a function. The remaining lines of the function are not executed.
a%b
<=
append()
return
17. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
()
%
try
<<
18. 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).
=
insert()
del
is not
19. Symbol to multiply things
*
-=
<<
*=
20. Function to close a file - it will not be able to be used again unless the file is opened.
math.sqrt(a)
def
close
for
21. Prints a string to the screen which will be Unicode.
is
%s
:
//=
22. This statement causes an exception.
%d
abs(a)
argv
raise
23. This keyword in the body of a conditional allows chained conditionals.
elif (Else if)
open()
a**b
input()
24. A built-in function that converts its argument to a string.
str
int
float
and
25. empties the file
file.truncate()
truncate
=
%r
26. Symbol used to create comments
#
input()
while
27. turns an object into an integer
class
int()
=
a%b
28. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
>=
<=
Variables
29. Command to print to the screen
print
pass
#
len()
30. 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.
**=
^
file.truncate()
in
31. Prints a string to the screen which is converted using repr()
%
<<
%r
=
32. Adds something to a variable
=
~
raise
if
33. Symbol used to create comments
#
=
else
truncate
34. Function to close a file - it will not be able to be used again unless the file is opened.
close
>>
write
35. square root
read
math.sqrt(a)
while
format string
36. Function to open or read a file
>>
open()
%
argv
37. A logical operator which negates an expression so that it returns a value of True if the expression is false.
truncate
not
#
write
38. A statement that assigns a value to a variable.
assignment
int
<<
print
39. A statement that displays a value on the screen.
argv
print
print()
str()
40. Prints a string to the screen which is a signed decimal.
()
%d
+
in
41. modulo
**=
a%b
>>
n
42. turns an object into a string
is
read
open()
str()
43. floor division AND assignment operator
close
//=
Variables
except
44. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
readline
a%b
file.readline()
45. Argument variable
open()
float
argv
46. rounds a number to the number of decimal points you choose
argument variable
#
round()
and
47. modulus AND assignment operator
^
def
%=
>>
48. This keyword begins a header for a body that repeats until the condition is no longer true.
while
+=
-
int
49. Symbol to divide by the number to the right of the symbol
float
&
^
/
50. adds an item to a list
n
append()
:
write