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 data type for representing numbers with fractional values.
class
floating point number
==
except
2. Symbol to subtract things from each other
return
if
-
abs(a)
3. subtract AND assignment operator
&
Variables
%d
-=
4. rounds a number to the number of decimal points you choose
str()
break
=
round()
5. A keyword that does nothing but fill space to indicate code which will be written later.
truncate
pass
math.sqrt(a)
n
6. Command to print to the screen
~
print
**=
//=
7. End header line.
print()
<<
:
()
8. Less than symbol
==
<
^
%d
9. multiply AND assignment operator
%s
*=
read
//=
10. rounds a number to the number of decimal points you choose
round()
open()
print()
=
11. Modulus operator. It's the remainder after division
print()
%
truncate
=
12. prints its parameter to the console
print()
#
in
=
13. returns the length of a string (number of characters)
int()
~
<
len()
14. Argument variable
%
else
argv
=
15. This variable holds the arguments you pass to your Python script when you run it. Then you unpack it in your script so you have variables you can work with.
argument variable
len()
*=
file.seek()
16. Symbol to add things together
=
+
-
abs(a)
17. modulus AND assignment operator
%=
<
readline
def
18. exponentiation
str
a**b
not in
open()
19. absolute value
in
abs(a)
floating point number
print
20. This keyword in the body of a conditional - gives an alternative execution.
else
print
n
close
21. This keyword begins the simplest form of a conditional statement.
if
except
a**b
del
22. adds an item to a list
a%b
truncate
*
append()
23. This keyword begins a header for a body that repeats until the condition is no longer true.
round()
#
while
int()
24. Less than symbol
-=
<
=
25. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
*read
#
print
and
26. empties the file
file.truncate()
>>
argv
elif (Else if)
27. single line comment
%
a%b
#
//=
28. unction to read one line of a file
break
>
readline
pass
29. Argument variable
a**b
append()
argv
|
30. A logical operator which returns a value of True if either of the conditions is true.
print
Variables
or
open()
31. Where the parameters go. A necessary punctuation after any function even if it's empty.
or
#
()
a%b
32. add AND assignment operator
()
%
str
+=
33. floor division AND assignment operator
//=
file.seek()
truncate
raise
34. inserts an item inside a list at a certain index
del
insert()
<
n
35. assignment operator
=
:
print
file.write(stuff)
36. This keyword in the body of a conditional allows chained conditionals.
#
else
elif (Else if)
n
37. divide AND assignment operator
/=
insert()
readline
while
38. modulus AND assignment operator
.py
^
=
%=
39. square root
round()
read
math.sqrt(a)
print
40. A string that begins with the % symbol and contains a sequence of printable characters and format specifiers that determine how values output should look.
%=
in
format string
%r
41. An operator to check whether two variables refer to the same object.
str()
/
%r
is
42. Prints a string to the screen which is a signed decimal.
%d
append()
*=
readline
43. deletes an item from a list
+
%
del
**=
44. Prints a string to the screen which will be Unicode.
|
try
readline
%s
45. 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
.py
and
46. adds an item to a list
floating point number
append()
print
math.sqrt(a)
47. divide AND assignment operator
:
/=
%=
open()
48. Less than or equal to symbol
round()
|
<=
*=
49. exponent AND assignment operator
**=
elif (Else if)
abs(a)
%=
50. Turns a line into a comment instead of executable code.
>
.py
*write(stuff)
#