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. This keyword in the body of a conditional allows chained conditionals.
+=
elif (Else if)
*readline
//=
2. Prints a string to the screen which is a signed decimal.
abs(a)
-
%d
3. A data type for representing numbers with fractional values.
if
=
<<
floating point number
4. prints its parameter to the console
<<
print()
return
<
5. A logical operator which requires two expressions to both be true.
-=
close
and
%
6. divide AND assignment operator
+
a//b
def
/=
7. Modulus operator. It's the remainder after division
Variables
+=
%
=
8. A statement that displays a value on the screen.
print
*truncate
Variables
append()
9. Symbol to multiply things
len()
and
pass
*
10. multiply AND assignment operator
=
Variables
=
*=
11. rounds a number to the number of decimal points you choose
file.write(stuff)
#
in
round()
12. 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
int()
^
in
n
13. 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
for
abs(a)
#
>>
14. Less than symbol
=
*readline
%d
<
15. Prints a string to the screen which will be Unicode.
%s
=
.py
+=
16. This keyword in the body of a conditional - gives an alternative execution.
&
%r
for
else
17. Less than or equal to symbol
<=
=
write
<<
18. Argument variable
argv
**=
in
a//b
19. Greater than or equal symbol.
argument variable
-=
>=
a//b
20. 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.
file.write(stuff)
<=
a//b
not in
21. Function to open or read a file
=
open()
%s
-
22. The keyword beginning a header that will create a new function.
if
def
len()
23. unction to read one line of a file
:
del
readline
try
24. Writes stuff to the file.
if
read
truncate
*write(stuff)
25. exponentiation
=
for
^
a**b
26. Prints a string to the screen which is converted using repr()
return
+
assignment
%r
27. unction to read one line of a file
>=
readline
/
file.seek()
28. Where the parameters go. A necessary punctuation after any function even if it's empty.
=
=
()
**=
29. 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
a//b
%s
%=
30. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
try
-=
write
&
31. An operator to check whether two variables refer to the same object.
open()
a%b
/
is
32. add AND assignment operator
file.truncate()
()
+=
Variables
33. The extension for Python scripts
<<
break
:
.py
34. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
#
|
Variables
>
35. An operator that removes a value from a list.
abs(a)
|
<=
del
36. ,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.
and
for
*
37. Symbol to multiply things
pass
//=
file.truncate()
*
38. Command to print to the screen
str
<<
read
print
39. The keyword beginning a header that will create a new function.
del
def
~
int()
40. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
<<
%r
>>
in
41. Less than or equal to symbol
a**b
is
%d
<=
42. Create a variable.
=
floating point number
read
close
43. Symbol to add things together
+
|
for
//=
44. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
Variables
and
argv
-=
45. 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
()
input()
n
<<
46. single line comment
not
while
else
#
47. returns the length of a string (number of characters)
-=
str()
.py
len()
48. 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
a**b
>>
()
#
49. multiply AND assignment operator
file.seek()
format string
*=
try
50. rounds a number to the number of decimal points you choose
round()
del
pass
.py