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. multiply AND assignment operator
*=
append()
%d
<
2. Turns a line into a comment instead of executable code.
insert()
%
#
close
3. 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.
not in
>=
while
>>
4. Writes stuff to the file.
+=
a%b
*write(stuff)
is not
5. A logical operator which compares two operands and produces True if they are equal and False otherwise
floating point number
file.seek()
int
==
6. This statement causes an exception.
read
input()
+=
raise
7. A built-in function that converts its argument to a string.
-
read
=
str
8. rounds a number to the number of decimal points you choose
file.write(stuff)
=
del
round()
9. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
n
|
+=
+
10. A logical operator which negates an expression so that it returns a value of True if the expression is false.
not
readline
input()
write
11. A keyword that does nothing but fill space to indicate code which will be written later.
+
pass
/
<
12. returns the length of a string (number of characters)
#
print()
<=
len()
13. subtract AND assignment operator
-=
open()
input()
>>
14. Less than symbol
truncate
<
*readline
in
15. Prints a string to the screen which is a signed decimal.
>>
%d
()
&
16. Function to empty the contents of a file - no recovery is possible
readline
abs(a)
%s
truncate
17. Symbol to divide by the number to the right of the symbol
#
is not
a//b
/
18. modulo
a%b
%=
/
input()
19. Function to read the contents of a file
argument variable
raise
read
round()
20. add AND assignment operator
%s
+=
n
<=
21. asks the user for a response and returns that response
input()
>=
/=
%
22. Symbol to divide by the number to the right of the symbol
~
*
%r
/
23. Create a variable.
str()
=
if
str()
24. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
**=
~
~
int
25. This keyword in the body of a conditional allows chained conditionals.
/
elif (Else if)
len()
argument variable
26. square root
math.sqrt(a)
truncate
#
pass
27. ,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.
^
.py
input()
28. Modulus operator. It's the remainder after division
<<
write
*truncate
%
29. turns an object into an integer
*truncate
int()
Variables
&
30. modulo
.py
a%b
/
len()
31. Greater than symbol
truncate
>
print
def
32. Function to open or read a file
print
del
open()
<=
33. This keyword in the body of a conditional - gives an alternative execution.
argument variable
*=
//=
else
34. Greater than or equal symbol.
append()
format string
>=
*read
35. Prevents a runtime error from stopping the program.
close
+
except
*readline
36. exponent AND assignment operator
file.seek()
close
**=
|
37. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
argv
format string
#
&
38. single line comment
#
write
/=
is not
39. A statement that ends the current iteration of a loop but continues looping.
:
continue
%s
=
40. End header line.
except
:
append()
str
41. assignment operator
%d
not in
&
=
42. The keyword beginning a header that will create a loop.
round()
>
for
~
43. 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
del
for
assignment
>>
44. turns an object into a string
=
str()
=
.py
45. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
read
abs(a)
~
print()
46. Prints a string to the screen which will be Unicode.
a**b
math.sqrt(a)
*
%s
47. A built-in function that converts integers and strings to floating-point numbers.
%d
>>
float
+
48. Adds something to a variable
%s
read
or
=
49. Where the parameters go. A necessary punctuation after any function even if it's empty.
insert()
()
insert()
&
50. Symbol to add things together
:
+
pass
file.write(stuff)