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. 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
2. Prints a string to the screen which will be Unicode.
in
&
%s
try
3. 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
=
print
not
>>
4. A keyword that does nothing but fill space to indicate code which will be written later.
/=
pass
+
for
5. This keyword in the body of a conditional - gives an alternative execution.
Variables
else
==
**=
6. exponent AND assignment operator
%d
floating point number
~
**=
7. Less than or equal to symbol
<=
input()
:
pass
8. The keyword beginning a header that will create a new function.
def
<=
math.sqrt(a)
>=
9. A built-in function that converts integers and strings to floating-point numbers.
n
float
math.sqrt(a)
truncate
10. The keyword beginning a header that will create a loop.
read
:
for
def
11. A logical operator which requires two expressions to both be true.
round()
and
~
|
12. Prints a string to the screen which will be Unicode.
%s
pass
~
is
13. This keyword begins the simplest form of a conditional statement.
*truncate
if
print
float
14. Function to open or read a file
*read
~
open()
%s
15. Function to empty the contents of a file - no recovery is possible
argv
Variables
readline
truncate
16. turns an object into an integer
%r
int()
in
print
17. exponentiation
a**b
/
not
*read
18. deletes an item from a list
int
#
math.sqrt(a)
del
19. absolute value
argv
abs(a)
*
continue
20. add AND assignment operator
=
a**b
else
+=
21. square root
<<
math.sqrt(a)
%=
append()
22. inserts an item inside a list at a certain index
-=
=
insert()
break
23. assignment operator
-=
a//b
=
str()
24. Function to empty the contents of a file - no recovery is possible
%=
truncate
def
<<
25. Prints a string to the screen which is a signed decimal.
int
except
%d
readline
26. Command to print to the screen
else
round()
==
print
27. A logical operator which compares two operands and produces True if they are equal and False otherwise
insert()
math.sqrt(a)
break
==
28. Function to close a file - it will not be able to be used again unless the file is opened.
:
close
input()
print()
29. floor division
|
=
a//b
len()
30. Where the parameters go. A necessary punctuation after any function even if it's empty.
=
()
^
is
31. A logical operator which negates an expression so that it returns a value of True if the expression is false.
not
is
floating point number
%=
32. exponentiation
#
str()
+
a**b
33. multiply AND assignment operator
=
*=
argv
write
34. ,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.
open()
&
>
35. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
file.readline()
try
Variables
in
36. 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
>>
abs(a)
.py
/
37. Function to read the contents of a file
float
round()
read
readline
38. square root
math.sqrt(a)
abs(a)
def
print()
39. prints its parameter to the console
print()
+
if
()
40. Less than symbol
class
print
<
%=
41. subtract AND assignment operator
-=
&
print
^
42. Symbol to divide by the number to the right of the symbol
^
/
read
*=
43. adds an item to a list
break
del
=
append()
44. unction to read one line of a file
.py
open()
<
readline
45. Command to print to the screen
%r
floating point number
str()
print
46. absolute value
%=
<=
abs(a)
>
47. Adds something to a variable
#
=
//=
a//b
48. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
/
Variables
^
>
49. divide AND assignment operator
n
print
append()
/=
50. Symbol to subtract things from each other
print()
print
-
.py