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.
in
del
int
/
2. 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
try
str
3. An operator that removes a value from a list.
a**b
+
*readline
del
4. turns an object into a string
Variables
round()
file.seek()
str()
5. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
+=
<<
/
6. A built-in function that converts integers and strings to floating-point numbers.
/=
a**b
~
float
7. Prints a string to the screen which is a signed decimal.
print
abs(a)
%d
%s
8. The keyword beginning a header that will create a new function.
truncate
is not
abs(a)
def
9. turns an object into an integer
int()
%d
/
%
10. 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.
else
len()
in
&
11. Modulus operator. It's the remainder after division
read
%
n
print
12. Adds a new line character
n
a%b
read
*write(stuff)
13. A keyword that does nothing but fill space to indicate code which will be written later.
write
==
pass
math.sqrt(a)
14. Function to write something to a file
for
Variables
if
write
15. Function to empty the contents of a file - no recovery is possible
insert()
truncate
*
else
16. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
n
for
try
#
17. writes stuff to the file
*truncate
a//b
file.write(stuff)
%d
18. returns the length of a string (number of characters)
#
>=
%
len()
19. Greater than or equal symbol.
%s
not
print()
>=
20. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
raise
and
is
int
21. exponentiation
close
a**b
insert()
+=
22. A built-in function that converts its argument to a string.
+
>=
open()
str
23. deletes an item from a list
truncate
:
=
del
24. Symbol to subtract things from each other
str()
|
len()
-
25. Symbol to multiply things
*
close
floating point number
argument variable
26. Command to print to the screen
else
print
if
del
27. A statement that breaks out of a loop.
#
break
*truncate
in
28. Function to read the contents of a file
<
&
format string
read
29. rounds a number to the number of decimal points you choose
/=
round()
float
input()
30. A logical operator which compares two operands and produces True if they are equal and False otherwise
str()
>>
read
==
31. prints its parameter to the console
truncate
math.sqrt(a)
/
print()
32. subtract AND assignment operator
<<
-=
and
argument variable
33. Prints a string to the screen which will be Unicode.
%s
*
+
()
34. 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
|
close
truncate
^
35. This keyword begins the simplest form of a conditional statement.
if
str()
:
=
36. Symbol to divide by the number to the right of the symbol
**=
a//b
a**b
/
37. Symbol used to create comments
#
append()
*truncate
%
38. A data type for representing numbers with fractional values.
except
floating point number
is
in
39. Symbol to add things together
*
except
+
Variables
40. floor division
not
n
a//b
**=
41. A statement that displays a value on the screen.
()
a%b
print
%s
42. empties the file
file.truncate()
round()
insert()
write
43. inserts an item inside a list at a certain index
a//b
insert()
|
input()
44. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
/
%s
file.write(stuff)
class
45. Command to print to the screen
a//b
class
argv
print
46. Writes stuff to the file.
abs(a)
break
*write(stuff)
#
47. Less than or equal to symbol
del
read
int()
<=
48. multiply AND assignment operator
*=
=
close
>=
49. square root
raise
print
/=
math.sqrt(a)
50. Greater than or equal symbol.
>=
|
print()
in