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. deletes an item from a list
del
-
=
%r
2. Adds something to a variable
round()
=
()
.py
3. Argument variable
>
open()
int()
argv
4. turns an object into an integer
in
del
int()
#
5. Greater than symbol
&
>
a//b
class
6. exponentiation
a//b
a**b
+
/=
7. A statement that ends the current iteration of a loop but continues looping.
<
|
class
continue
8. Symbol to add things together
assignment
+
<<
#
9. writes stuff to the file
truncate
%r
file.write(stuff)
else
10. A statement that breaks out of a loop.
break
int
return
#
11. assignment operator
<=
file.readline()
=
round()
12. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
Variables
==
argv
-
13. Function to write something to a file
~
write
&
*write(stuff)
14. Greater than or equal symbol.
.py
>=
<<
*read
15. Where the parameters go. A necessary punctuation after any function even if it's empty.
*=
>=
()
open()
16. turns an object into a string
-
str()
read
in
17. add AND assignment operator
Variables
write
+=
in
18. turns an object into a string
abs(a)
()
+
str()
19. Symbol to divide by the number to the right of the symbol
&
round()
>=
/
20. A keyword that does nothing but fill space to indicate code which will be written later.
.py
del
str()
pass
21. Writes stuff to the file.
%r
*read
==
*write(stuff)
22. empties the file
abs(a)
print()
file.truncate()
del
23. The extension for Python scripts
#
//=
and
.py
24. 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
>>
class
/
def
25. Prints a string to the screen which will be Unicode.
insert()
argv
%s
for
26. 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.
argument variable
+=
n
and
27. A logical operator which requires two expressions to both be true.
assignment
>>
and
print
28. The extension for Python scripts
print()
.py
format string
and
29. absolute value
abs(a)
print
/
<<
30. asks the user for a response and returns that response
read
/
abs(a)
input()
31. Adds a new line character
*=
>
==
n
32. Less than symbol
=
round()
/
<
33. The keyword beginning a header that will create a loop.
>>
if
for
~
34. floor division AND assignment operator
input()
close
//=
append()
35. inserts an item inside a list at a certain index
%=
insert()
print()
not in
36. Symbol to multiply things
*
%
-=
def
37. deletes an item from a list
*
insert()
&
del
38. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
/
and
input()
~
39. Symbol to subtract things from each other
-
<=
<
()
40. Turns a line into a comment instead of executable code.
#
-
class
raise
41. Argument variable
*write(stuff)
argv
if
round()
42. A built-in function that converts its argument to a string.
#
//=
str
a**b
43. This keyword begins a header for a body that repeats until the condition is no longer true.
while
len()
close
file.write(stuff)
44. Function to open or read a file
a//b
open()
~
*
45. adds an item to a list
raise
del
while
append()
46. multiply AND assignment operator
abs(a)
*=
not
Variables
47. End header line.
*
:
=
class
48. modulus AND assignment operator
%=
input()
round()
Variables
49. This keyword in the body of a conditional - gives an alternative execution.
try
else
>=
&
50. floor division
%=
a//b
>>
%=