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. Greater than or equal symbol.
%=
>=
//=
in
2. divide AND assignment operator
except
pass
/=
<<
3. exponent AND assignment operator
**=
%
del
str()
4. square root
math.sqrt(a)
pass
a%b
*readline
5. writes stuff to the file
*read
not in
file.write(stuff)
~
6. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
try
float
Variables
n
7. Create a variable.
math.sqrt(a)
=
%d
is not
8. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
<<
~
a//b
%
9. assignment operator
a//b
not in
raise
=
10. reads just one line of a text file & keeps track of where in the file you're at
/=
*readline
file.readline()
in
11. This keyword begins the simplest form of a conditional statement.
if
.py
&
del
12. The keyword beginning a header that will create a new function.
|
def
str()
+
13. Prints a string to the screen which is a signed decimal.
%d
+=
math.sqrt(a)
~
14. floor division
a//b
str
*write(stuff)
in
15. inserts an item inside a list at a certain index
%
%=
insert()
raise
16. ,multi-line comment hard-code,Fix (data or parameters) in a program in such a way that they cannot easily be altered by the user.
else
insert()
<<
17. This keyword in the body of a conditional - gives an alternative execution.
%s
file.readline()
else
a**b
18. multiply AND assignment operator
truncate
raise
%d
*=
19. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
/=
argv
&
*readline
20. End header line.
()
else
:
except
21. Greater than or equal symbol.
print()
break
>=
is not
22. assignment operator
del
~
argv
=
23. add AND assignment operator
file.readline()
round()
#
+=
24. Writes stuff to the file.
pass
close
str
*write(stuff)
25. Prints a string to the screen which is converted using repr()
append()
%r
**=
=
26. The keyword beginning a header that will create a loop.
a**b
%=
+=
for
27. Function to open or read a file
open()
while
+
=
28. Symbol used to create comments
%d
continue
str
#
29. A keyword that does nothing but fill space to indicate code which will be written later.
if
^
floating point number
pass
30. floor division
#
*=
a//b
*readline
31. turns an object into an integer
math.sqrt(a)
is
int()
.py
32. rounds a number to the number of decimal points you choose
|
while
>=
round()
33. The extension for Python scripts
round()
.py
str
%=
34. Function to close a file - it will not be able to be used again unless the file is opened.
or
|
*write(stuff)
close
35. Where the parameters go. A necessary punctuation after any function even if it's empty.
^
append()
()
not in
36. prints its parameter to the console
math.sqrt(a)
<=
print()
if
37. Function to read the contents of a file
*truncate
/
len()
read
38. rounds a number to the number of decimal points you choose
readline
round()
%
>=
39. A logical operator which requires two expressions to both be true.
a%b
readline
Variables
and
40. This keyword begins the simplest form of a conditional statement.
**=
if
+
round()
41. exponentiation
floating point number
file.seek()
readline
a**b
42. asks the user for a response and returns that response
input()
or
while
%
43. Create a variable.
&
=
^
|
44. prints its parameter to the console
print()
|
close
>
45. This variable holds the arguments you pass to your Python script when you run it. Then you unpack it in your script so you have variables you can work with.
raise
argument variable
while
|
46. subtract AND assignment operator
argv
-=
n
readline
47. 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
|
^
insert()
~
48. Symbol to add things together
del
+
==
|
49. Function to open or read a file
math.sqrt(a)
continue
>>
open()
50. A data type for representing numbers with fractional values.
*readline
=
floating point number
for