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. 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
a%b
a**b
<<
close
2. Where the parameters go. A necessary punctuation after any function even if it's empty.
open()
str()
%r
()
3. assignment operator
<
=
and
**=
4. writes stuff to the file
argument variable
argv
file.write(stuff)
assignment
5. Greater than symbol
<
>
<
=
6. exponentiation
in
Variables
a**b
truncate
7. This keyword in the body of a conditional - gives an alternative execution.
~
open()
else
write
8. Evaluates to false if the variables on either side of the operator point to the same object and true otherwise. x is not y - here is not results in 1 if id(x) is not equal to id(y).
is not
open()
except
~
9. Create a variable.
abs(a)
=
#
//=
10. Symbol to subtract things from each other
#
-
.py
file.readline()
11. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
str
file.seek()
argv
~
12. A statement that breaks out of a loop.
<<
elif (Else if)
break
except
13. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
not
~
abs(a)
14. modulo
a%b
a**b
len()
floating point number
15. A built-in function that converts its argument to a string.
return
str
a**b
^
16. Symbol to add things together
%
+
=
%=
17. 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.
a//b
in
break
*
18. Function to open or read a file
n
a%b
open()
^
19. Adds something to a variable
=
>>
a**b
is
20. 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
^
if
for
argument variable
21. Prints a string to the screen which will be Unicode.
if
|
%s
n
22. inserts an item inside a list at a certain index
==
truncate
insert()
abs(a)
23. The keyword beginning a header that will create a new function.
//=
for
def
round()
24. multiply AND assignment operator
a//b
abs(a)
*=
<
25. Adds something to a variable
=
int()
readline
>=
26. A keyword that does nothing but fill space to indicate code which will be written later.
n
pass
format string
else
27. Prevents a runtime error from stopping the program.
except
break
insert()
*
28. adds an item to a list
truncate
+=
>>
append()
29. multiply AND assignment operator
*=
/
^
<<
30. divide AND assignment operator
append()
a%b
/=
*write(stuff)
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
assignment
print
^
~
32. modulus AND assignment operator
%=
file.truncate()
insert()
%s
33. Prints a string to the screen which is converted using repr()
+=
~
if
%r
34. Reads the contents of the file you can assign the result to a variable.
len()
*read
==
//=
35. End header line.
print()
#
print
:
36. single line comment
#
and
|
else
37. This statement exits a function. The remaining lines of the function are not executed.
file.readline()
insert()
return
input()
38. Symbol to subtract things from each other
<<
~
int
-
39. reads just one line of a text file & keeps track of where in the file you're at
file.truncate()
class
file.readline()
-=
40. empties the file
append()
file.truncate()
for
input()
41. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
+=
()
**=
int
42. absolute value
abs(a)
/=
int()
write
43. deletes an item from a list
a%b
&
del
+
44. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
try
<<
write
del
45. Less than or equal to symbol
<=
is not
pass
truncate
46. unction to read one line of a file
print
break
float
readline
47. A logical operator which requires two expressions to both be true.
<
file.truncate()
and
del
48. Greater than or equal symbol.
>
//=
>=
=
49. Argument variable
%
argv
>>
<
50. floor division AND assignment operator
read
except
//=
*truncate