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. square root
is not
math.sqrt(a)
+=
.py
2. 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
int()
in
def
^
3. Prints a string to the screen which will be Unicode.
append()
*read
%
%s
4. Where the parameters go. A necessary punctuation after any function even if it's empty.
file.write(stuff)
()
str()
close
5. inserts an item inside a list at a certain index
continue
truncate
*
insert()
6. The extension for Python scripts
:
.py
/
and
7. Less than symbol
//=
<
=
readline
8. turns an object into a string
print()
str()
assignment
except
9. Modulus operator. It's the remainder after division
for
=
%
a%b
10. End header line.
del
close
:
len()
11. subtract AND assignment operator
len()
try
-=
/
12. reads just one line of a text file & keeps track of where in the file you're at
^
%
file.readline()
n
13. Function to write something to a file
write
-
readline
.py
14. Create a variable.
file.seek()
#
argv
=
15. Symbol to subtract things from each other
-
#
input()
round()
16. An operator to check whether two variables refer to the same object.
is
==
is not
<
17. Empties the file - watch out if you care about the file.
-
*truncate
class
-
18. absolute value
<
abs(a)
argv
len()
19. absolute value
insert()
int
close
abs(a)
20. modulus AND assignment operator
+=
%=
*
insert()
21. Function to read the contents of a file
/
read
a//b
Variables
22. Function to close a file - it will not be able to be used again unless the file is opened.
:
elif (Else if)
print()
close
23. Turns a line into a comment instead of executable code.
def
assignment
#
math.sqrt(a)
24. Function to open or read a file
open()
%r
math.sqrt(a)
=
25. rounds a number to the number of decimal points you choose
/
and
round()
&
26. An operator that removes a value from a list.
a//b
format string
file.seek()
del
27. Modulus operator. It's the remainder after division
print()
%
print
%s
28. turns an object into an integer
len()
/=
int()
round()
29. deletes an item from a list
len()
()
int()
del
30. 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
^
def
<<
31. Function to close a file - it will not be able to be used again unless the file is opened.
close
==
>=
and
32. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
|
is not
=
%=
33. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
while
if
open()
34. Prints a string to the screen which is a signed decimal.
<
read
%d
truncate
35. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
is not
try
<
int()
36. This statement exits a function. The remaining lines of the function are not executed.
-=
%
/
return
37. add AND assignment operator
+=
len()
or
#
38. Prints a string to the screen which is a signed decimal.
argument variable
%d
str()
=
39. Adds something to a variable
=
<<
<
str
40. Symbol to add things together
in
+
>
<<
41. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
=
not
()
42. exponentiation
floating point number
%r
a**b
%=
43. asks the user for a response and returns that response
raise
def
input()
%s
44. Symbol used to create comments
/=
=
%r
#
45. exponentiation
*=
:
<=
a**b
46. This keyword in the body of a conditional - gives an alternative execution.
else
=
#
-
47. 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
<<
/=
file.seek()
a//b
48. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
in
.py
write
continue
49. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
open()
del
=
Variables
50. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
assignment
print()
close