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. turns an object into a string
%
%r
math.sqrt(a)
str()
2. floor division AND assignment operator
in
//=
^
close
3. exponentiation
%d
math.sqrt(a)
a**b
*=
4. Modulus operator. It's the remainder after division
==
file.seek()
read
%
5. Symbol used to create comments
n
#
//=
**=
6. End header line.
**=
:
truncate
open()
7. subtract AND assignment operator
%d
>=
+
-=
8. A logical operator which negates an expression so that it returns a value of True if the expression is false.
truncate
not
open()
and
9. A data type for representing numbers with fractional values.
raise
%r
#
floating point number
10. turns an object into an integer
raise
for
append()
int()
11. Symbol to multiply things
*write(stuff)
*
*=
else
12. This keyword in the body of a conditional allows chained conditionals.
append()
a%b
elif (Else if)
*=
13. modulus AND assignment operator
%=
==
%
try
14. inserts an item inside a list at a certain index
in
read
write
insert()
15. Empties the file - watch out if you care about the file.
*truncate
=
int()
def
16. Function to empty the contents of a file - no recovery is possible
assignment
=
+=
truncate
17. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
.py
~
argv
+=
18. The keyword beginning a header that will create a loop.
for
.py
&
abs(a)
19. Evaluates to true if it finds a variable in the specified sequence and false otherwise. x in y - here in results in a 1 if x is a member of sequence y.
in
//=
or
del
20. Less than symbol
open()
*read
<
file.truncate()
21. Function to read the contents of a file
|
read
>=
#
22. assignment operator
=
is not
try
append()
23. Function to read the contents of a file
read
%
argv
floating point number
24. floor division AND assignment operator
%=
<
if
//=
25. floor division
*=
abs(a)
//=
a//b
26. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
%
str()
not in
27. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
int()
:
truncate
int
28. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
=
<<
round()
Variables
29. Symbol to subtract things from each other
#
-
=
+
30. Create a variable.
*truncate
=
write
try
31. 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
<<
and
^
-
32. divide AND assignment operator
//=
file.readline()
/=
input()
33. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
==
~
not
if
34. modulo
>>
print()
a%b
>
35. This keyword begins the simplest form of a conditional statement.
n
a//b
if
<
36. Adds a new line character
>
n
-=
append()
37. Greater than or equal symbol.
=
==
>=
elif (Else if)
38. asks the user for a response and returns that response
round()
input()
a//b
<<
39. exponent AND assignment operator
()
-=
**=
continue
40. Prints a string to the screen which will be Unicode.
for
*=
%s
41. absolute value
=
int()
abs(a)
%
42. Greater than or equal symbol.
*
>=
%r
**=
43. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
math.sqrt(a)
try
write
^
44. The extension for Python scripts
del
.py
=
<
45. 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
^
a//b
|
46. deletes an item from a list
=
del
*write(stuff)
if
47. Prints a string to the screen which is a signed decimal.
*
print()
%d
str()
48. Function to open or read a file
()
n
open()
//=
49. reads just one line of a text file & keeps track of where in the file you're at
%=
file.readline()
int()
len()
50. The keyword beginning a header that will create a loop.
int()
<<
=
for