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. Symbol to multiply things
open()
argv
str()
*
2. asks the user for a response and returns that response
print
str
()
input()
3. 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
^
abs(a)
#
a%b
4. Command to print to the screen
<=
return
del
print
5. This statement exits a function. The remaining lines of the function are not executed.
str
in
return
<=
6. deletes an item from a list
#
#
del
append()
7. End header line.
*=
:
a%b
.py
8. The extension for Python scripts
for
=
.py
len()
9. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
*write(stuff)
a%b
for
and
10. Symbol to add things together
a**b
print()
+
read
11. Modulus operator. It's the remainder after division
*=
=
%
pass
12. Symbol to multiply things
*
()
|
print
13. The keyword beginning a header that will create a loop.
and
while
for
del
14. The keyword beginning a header that will create a new function.
^
str
def
str()
15. Less than symbol
==
<
else
for
16. Function to write something to a file
write
a%b
del
continue
17. Where the parameters go. A necessary punctuation after any function even if it's empty.
a//b
and
readline
()
18. A statement that breaks out of a loop.
break
str()
#
19. Symbol to divide by the number to the right of the symbol
^
argument variable
/
if
20. divide AND assignment operator
*write(stuff)
readline
+=
/=
21. multiply AND assignment operator
>=
del
round()
*=
22. A logical operator which returns a value of True if either of the conditions is true.
is
n
or
write
23. Adds a new line character
readline
*=
n
-=
24. returns the length of a string (number of characters)
try
len()
truncate
or
25. Function to close a file - it will not be able to be used again unless the file is opened.
in
return
print()
close
26. Symbol to divide by the number to the right of the symbol
len()
/
class
print
27. floor division
not in
write
a//b
=
28. This keyword in the body of a conditional allows chained conditionals.
str()
elif (Else if)
<=
while
29. unction to read one line of a file
print
is not
Variables
readline
30. modulo
in
+=
*
a%b
31. Function to close a file - it will not be able to be used again unless the file is opened.
-=
close
a%b
file.truncate()
32. This keyword begins the simplest form of a conditional statement.
+
if
del
.py
33. Greater than or equal symbol.
>=
+
%d
argument variable
34. Function to empty the contents of a file - no recovery is possible
%s
truncate
floating point number
read
35. Symbol to add things together
in
~
+
-
36. A logical operator which requires two expressions to both be true.
def
and
return
abs(a)
37. floor division AND assignment operator
a**b
*readline
/=
//=
38. A keyword that does nothing but fill space to indicate code which will be written later.
>=
except
pass
try
39. Prints a string to the screen which is a signed decimal.
%d
continue
print()
40. Greater than symbol
>
^
abs(a)
format string
41. Greater than or equal symbol.
>=
int()
if
:
42. subtract AND assignment operator
#
Variables
-=
=
43. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
%s
<<
&
%
44. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
=
*
and
45. This keyword begins a header for a body that repeats until the condition is no longer true.
while
not in
file.write(stuff)
==
46. adds an item to a list
%r
in
append()
open()
47. floor division
&
truncate
|
a//b
48. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
Variables
>
print
#
49. square root
int()
:
math.sqrt(a)
input()
50. add AND assignment operator
def
file.seek()
write
+=