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. Symbol to add things together
append()
int()
&
+
2. A logical operator which negates an expression so that it returns a value of True if the expression is false.
try
%d
not
break
3. Function to close a file - it will not be able to be used again unless the file is opened.
len()
/=
len()
close
4. Function to close a file - it will not be able to be used again unless the file is opened.
.py
a//b
close
input()
5. deletes an item from a list
del
int
&
n
6. Prints a string to the screen which will be Unicode.
else
%s
print
Variables
7. unction to read one line of a file
readline
close
|
print()
8. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
>=
not
&
class
9. returns the length of a string (number of characters)
len()
def
a//b
math.sqrt(a)
10. 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).
a%b
in
==
is not
11. exponent AND assignment operator
for
**=
%s
in
12. Symbol used to create comments
>=
>
#
a%b
13. inserts an item inside a list at a certain index
n
str()
floating point number
insert()
14. unction to read one line of a file
truncate
=
print()
readline
15. Symbol to subtract things from each other
-
+
a%b
<<
16. square root
/
for
math.sqrt(a)
17. Function to open or read a file
open()
%
str
18. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
a%b
class
>=
~
19. returns the length of a string (number of characters)
argv
def
raise
len()
20. Function to empty the contents of a file - no recovery is possible
truncate
&
print
print
21. Greater than symbol
argv
<<
input()
>
22. Less than symbol
file.readline()
<
if
close
23. Greater than or equal symbol.
<<
in
>=
append()
24. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
print
int
if
%
25. Argument variable
/=
/
math.sqrt(a)
argv
26. Create a variable.
del
%
file.seek()
=
27. prints its parameter to the console
>>
file.seek()
print()
print
28. absolute value
close
abs(a)
:
float
29. The extension for Python scripts
write
len()
=
.py
30. Symbol used to create comments
//=
-
#
//=
31. add AND assignment operator
not
**=
+=
/=
32. 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
print
%=
except
^
33. Prints a string to the screen which is converted using repr()
readline
and
*
%r
34. A built-in function that converts integers and strings to floating-point numbers.
%r
float
//=
+
35. Greater than symbol
>
Variables
elif (Else if)
<=
36. Less than or equal to symbol
**=
close
abs(a)
<=
37. empties the file
/
%s
file.truncate()
except
38. This statement causes an exception.
raise
=
is
n
39. assignment operator
-
def
=
len()
40. single line comment
or
a**b
else
#
41. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
argument variable
del
open()
in
42. 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
open()
file.readline()
and
>>
43. This keyword in the body of a conditional - gives an alternative execution.
else
readline
str
class
44. Symbol to multiply things
:
*
close
read
45. This keyword begins the simplest form of a conditional statement.
if
+
for
continue
46. Argument variable
readline
argv
%d
not
47. absolute value
abs(a)
%
raise
int()
48. An operator that removes a value from a list.
del
*write(stuff)
//=
+=
49. asks the user for a response and returns that response
input()
=
len()
close
50. modulo
a%b
=
==
%r