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. A built-in function that converts its argument to a string.
raise
==
str
()
2. unction to read one line of a file
%s
len()
readline
%d
3. Less than symbol
%d
del
<
try
4. 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
<=
a%b
read
5. Argument variable
else
:
argv
open()
6. 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
<<
math.sqrt(a)
//=
*=
7. The extension for Python scripts
>>
not in
.py
del
8. A logical operator which compares two operands and produces True if they are equal and False otherwise
+
==
()
float
9. add AND assignment operator
Variables
abs(a)
+=
del
10. rounds a number to the number of decimal points you choose
truncate
round()
**=
del
11. This keyword begins the simplest form of a conditional statement.
if
open()
*readline
print
12. Function to open or read a file
open()
*readline
write
()
13. The extension for Python scripts
file.truncate()
read
.py
a%b
14. Greater than symbol
>
%s
round()
argument variable
15. A built-in function that converts integers and strings to floating-point numbers.
in
=
float
break
16. Symbol to add things together
+
int
len()
abs(a)
17. Writes stuff to the file.
in
close
*write(stuff)
len()
18. square root
math.sqrt(a)
Variables
in
else
19. divide AND assignment operator
<<
>=
/=
argv
20. Less than symbol
elif (Else if)
()
<
21. Less than or equal to symbol
a%b
+
|
<=
22. Symbol to subtract things from each other
*=
write
-
>>
23. exponentiation
<<
a**b
>=
len()
24. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
abs(a)
class
abs(a)
%
25. prints its parameter to the console
print()
floating point number
|
int
26. A statement that ends the current iteration of a loop but continues looping.
.py
continue
+=
try
27. A logical operator which compares two operands and produces True if they are equal and False otherwise
continue
==
^
print()
28. Prints a string to the screen which is converted using repr()
write
>
argv
%r
29. This keyword begins the simplest form of a conditional statement.
if
=
%d
assignment
30. turns an object into a string
<
print()
str()
int()
31. This keyword begins a header for a body that repeats until the condition is no longer true.
<=
str
print
while
32. Modulus operator. It's the remainder after division
def
*write(stuff)
%
33. prints its parameter to the console
print()
class
math.sqrt(a)
except
34. The keyword beginning a header that will create a new function.
def
-
str()
try
35. A statement that breaks out of a loop.
len()
round()
break
and
36. Empties the file - watch out if you care about the file.
open()
not in
>
*truncate
37. Function to close a file - it will not be able to be used again unless the file is opened.
&
pass
close
str
38. absolute value
~
abs(a)
%=
>
39. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
=
try
&
del
40. Create a variable.
is
=
del
.py
41. Function to write something to a file
write
&
round()
open()
42. Reads the contents of the file you can assign the result to a variable.
round()
close
/=
*read
43. divide AND assignment operator
file.write(stuff)
*=
round()
/=
44. This keyword in the body of a conditional - gives an alternative execution.
+
floating point number
else
argv
45. asks the user for a response and returns that response
input()
//=
argument variable
is not
46. Prevents a runtime error from stopping the program.
except
Variables
==
print
47. add AND assignment operator
|
+=
a//b
>
48. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
and
^
==
%s
49. writes stuff to the file
*truncate
file.write(stuff)
close
-=
50. Turns a line into a comment instead of executable code.
#
read
>>
~