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. Writes stuff to the file.
*write(stuff)
*=
//=
*
2. modulo
readline
a%b
>>
file.readline()
3. Symbol to multiply things
^
*
close
=
4. divide AND assignment operator
*
and
round()
/=
5. 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
~
^
not in
a%b
6. absolute value
>>
argument variable
abs(a)
read
7. Prints a string to the screen which will be Unicode.
open()
else
str()
%s
8. exponentiation
class
.py
file.seek()
a**b
9. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
read
floating point number
~
&
10. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
str()
format string
Variables
except
11. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
del
try
/=
<=
12. A keyword that does nothing but fill space to indicate code which will be written later.
+
pass
float
%r
13. Reads the contents of the file you can assign the result to a variable.
*read
in
if
input()
14. Symbol to divide by the number to the right of the symbol
is not
/
math.sqrt(a)
argv
15. This statement exits a function. The remaining lines of the function are not executed.
return
^
<
>=
16. Symbol to subtract things from each other
**=
%=
-
//=
17. The keyword beginning a header that will create a loop.
#
int()
==
for
18. This keyword begins the simplest form of a conditional statement.
if
%=
pass
a//b
19. Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand. a << 2 will give 240 which is 1111 0000
-=
<<
for
if
20. Empties the file - watch out if you care about the file.
def
*truncate
except
-
21. turns an object into an integer
int()
round()
argv
>>
22. The extension for Python scripts
del
.py
not
<<
23. Function to close a file - it will not be able to be used again unless the file is opened.
close
#
insert()
print
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
Variables
for
%r
>>
25. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
and
is not
==
str
26. This keyword in the body of a conditional - gives an alternative execution.
append()
=
else
raise
27. A data type for representing numbers with fractional values.
math.sqrt(a)
floating point number
str()
%r
28. sets the file's current position
file.seek()
write
#
raise
29. assignment operator
a%b
=
input()
append()
30. floor division AND assignment operator
|
str()
//=
write
31. 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
a//b
^
//=
=
32. deletes an item from a list
write
del
file.truncate()
*=
33. floor division
pass
a//b
or
str()
34. Adds a new line character
()
n
elif (Else if)
print
35. Prints a string to the screen which is a signed decimal.
>=
%=
argument variable
%d
36. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
+=
in
else
and
37. multiply AND assignment operator
is
*=
^
append()
38. Less than symbol
<
if
|
=
39. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
%
else
len()
40. Command to print to the screen
print
>
//=
int()
41. unction to read one line of a file
continue
-
//=
readline
42. A logical operator which compares two operands and produces True if they are equal and False otherwise
/=
str()
==
a//b
43. Symbol to subtract things from each other
a%b
-=
-
int()
44. A statement that assigns a value to a variable.
a%b
read
insert()
assignment
45. unction to read one line of a file
file.readline()
readline
*=
file.truncate()
46. Greater than or equal symbol.
>=
class
%r
readline
47. add AND assignment operator
<=
readline
+=
=
48. Prints a string to the screen which is converted using repr()
.py
%r
*
close
49. ,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.
=
n
for
50. modulus AND assignment operator
<=
>=
>
%=