SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
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. A logical operator which compares two operands and produces True if they are equal and False otherwise
print
==
n
class
2. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
floating point number
del
abs(a)
Variables
3. Symbol used to create comments
return
print()
str()
#
4. modulus AND assignment operator
%=
//=
+
()
5. Create a variable.
^
=
==
abs(a)
6. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
a//b
&
*truncate
#
7. A logical operator which returns a value of True if either of the conditions is true.
or
del
()
truncate
8. floor division AND assignment operator
**=
a//b
>>
//=
9. unction to read one line of a file
print
/=
readline
def
10. A statement that assigns a value to a variable.
<<
read
assignment
:
11. Adds a new line character
=
return
#
n
12. prints its parameter to the console
*truncate
%=
print()
and
13. prints its parameter to the console
n
print()
str
:
14. The keyword beginning a header that will create a loop.
for
=
<=
else
15. 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
print()
append()
^
abs(a)
16. 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
>>
//=
argv
%s
17. Less than or equal to symbol
n
in
=
<=
18. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
<
int
len()
()
19. single line comment
#
write
argument variable
=
20. The keyword beginning a header that will create a new function.
print()
-
def
*
21. Create a variable.
=
#
*=
&
22. turns an object into a string
**=
^
str()
#
23. A statement that ends the current iteration of a loop but continues looping.
*truncate
/
a//b
continue
24. Function to read the contents of a file
n
for
is
read
25. deletes an item from a list
del
str()
math.sqrt(a)
file.truncate()
26. Turns a line into a comment instead of executable code.
abs(a)
#
=
and
27. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
=
a//b
try
*=
28. End header line.
:
&
is not
not
29. Greater than or equal symbol.
%
>=
math.sqrt(a)
or
30. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
=
in
round()
()
31. A keyword that does nothing but fill space to indicate code which will be written later.
pass
round()
|
del
32. add AND assignment operator
//=
%r
*write(stuff)
+=
33. An operator to check whether two variables refer to the same object.
>>
def
*=
is
34. turns an object into a string
str()
while
math.sqrt(a)
n
35. Prints a string to the screen which is converted using repr()
readline
break
%
%r
36. 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
=
insert()
not
37. Greater than or equal symbol.
math.sqrt(a)
class
*truncate
>=
38. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
>
def
&
+
39. 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
()
read
<<
*
40. Function to open or read a file
open()
continue
read
read
41. Function to open or read a file
%
try
open()
//=
42. Command to print to the screen
def
==
n
print
43. empties the file
file.truncate()
str
#
a**b
44. writes stuff to the file
file.write(stuff)
=
>
**=
45. exponentiation
and
^
in
a**b
46. This keyword in the body of a conditional - gives an alternative execution.
float
else
a//b
in
47. rounds a number to the number of decimal points you choose
and
close
n
round()
48. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
format string
//=
round()
class
49. Prints a string to the screen which is a signed decimal.
%d
>>
~
%=
50. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
a//b
|
and
insert()