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. Create a variable.
=
write
or
print
2. assignment operator
while
=
&
-=
3. 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
truncate
print
del
4. Modulus operator. It's the remainder after division
readline
%
/=
<
5. floor division
close
in
open()
a//b
6. Adds something to a variable
while
is not
%s
=
7. 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
is not
class
elif (Else if)
>>
8. Function to empty the contents of a file - no recovery is possible
truncate
format string
-=
%d
9. A logical operator which returns a value of True if either of the conditions is true.
Variables
or
str()
+=
10. Function to read the contents of a file
read
break
#
<
11. asks the user for a response and returns that response
input()
else
~
|
12. modulo
file.write(stuff)
argv
a%b
>
13. deletes an item from a list
del
for
or
print
14. ,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.
%d
=
file.readline()
15. This keyword begins a header for a body that repeats until the condition is no longer true.
while
>>
*=
in
16. turns an object into an integer
insert()
int()
%=
in
17. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
or
*readline
~
str()
18. square root
math.sqrt(a)
open()
.py
try
19. Modulus operator. It's the remainder after division
|
%d
~
%
20. Prints a string to the screen which will be Unicode.
assignment
insert()
print()
%s
21. Symbol used to create comments
abs(a)
str()
#
format string
22. add AND assignment operator
and
if
+=
is
23. Reads just one line of a text file.
*readline
argument variable
print()
if
24. absolute value
abs(a)
*=
~
file.truncate()
25. This keyword in the body of a conditional - gives an alternative execution.
else
len()
return
/=
26. 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
<=
read
#
^
27. A statement that displays a value on the screen.
%
>>
-=
print
28. A data type for representing numbers with fractional values.
round()
print()
floating point number
<<
29. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
*
in
.py
|
30. floor division AND assignment operator
>>
str
insert()
//=
31. prints its parameter to the console
&
abs(a)
.py
print()
32. The keyword beginning a header that will create a loop.
for
and
if
del
33. exponent AND assignment operator
**=
readline
-
^
34. inserts an item inside a list at a certain index
insert()
>=
//=
#
35. An operator to check whether two variables refer to the same object.
:
-=
is
*=
36. A logical operator which compares two operands and produces True if they are equal and False otherwise
floating point number
-
==
print
37. Symbol to subtract things from each other
<<
a**b
-
argv
38. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
len()
*read
|
//=
39. A built-in function that converts its argument to a string.
str
%d
#
:
40. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
&
Variables
is not
int
41. The extension for Python scripts
if
read
.py
try
42. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
-
print
del
43. Function to close a file - it will not be able to be used again unless the file is opened.
close
read
*read
input()
44. Less than symbol
elif (Else if)
print
+=
<
45. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
+=
argument variable
int
str
46. unction to read one line of a file
return
read
=
readline
47. turns an object into an integer
print
int()
+
<=
48. exponent AND assignment operator
#
=
**=
open()
49. 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
a%b
>>
.py
*readline
50. Function to write something to a file
#
pass
write
round()