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. A statement that assigns a value to a variable.
*
-=
assignment
file.truncate()
2. square root
Variables
try
print
math.sqrt(a)
3. The keyword beginning a header that will create a new function.
def
&
-
4. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
del
append()
continue
Variables
5. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
a**b
|
del
truncate
6. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
.py
()
%s
7. A logical operator which returns a value of True if either of the conditions is true.
open()
or
floating point number
is not
8. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
Variables
str()
write
return
9. floor division AND assignment operator
//=
continue
a%b
int()
10. The keyword beginning a header that will create a loop.
<=
<
int()
for
11. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
%
try
read
12. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
>
~
^
%=
13. asks the user for a response and returns that response
input()
Variables
open()
()
14. Modulus operator. It's the remainder after division
append()
=
del
%
15. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
not in
str
16. inserts an item inside a list at a certain index
<=
return
<
insert()
17. Symbol used to create comments
#
*=
print
def
18. Symbol to subtract things from each other
>
-
==
file.truncate()
19. empties the file
file.write(stuff)
=
file.truncate()
is not
20. reads just one line of a text file & keeps track of where in the file you're at
*
write
file.readline()
math.sqrt(a)
21. divide AND assignment operator
int
insert()
file.seek()
/=
22. add AND assignment operator
~
#
+=
str()
23. Function to write something to a file
*=
round()
write
and
24. Modulus operator. It's the remainder after division
insert()
%
input()
:
25. multiply AND assignment operator
read
*=
*
argument variable
26. Function to close a file - it will not be able to be used again unless the file is opened.
>
file.seek()
close
continue
27. returns the length of a string (number of characters)
=
==
^
len()
28. Where the parameters go. A necessary punctuation after any function even if it's empty.
if
and
()
print
29. subtract AND assignment operator
-=
read
-
+=
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
^
print
<=
try
31. Greater than or equal symbol.
round()
>=
/=
*
32. Function to write something to a file
write
-
a//b
len()
33. Adds something to a variable
%d
=
truncate
else
34. An operator that removes a value from a list.
math.sqrt(a)
>
file.write(stuff)
del
35. This keyword begins the simplest form of a conditional statement.
input()
-
=
if
36. Symbol used to create comments
#
<<
pass
else
37. adds an item to a list
and
str()
append()
*
38. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
a%b
|
()
+
39. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
insert()
if
<<
~
40. Adds something to a variable
*read
=
%
>=
41. 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.
format string
class
and
not in
42. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
n
not
in
-=
43. Prevents a runtime error from stopping the program.
-
argv
except
&
44. exponent AND assignment operator
*
float
**=
()
45. prints its parameter to the console
class
if
print()
~
46. single line comment
write
#
a%b
read
47. absolute value
abs(a)
%r
^
if
48. Prints a string to the screen which is converted using repr()
read
and
str()
%r
49. The extension for Python scripts
//=
open()
insert()
.py
50. Adds a new line character
-=
n
close
for