SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
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 logical operator which negates an expression so that it returns a value of True if the expression is false.
*readline
read
insert()
not
2. exponent AND assignment operator
**=
elif (Else if)
=
a**b
3. This keyword begins the simplest form of a conditional statement.
in
if
floating point number
except
4. Function to open or read a file
open()
=
while
%s
5. absolute value
abs(a)
del
del
#
6. square root
not in
if
math.sqrt(a)
/=
7. inserts an item inside a list at a certain index
and
insert()
append()
format string
8. This keyword begins a header for a body that repeats until the condition is no longer true.
append()
/=
file.write(stuff)
while
9. Function to write something to a file
write
not in
open()
()
10. Function to read the contents of a file
len()
for
read
*truncate
11. This keyword in the body of a conditional - gives an alternative execution.
>=
else
&
a**b
12. Greater than symbol
if
input()
len()
>
13. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
str()
append()
def
int
14. A built-in function that converts integers and strings to floating-point numbers.
#
print()
float
int
15. multiply AND assignment operator
==
file.write(stuff)
*=
del
16. Symbol to subtract things from each other
-
<<
del
**=
17. Turns a line into a comment instead of executable code.
/
#
<
is
18. Greater than symbol
+
=
>
input()
19. exponentiation
<=
close
=
a**b
20. Create a variable.
>>
=
*=
readline
21. writes stuff to the file
file.write(stuff)
file.truncate()
abs(a)
print
22. Prints a string to the screen which is a signed decimal.
is
.py
%d
//=
23. Symbol used to create comments
open()
a//b
#
file.seek()
24. 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
write
math.sqrt(a)
<<
|
25. A logical operator which returns a value of True if either of the conditions is true.
str()
*write(stuff)
or
a%b
26. reads just one line of a text file & keeps track of where in the file you're at
%
assignment
file.readline()
>=
27. floor division AND assignment operator
>
//=
Variables
<
28. Empties the file - watch out if you care about the file.
*truncate
==
:
in
29. unction to read one line of a file
is not
==
readline
write
30. 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.
+=
n
in
#
31. adds an item to a list
str
file.truncate()
append()
~
32. Symbol used to create comments
%s
#
read
<
33. A built-in function that converts its argument to a string.
str
round()
not in
%r
34. Prints a string to the screen which is converted using repr()
%r
len()
+=
>=
35. This statement causes an exception.
.py
math.sqrt(a)
//=
raise
36. The keyword beginning a header that will create a loop.
#
for
file.seek()
*read
37. divide AND assignment operator
/=
if
Variables
>=
38. add AND assignment operator
floating point number
%
+=
and
39. Where the parameters go. A necessary punctuation after any function even if it's empty.
write
~
()
|
40. A statement that ends the current iteration of a loop but continues looping.
if
close
str()
continue
41. asks the user for a response and returns that response
input()
==
=
str()
42. The extension for Python scripts
>
.py
+
()
43. Create a variable.
a%b
read
:
=
44. A statement that assigns a value to a variable.
if
assignment
and
a**b
45. Function to read the contents of a file
read
if
int
file.seek()
46. Symbol to divide by the number to the right of the symbol
input()
in
/
is
47. turns an object into a string
round()
read
str()
argument variable
48. Less than symbol
<
print
#
write
49. Reads the contents of the file you can assign the result to a variable.
*=
|
*read
append()
50. This keyword begins the simplest form of a conditional statement.
if
close
raise
while