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. ,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.
%r
%s
file.readline()
2. Function to close a file - it will not be able to be used again unless the file is opened.
:
str()
argv
close
3. Prints a string to the screen which will be Unicode.
a//b
math.sqrt(a)
if
%s
4. Adds a new line character
return
*write(stuff)
&
n
5. Prints a string to the screen which will be Unicode.
#
file.readline()
a**b
%s
6. Argument variable
>>
argv
%
Variables
7. Less than symbol
<
+
readline
return
8. deletes an item from a list
a//b
del
str
*readline
9. turns an object into a string
str()
>
&
%
10. absolute value
abs(a)
str()
int()
write
11. add AND assignment operator
#
>>
+=
if
12. Create a variable.
=
<=
<=
Variables
13. multiply AND assignment operator
print()
*=
*
//=
14. prints its parameter to the console
int()
in
print()
=
15. End header line.
:
%r
**=
read
16. Greater than or equal symbol.
a%b
-
round()
>=
17. Greater than or equal symbol.
-
*read
while
>=
18. 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
try
&
19. Symbol to divide by the number to the right of the symbol
truncate
insert()
>
/
20. Function to open or read a file
()
close
open()
:
21. floor division
del
=
/
a//b
22. Adds a new line character
and
not
==
n
23. Empties the file - watch out if you care about the file.
*truncate
is not
#
%d
24. A built-in function that converts its argument to a string.
~
abs(a)
str
input()
25. Modulus operator. It's the remainder after division
for
read
%
26. returns the length of a string (number of characters)
Variables
append()
input()
len()
27. unction to read one line of a file
>>
readline
<<
|
28. Less than or equal to symbol
in
<
<=
for
29. multiply AND assignment operator
#
*=
truncate
elif (Else if)
30. Prints a string to the screen which is a signed decimal.
try
%r
%d
a**b
31. Function to write something to a file
>
write
%s
a%b
32. 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
int
math.sqrt(a)
+=
>>
33. deletes an item from a list
&
del
()
=
34. This keyword in the body of a conditional - gives an alternative execution.
print()
*=
else
is not
35. The extension for Python scripts
%
def
*readline
.py
36. prints its parameter to the console
print()
input()
*
float
37. A logical operator which returns a value of True if either of the conditions is true.
is
or
n
-
38. Greater than symbol
argv
write
#
>
39. modulus AND assignment operator
%=
^
argv
for
40. A data type for representing numbers with fractional values.
&
floating point number
print()
<
41. The keyword beginning a header that will create a loop.
*write(stuff)
=
for
|
42. asks the user for a response and returns that response
input()
~
<<
#
43. modulo
truncate
/=
a%b
%s
44. Prints a string to the screen which is converted using repr()
%r
/=
/
input()
45. rounds a number to the number of decimal points you choose
round()
append()
/=
file.truncate()
46. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
int
=
//=
str()
47. Function to empty the contents of a file - no recovery is possible
truncate
%=
continue
*write(stuff)
48. Function to empty the contents of a file - no recovery is possible
*readline
/
truncate
+=
49. square root
continue
close
math.sqrt(a)
>
50. An operator that removes a value from a list.
>=
del
len()
>>