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. multiply AND assignment operator
%d
-
+
*=
2. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
try
=
#
%r
3. ,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.
a//b
#
floating point number
4. sets the file's current position
file.seek()
-=
Variables
while
5. divide AND assignment operator
//=
for
/=
else
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
/=
del
&
truncate
7. adds an item to a list
=
append()
+=
input()
8. A data type for representing numbers with fractional values.
open()
floating point number
truncate
len()
9. reads just one line of a text file & keeps track of where in the file you're at
print
file.readline()
-
~
10. turns an object into an integer
int()
argument variable
-
file.write(stuff)
11. The keyword beginning a header that will create a new function.
def
~
open()
print()
12. floor division AND assignment operator
truncate
len()
*=
//=
13. Prints a string to the screen which will be Unicode.
abs(a)
%s
<
append()
14. A statement that assigns a value to a variable.
~
+
assignment
not in
15. This keyword begins a header for a body that repeats until the condition is no longer true.
while
=
readline
<
16. Function to empty the contents of a file - no recovery is possible
else
format string
truncate
try
17. A keyword that does nothing but fill space to indicate code which will be written later.
not
pass
format string
print()
18. turns an object into a string
.py
math.sqrt(a)
str()
del
19. Prints a string to the screen which is a signed decimal.
file.seek()
int()
assignment
%d
20. asks the user for a response and returns that response
input()
if
%=
*=
21. This variable holds the arguments you pass to your Python script when you run it. Then you unpack it in your script so you have variables you can work with.
assignment
argument variable
*truncate
str()
22. Symbol used to create comments
#
pass
**=
-
23. The keyword beginning a header that will create a loop.
for
argument variable
<=
==
24. An operator that removes a value from a list.
+
del
not
close
25. absolute value
file.seek()
abs(a)
:
math.sqrt(a)
26. Adds something to a variable
/
=
-
%d
27. multiply AND assignment operator
%s
*=
insert()
a//b
28. prints its parameter to the console
while
<<
print()
*write(stuff)
29. Less than symbol
>=
and
or
<
30. 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
|
-=
**=
<<
31. Modulus operator. It's the remainder after division
and
%
file.truncate()
+
32. Create a variable.
round()
print
=
read
33. square root
math.sqrt(a)
*truncate
=
%=
34. turns an object into an integer
float
*truncate
int()
int
35. absolute value
^
abs(a)
+
+
36. Symbol to subtract things from each other
-
math.sqrt(a)
**=
print()
37. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
write
>>
~
&
38. This keyword in the body of a conditional - gives an alternative execution.
read
#
else
assignment
39. modulo
int()
a%b
/
argument variable
40. modulus AND assignment operator
read
%=
float
append()
41. Symbol to multiply things
+
*
while
argv
42. Symbol to subtract things from each other
#
-
=
^
43. Greater than symbol
()
math.sqrt(a)
>
n
44. Function to empty the contents of a file - no recovery is possible
.py
%r
truncate
=
45. Symbol to multiply things
//=
insert()
*
46. 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
read
readline
print()
47. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
in
.py
#
floating point number
48. Symbol to add things together
=
int
is
+
49. Modulus operator. It's the remainder after division
len()
%
=
-=
50. unction to read one line of a file
readline
print()
=
not in