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 XOR Operator copies the bit if it is set in one operand but not both. (a ^ b) will give 49 which is 0011 0001
file.write(stuff)
^
pass
%s
2. A statement that displays a value on the screen.
a%b
<=
print
truncate
3. A keyword that does nothing but fill space to indicate code which will be written later.
or
pass
return
insert()
4. A logical operator which requires two expressions to both be true.
is
%
and
file.write(stuff)
5. turns an object into a string
==
str()
%d
//=
6. A logical operator which returns a value of True if either of the conditions is true.
in
or
assignment
readline
7. Less than or equal to symbol
close
<=
file.readline()
argv
8. square root
try
not
math.sqrt(a)
*=
9. reads just one line of a text file & keeps track of where in the file you're at
=
>
==
file.readline()
10. Greater than symbol
print()
>
*=
continue
11. deletes an item from a list
del
print()
else
**=
12. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
<=
return
print()
and
13. exponentiation
%s
%d
>=
a**b
14. Prints a string to the screen which will be Unicode.
input()
continue
%s
/
15. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
#
del
*=
16. Symbol used to create comments
>
#
append()
=
17. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
/=
|
*
def
18. returns the length of a string (number of characters)
len()
-=
read
*readline
19. Symbol to multiply things
*
<<
int()
%s
20. multiply AND assignment operator
round()
*=
*read
|
21. exponentiation
a**b
if
file.truncate()
str()
22. A statement that ends the current iteration of a loop but continues looping.
%r
continue
-
in
23. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
>=
math.sqrt(a)
>
format string
24. Symbol to subtract things from each other
-
try
Variables
append()
25. An operator that removes a value from a list.
input()
del
argv
print
26. Greater than or equal symbol.
>>
>=
close
readline
27. Symbol to divide by the number to the right of the symbol
/
-
read
else
28. asks the user for a response and returns that response
math.sqrt(a)
int
format string
input()
29. Function to empty the contents of a file - no recovery is possible
**=
truncate
//=
print
30. modulus AND assignment operator
*truncate
class
=
%=
31. deletes an item from a list
print()
del
else
file.readline()
32. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
not in
close
int
print
33. Function to empty the contents of a file - no recovery is possible
if
truncate
a//b
>>
34. floor division
>>
a//b
n
+
35. Modulus operator. It's the remainder after division
%=
argument variable
len()
%
36. 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
>>
read
math.sqrt(a)
<<
37. The extension for Python scripts
%r
**=
.py
%
38. single line comment
math.sqrt(a)
#
-=
print
39. A statement that assigns a value to a variable.
assignment
is
%
else
40. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
file.write(stuff)
close
math.sqrt(a)
~
41. Reads just one line of a text file.
print
*readline
append()
a**b
42. 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
open()
insert()
^
43. Prevents a runtime error from stopping the program.
except
print()
%d
format string
44. rounds a number to the number of decimal points you choose
file.readline()
+=
round()
>>
45. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
/=
append()
str()
46. Command to print to the screen
-=
math.sqrt(a)
print
a**b
47. A data type for representing numbers with fractional values.
insert()
floating point number
**=
|
48. floor division AND assignment operator
*write(stuff)
/=
%
//=
49. assignment operator
for
<=
=
()
50. Greater than symbol
str
>
open()
floating point number