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 string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
=
=
format string
print
2. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
int
round()
open()
Variables
3. The keyword beginning a header that will create a loop.
for
.py
print
int
4. modulo
argv
#
a%b
not
5. turns an object into a string
=
+=
()
str()
6. adds an item to a list
print
append()
argv
%
7. floor division
a//b
%s
str
-
8. A logical operator which negates an expression so that it returns a value of True if the expression is false.
#
not
=
%
9. divide AND assignment operator
abs(a)
continue
/=
=
10. This statement exits a function. The remaining lines of the function are not executed.
is
:
file.readline()
return
11. unction to read one line of a file
=
file.write(stuff)
readline
=
12. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
*read
a//b
raise
class
13. asks the user for a response and returns that response
input()
~
+
int
14. Command to print to the screen
len()
%d
print
:
15. This keyword begins a header for a body that repeats until the condition is no longer true.
def
while
write
<<
16. deletes an item from a list
-=
del
%d
float
17. ,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.
for
a**b
()
18. 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
argv
/
print()
>>
19. This keyword in the body of a conditional - gives an alternative execution.
*
-=
>>
else
20. Prints a string to the screen which is a signed decimal.
%d
insert()
readline
=
21. modulo
insert()
a%b
~
is
22. Create a variable.
-=
=
and
is not
23. Symbol to add things together
abs(a)
int()
a**b
+
24. This keyword begins the simplest form of a conditional statement.
print
if
#
insert()
25. Function to empty the contents of a file - no recovery is possible
truncate
=
>>
26. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
a//b
print
and
27. Symbol to subtract things from each other
|
**=
read
-
28. Reads the contents of the file you can assign the result to a variable.
str()
*read
except
while
29. 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.
abs(a)
input()
not in
a//b
30. Adds something to a variable
file.truncate()
=
argv
==
31. Argument variable
break
str()
argv
+=
32. A data type for representing numbers with fractional values.
read
append()
a//b
floating point number
33. empties the file
a%b
==
file.truncate()
/
34. modulus AND assignment operator
&
:
not
%=
35. sets the file's current position
if
%
<<
file.seek()
36. Function to empty the contents of a file - no recovery is possible
>=
truncate
//=
round()
37. Function to write something to a file
write
input()
math.sqrt(a)
a**b
38. assignment operator
del
=
open()
write
39. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
try
input()
a**b
>=
40. Reads just one line of a text file.
/=
*readline
not in
elif (Else if)
41. Function to open or read a file
*
open()
<<
in
42. returns the length of a string (number of characters)
+
floating point number
a//b
len()
43. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
+=
float
~
Variables
44. Less than or equal to symbol
&
print()
<=
*truncate
45. turns an object into a string
str()
and
|
*truncate
46. Symbol used to create comments
is not
def
int
#
47. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
def
>>
in
/
48. A logical operator which returns a value of True if either of the conditions is true.
a//b
**=
or
break
49. Less than or equal to symbol
append()
<=
>>
#
50. A logical operator which requires two expressions to both be true.
close
and
for
else