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. Prints a string to the screen which is a signed decimal.
float
%=
%d
Variables
2. This keyword begins the simplest form of a conditional statement.
if
read
math.sqrt(a)
//=
3. Create a variable.
def
input()
%d
=
4. This keyword begins the simplest form of a conditional statement.
-
=
if
:
5. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
a**b
=
print
6. Function to close a file - it will not be able to be used again unless the file is opened.
#
|
<
close
7. divide AND assignment operator
/=
readline
==
open()
8. turns an object into a string
str()
&
argv
def
9. floor division
if
()
*
a//b
10. A built-in function that converts its argument to a string.
float
str
insert()
%
11. Prevents a runtime error from stopping the program.
>=
#
n
except
12. assignment operator
else
=
#
~
13. Symbol to add things together
//=
while
+
write
14. The keyword beginning a header that will create a new function.
def
while
print()
#
15. asks the user for a response and returns that response
%s
input()
is not
<=
16. Less than or equal to symbol
Variables
a**b
<=
and
17. unction to read one line of a file
try
input()
readline
%s
18. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
-
&
a**b
^
19. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
<<
n
abs(a)
|
20. assignment operator
round()
format string
print()
=
21. A built-in function that converts integers and strings to floating-point numbers.
write
float
=
file.truncate()
22. Empties the file - watch out if you care about the file.
%r
*truncate
readline
()
23. A keyword that does nothing but fill space to indicate code which will be written later.
append()
%
-
pass
24. 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
int()
a**b
>>
read
25. floor division AND assignment operator
//=
return
-
>
26. 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
^
Variables
+
%=
27. sets the file's current position
//=
^
file.seek()
else
28. 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.
read
in
-=
len()
29. The extension for Python scripts
a%b
/
.py
a//b
30. exponentiation
input()
a**b
>>
file.write(stuff)
31. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
int
%d
if
print()
32. exponent AND assignment operator
==
**=
=
-=
33. Where the parameters go. A necessary punctuation after any function even if it's empty.
-=
()
argv
del
34. Reads just one line of a text file.
a%b
<<
>
*readline
35. Symbol to subtract things from each other
-
close
round()
in
36. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
%s
&
<=
=
37. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
assignment
Variables
#
/
38. A logical operator which compares two operands and produces True if they are equal and False otherwise
math.sqrt(a)
argument variable
insert()
==
39. exponent AND assignment operator
**=
|
.py
%d
40. add AND assignment operator
*=
str()
close
+=
41. 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
continue
^
%r
-=
42. Symbol to divide by the number to the right of the symbol
/
class
%=
<
43. Symbol used to create comments
#
:
%=
&
44. inserts an item inside a list at a certain index
insert()
not in
len()
&
45. modulus AND assignment operator
%=
>>
len()
print
46. Function to open or read a file
open()
and
%=
except
47. Greater than symbol
for
a//b
format string
>
48. add AND assignment operator
append()
len()
class
+=
49. modulus AND assignment operator
print()
argv
math.sqrt(a)
%=
50. 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
//=
>>
print
except