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. rounds a number to the number of decimal points you choose
//=
~
read
round()
2. 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
float
<<
>=
truncate
3. A statement that assigns a value to a variable.
assignment
=
argv
+=
4. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
=
format string
+=
5. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
for
break
#
in
6. Prints a string to the screen which is a signed decimal.
/=
file.write(stuff)
return
%d
7. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
str()
=
int
truncate
8. Adds a new line character
n
a//b
file.seek()
*
9. Symbol used to create comments
#
<=
elif (Else if)
len()
10. add AND assignment operator
print()
+=
==
append()
11. adds an item to a list
a**b
>=
append()
~
12. exponentiation
a**b
except
%s
int()
13. Prevents a runtime error from stopping the program.
except
-=
=
def
14. Less than symbol
pass
*truncate
:
<
15. square root
math.sqrt(a)
and
file.write(stuff)
def
16. A logical operator which requires two expressions to both be true.
<
and
/
abs(a)
17. divide AND assignment operator
a**b
~
/=
**=
18. Less than or equal to symbol
read
*write(stuff)
is not
<=
19. Greater than or equal symbol.
//=
^
>=
*truncate
20. An operator to check whether two variables refer to the same object.
is
elif (Else if)
continue
if
21. Greater than or equal symbol.
open()
>=
~
*readline
22. prints its parameter to the console
%=
-
print()
len()
23. subtract AND assignment operator
-=
del
*truncate
file.write(stuff)
24. Symbol to subtract things from each other
<
^
-
*=
25. floor division AND assignment operator
~
print()
try
//=
26. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
file.write(stuff)
and
&
<=
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.
=
in
is not
28. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
Variables
**=
#
^
29. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
format string
a%b
in
+
30. assignment operator
pass
=
int
return
31. Function to read the contents of a file
*=
read
-=
<<
32. This statement causes an exception.
def
raise
==
&
33. A logical operator which returns a value of True if either of the conditions is true.
break
>>
or
.py
34. Where the parameters go. A necessary punctuation after any function even if it's empty.
for
()
|
<<
35. The keyword beginning a header that will create a new function.
in
append()
def
/=
36. A statement that breaks out of a loop.
open()
write
//=
break
37. A statement that ends the current iteration of a loop but continues looping.
#
a%b
close
continue
38. adds an item to a list
a//b
write
%=
append()
39. Adds a new line character
=
len()
n
*=
40. turns an object into a string
is
str()
write
append()
41. 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
|
^
is
insert()
42. Argument variable
argv
del
a%b
43. square root
def
math.sqrt(a)
*readline
truncate
44. Create a variable.
close
=
.py
n
45. A logical operator which compares two operands and produces True if they are equal and False otherwise
~
print()
==
argument variable
46. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
<=
>>
=
47. Function to empty the contents of a file - no recovery is possible
is not
=
^
truncate
48. exponent AND assignment operator
round()
del
**=
-
49. 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
#
<
.py
>>
50. exponent AND assignment operator
//=
print
print
**=