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. Adds something to a variable
math.sqrt(a)
return
truncate
=
2. This keyword begins the simplest form of a conditional statement.
if
~
truncate
#
3. Function to empty the contents of a file - no recovery is possible
-
truncate
=
%s
4. A logical operator which requires two expressions to both be true.
and
<<
write
%=
5. End header line.
~
:
%
==
6. A keyword that does nothing but fill space to indicate code which will be written later.
^
print
pass
%d
7. Greater than symbol
is not
truncate
()
>
8. exponent AND assignment operator
return
abs(a)
**=
else
9. 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
>>
insert()
+=
:
10. Prints a string to the screen which is a signed decimal.
else
%d
+=
elif (Else if)
11. A statement that displays a value on the screen.
print
//=
^
()
12. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
del
write
&
13. Prints a string to the screen which will be Unicode.
%=
//=
<=
%s
14. divide AND assignment operator
abs(a)
except
/=
Variables
15. divide AND assignment operator
&
def
del
/=
16. Function to read the contents of a file
#
a%b
read
def
17. assignment operator
=
argv
input()
del
18. Adds a new line character
=
*
n
close
19. Greater than symbol
>
readline
*truncate
def
20. Where the parameters go. A necessary punctuation after any function even if it's empty.
continue
math.sqrt(a)
()
%s
21. unction to read one line of a file
Variables
a**b
readline
print
22. A built-in function that converts integers and strings to floating-point numbers.
float
+
del
readline
23. Function to empty the contents of a file - no recovery is possible
def
==
truncate
%r
24. exponentiation
readline
a**b
=
%
25. 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
&
%
26. subtract AND assignment operator
raise
len()
-=
except
27. Command to print to the screen
==
*
print
>
28. multiply AND assignment operator
-
argument variable
floating point number
*=
29. deletes an item from a list
close
float
len()
del
30. Reads the contents of the file you can assign the result to a variable.
*read
del
%=
<=
31. The keyword beginning a header that will create a loop.
for
<
write
class
32. Symbol to multiply things
print
<=
*
floating point number
33. Symbol used to create comments
#
+=
%s
a**b
34. floor division AND assignment operator
.py
=
//=
35. asks the user for a response and returns that response
print()
input()
~
#
36. modulo
a%b
-=
int()
37. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
not
in
a%b
>=
38. Adds a new line character
()
/=
%s
n
39. This statement causes an exception.
try
a//b
raise
>
40. ,multi-line comment hard-code,Fix (data or parameters) in a program in such a way that they cannot easily be altered by the user.
len()
*readline
~
41. subtract AND assignment operator
or
*=
-
-=
42. turns an object into a string
a//b
|
str()
<
43. This keyword in the body of a conditional allows chained conditionals.
&
elif (Else if)
*write(stuff)
=
44. Less than symbol
<
class
-
=
45. Argument variable
%s
=
argv
abs(a)
46. absolute value
len()
close
abs(a)
int
47. turns an object into a string
floating point number
a%b
str()
*=
48. Function to write something to a file
>>
close
abs(a)
write
49. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
#
math.sqrt(a)
len()
50. modulus AND assignment operator
a**b
#
len()
%=