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. exponentiation
a//b
:
file.seek()
a**b
2. This statement causes an exception.
=
raise
>=
continue
3. A statement that assigns a value to a variable.
.py
assignment
**=
print
4. Adds something to a variable
input()
%
=
<
5. rounds a number to the number of decimal points you choose
class
round()
*truncate
%s
6. turns an object into an integer
+
math.sqrt(a)
int()
round()
7. End header line.
raise
is not
:
break
8. Prints a string to the screen which is a signed decimal.
&
%d
floating point number
a//b
9. Prevents a runtime error from stopping the program.
in
for
except
else
10. adds an item to a list
>
append()
//=
11. turns an object into a string
str()
/
-=
read
12. Symbol to divide by the number to the right of the symbol
&
argv
/
>>
13. Function to open or read a file
open()
^
#
<=
14. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
open()
or
del
15. turns an object into an integer
=
except
~
int()
16. This keyword begins the simplest form of a conditional statement.
else
for
if
<<
17. exponent AND assignment operator
|
floating point number
**=
a//b
18. unction to read one line of a file
>=
%d
*
readline
19. Prints a string to the screen which will be Unicode.
<<
()
*truncate
%s
20. Prints a string to the screen which is a signed decimal.
int
%d
a%b
+=
21. inserts an item inside a list at a certain index
Variables
:
insert()
#
22. multiply AND assignment operator
*=
^
close
int()
23. A logical operator which compares two operands and produces True if they are equal and False otherwise
*=
except
print
==
24. modulus AND assignment operator
~
%=
#
abs(a)
25. unction to read one line of a file
readline
not
truncate
close
26. assignment operator
=
file.readline()
+=
<
27. absolute value
file.readline()
abs(a)
argument variable
print()
28. Adds something to a variable
abs(a)
not in
write
=
29. Function to close a file - it will not be able to be used again unless the file is opened.
/=
a//b
str()
close
30. Symbol to add things together
-=
input()
+
float
31. multiply AND assignment operator
*=
*
insert()
<=
32. Greater than symbol
round()
<<
>
=
33. Function to empty the contents of a file - no recovery is possible
a**b
truncate
=
//=
34. Create a variable.
.py
float
readline
=
35. Symbol used to create comments
<<
pass
/
#
36. assignment operator
=
*=
#
assignment
37. 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.
argv
while
in
/=
38. 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
^
input()
=
def
39. Function to read the contents of a file
read
a**b
>
for
40. Empties the file - watch out if you care about the file.
*truncate
str()
readline
str
41. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
is
>
del
|
42. Modulus operator. It's the remainder after division
>>
%
a%b
=
43. modulo
<<
len()
a**b
a%b
44. Command to print to the screen
print
<<
Variables
45. The keyword beginning a header that will create a new function.
del
#
def
append()
46. Argument variable
#
not in
readline
argv
47. floor division AND assignment operator
//=
in
+=
>=
48. Prints a string to the screen which is converted using repr()
=
else
%r
^
49. 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.
print
//=
not in
+=
50. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
input()
==
>
int