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 built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
*write(stuff)
pass
insert()
int
2. Symbol to add things together
=
else
<<
+
3. Modulus operator. It's the remainder after division
:
%
input()
else
4. A data type for representing numbers with fractional values.
a%b
floating point number
-=
<<
5. Function to close a file - it will not be able to be used again unless the file is opened.
close
==
str()
readline
6. Adds a new line character
>
n
//=
read
7. absolute value
*
-
abs(a)
write
8. A logical operator which requires two expressions to both be true.
write
floating point number
<<
and
9. floor division
open()
&
for
a//b
10. 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
^
-
argv
#
11. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
del
Variables
/=
return
12. square root
<
len()
not in
math.sqrt(a)
13. subtract AND assignment operator
>
while
-=
<
14. sets the file's current position
print()
<=
file.seek()
+
15. modulus AND assignment operator
-
<=
%=
.py
16. floor division AND assignment operator
//=
-
#
readline
17. 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
>>
except
*
insert()
18. Function to close a file - it will not be able to be used again unless the file is opened.
math.sqrt(a)
/=
close
-
19. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
a%b
in
-=
or
20. Less than symbol
&
%r
<
=
21. reads just one line of a text file & keeps track of where in the file you're at
%=
len()
except
file.readline()
22. Reads the contents of the file you can assign the result to a variable.
*read
is
def
//=
23. This statement causes an exception.
raise
math.sqrt(a)
==
a**b
24. turns an object into an integer
//=
int()
()
%s
25. A logical operator which compares two operands and produces True if they are equal and False otherwise
a//b
%d
==
&
26. Argument variable
>
#
read
argv
27. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
len()
float
math.sqrt(a)
28. Argument variable
is
argv
**=
del
29. An operator to check whether two variables refer to the same object.
del
abs(a)
a%b
is
30. This statement exits a function. The remaining lines of the function are not executed.
for
*
read
return
31. End header line.
:
and
and
=
32. multiply AND assignment operator
=
*=
a%b
else
33. exponent AND assignment operator
str
**=
append()
abs(a)
34. This keyword begins the simplest form of a conditional statement.
del
if
()
floating point number
35. rounds a number to the number of decimal points you choose
+=
input()
round()
==
36. Symbol to add things together
print()
+
>
Variables
37. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
^
%
file.truncate()
38. Writes stuff to the file.
write
+
*write(stuff)
**=
39. This keyword in the body of a conditional allows chained conditionals.
insert()
in
elif (Else if)
<
40. Symbol to subtract things from each other
round()
%
-
#
41. Less than symbol
<
del
not in
%d
42. Function to empty the contents of a file - no recovery is possible
str
a**b
truncate
*read
43. Greater than symbol
del
#
float
>
44. divide AND assignment operator
/=
=
while
//=
45. Modulus operator. It's the remainder after division
read
%s
()
%
46. Less than or equal to symbol
is
for
<=
&
47. Where the parameters go. A necessary punctuation after any function even if it's empty.
def
a**b
()
argument variable
48. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
read
append()
format string
in
49. modulus AND assignment operator
abs(a)
%=
is
50. The extension for Python scripts
argv
return
.py
: