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 converts its argument to a string.
str
:
>
while
2. This keyword begins the simplest form of a conditional statement.
close
if
n
/
3. multiply AND assignment operator
*=
append()
-=
()
4. An operator that removes a value from a list.
#
print
del
|
5. Modulus operator. It's the remainder after division
file.truncate()
%
==
else
6. Turns a line into a comment instead of executable code.
#
-
-=
>
7. Empties the file - watch out if you care about the file.
>=
open()
*truncate
readline
8. floor division
abs(a)
a//b
>
a%b
9. This keyword begins the simplest form of a conditional statement.
if
int()
+
is
10. Function to write something to a file
write
*readline
def
try
11. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
n
#
|
^
12. A data type for representing numbers with fractional values.
insert()
floating point number
//=
=
13. 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.
=
n
not in
read
14. Prints a string to the screen which is a signed decimal.
=
%d
<=
=
15. Command to print to the screen
print
:
a**b
/
16. Prints a string to the screen which will be Unicode.
%s
<
else
a//b
17. The keyword beginning a header that will create a loop.
for
<
/=
()
18. returns the length of a string (number of characters)
write
len()
=
:
19. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
read
is
Variables
round()
20. Greater than or equal symbol.
>=
Variables
**=
append()
21. deletes an item from a list
del
raise
assignment
Variables
22. Prints a string to the screen which is converted using repr()
abs(a)
*
n
%r
23. absolute value
>
truncate
abs(a)
+
24. floor division AND assignment operator
str()
pass
//=
a**b
25. prints its parameter to the console
-
print()
=
file.seek()
26. ,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.
class
**=
int()
27. Greater than symbol
int()
>
%
print
28. A statement that breaks out of a loop.
break
float
&
n
29. modulo
in
append()
a%b
readline
30. Reads the contents of the file you can assign the result to a variable.
>>
*read
=
print
31. empties the file
file.truncate()
try
file.readline()
str()
32. The extension for Python scripts
readline
round()
.py
print
33. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
#
and
()
Variables
34. 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
continue
input()
>>
=
35. Symbol to multiply things
print
except
append()
*
36. inserts an item inside a list at a certain index
//=
**=
insert()
-
37. A built-in function that converts integers and strings to floating-point numbers.
<=
%
input()
float
38. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
floating point number
Variables
format string
print
39. turns an object into a string
file.truncate()
else
str()
%r
40. floor division
|
a//b
read
#
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
math.sqrt(a)
and
&
^
42. turns an object into an integer
()
%r
a%b
int()
43. writes stuff to the file
append()
//=
return
file.write(stuff)
44. turns an object into an integer
.py
<
int()
and
45. A logical operator which returns a value of True if either of the conditions is true.
or
argv
:
+=
46. Argument variable
argv
~
return
print
47. A keyword that does nothing but fill space to indicate code which will be written later.
continue
pass
floating point number
math.sqrt(a)
48. 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
^
len()
-=
str
49. Adds a new line character
except
append()
n
()
50. returns the length of a string (number of characters)
len()
=
^
if