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. Function to read the contents of a file
<=
read
del
2. add AND assignment operator
+=
a//b
raise
abs(a)
3. turns an object into an integer
not
%
int()
or
4. Function to open or read a file
open()
is not
()
a//b
5. A logical operator which returns a value of True if either of the conditions is true.
or
==
insert()
n
6. Function to empty the contents of a file - no recovery is possible
round()
%
()
truncate
7. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
*readline
=
continue
|
8. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
print()
<
Variables
**=
9. turns an object into an integer
int()
raise
floating point number
%=
10. exponentiation
%=
*
try
a**b
11. A built-in function that converts its argument to a string.
-
<=
close
str
12. Prints a string to the screen which is a signed decimal.
open()
readline
%d
=
13. Modulus operator. It's the remainder after division
==
format string
%
14. absolute value
del
=
abs(a)
:
15. divide AND assignment operator
/=
insert()
close
%
16. floor division AND assignment operator
str()
//=
argv
pass
17. reads just one line of a text file & keeps track of where in the file you're at
a**b
%d
file.readline()
float
18. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
elif (Else if)
>
read
19. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
*
~
open()
/=
20. assignment operator
round()
=
%
insert()
21. modulus AND assignment operator
-
del
%=
class
22. Prints a string to the screen which is converted using repr()
argv
floating point number
print
%r
23. 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
*read
>>
*
raise
24. square root
abs(a)
math.sqrt(a)
//=
not
25. Adds something to a variable
int()
=
-=
<=
26. subtract AND assignment operator
&
del
-=
close
27. A statement that breaks out of a loop.
Variables
n
=
break
28. The extension for Python scripts
+=
assignment
is not
.py
29. Symbol to add things together
+
def
-=
%=
30. The keyword beginning a header that will create a loop.
is not
for
*truncate
-=
31. prints its parameter to the console
for
<
str()
print()
32. 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
#
-=
^
a**b
33. adds an item to a list
append()
a//b
del
Variables
34. A logical operator which compares two operands and produces True if they are equal and False otherwise
<=
<<
==
argv
35. Symbol used to create comments
#
str()
Variables
==
36. Symbol to multiply things
a%b
%=
*
in
37. inserts an item inside a list at a certain index
>
len()
insert()
-
38. exponent AND assignment operator
~
**=
break
write
39. Function to close a file - it will not be able to be used again unless the file is opened.
argv
print()
file.readline()
close
40. deletes an item from a list
else
del
read
math.sqrt(a)
41. Adds a new line character
int()
:
|
n
42. asks the user for a response and returns that response
input()
#
file.write(stuff)
%r
43. floor division AND assignment operator
float
<=
//=
is
44. Function to write something to a file
*write(stuff)
=
write
*=
45. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
+
~
-=
46. rounds a number to the number of decimal points you choose
truncate
insert()
round()
append()
47. modulo
a%b
a//b
not in
%s
48. Adds a new line character
>=
=
n
*=
49. Symbol to multiply things
append()
*
abs(a)
50. Symbol used to create comments
else
#
not in
del