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. The extension for Python scripts
.py
%r
=
>=
2. A data type for representing numbers with fractional values.
floating point number
-
close
float
3. absolute value
assignment
abs(a)
break
%
4. unction to read one line of a file
readline
=
%r
close
5. Symbol used to create comments
*write(stuff)
math.sqrt(a)
and
#
6. A keyword that does nothing but fill space to indicate code which will be written later.
%=
pass
#
:
7. The keyword beginning a header that will create a new function.
def
%d
readline
//=
8. An operator to check whether two variables refer to the same object.
^
is
input()
insert()
9. This keyword in the body of a conditional allows chained conditionals.
abs(a)
elif (Else if)
def
%=
10. turns an object into an integer
insert()
*read
abs(a)
int()
11. add AND assignment operator
+=
-
#
>=
12. 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).
except
Variables
is not
^
13. rounds a number to the number of decimal points you choose
round()
input()
*read
int()
14. Modulus operator. It's the remainder after division
#
print
round()
%
15. Argument variable
/=
argv
write
insert()
16. 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
readline
:
<<
>=
17. This keyword begins the simplest form of a conditional statement.
raise
print
truncate
if
18. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
//=
readline
and
19. Less than symbol
*
#
<
append()
20. This keyword in the body of a conditional - gives an alternative execution.
else
math.sqrt(a)
>>
/
21. Symbol to multiply things
+
round()
print
*
22. A statement that ends the current iteration of a loop but continues looping.
print()
continue
readline
<<
23. An operator that removes a value from a list.
~
del
<=
for
24. subtract AND assignment operator
()
-=
:
str()
25. This keyword begins a header for a body that repeats until the condition is no longer true.
math.sqrt(a)
while
-
argument variable
26. divide AND assignment operator
argv
argument variable
readline
/=
27. End header line.
&
:
%s
print
28. square root
round()
**=
*truncate
math.sqrt(a)
29. modulus AND assignment operator
print
while
%=
+
30. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
a%b
a**b
%
31. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
+=
~
format string
readline
32. The extension for Python scripts
format string
==
is
.py
33. Symbol to add things together
input()
/=
+
%=
34. multiply AND assignment operator
**=
()
*=
#
35. empties the file
&
>
format string
file.truncate()
36. A logical operator which negates an expression so that it returns a value of True if the expression is false.
a//b
not
#
else
37. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
a%b
n
//=
|
38. square root
+
#
math.sqrt(a)
for
39. Command to print to the screen
str
print
a**b
while
40. Create a variable.
is
|
=
a%b
41. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
&
/
write
Variables
42. Reads the contents of the file you can assign the result to a variable.
raise
float
*read
/=
43. This keyword in the body of a conditional - gives an alternative execution.
file.seek()
>=
else
%
44. Writes stuff to the file.
assignment
#
def
*write(stuff)
45. sets the file's current position
close
file.seek()
not
**=
46. inserts an item inside a list at a certain index
~
readline
abs(a)
insert()
47. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
abs(a)
and
input()
break
48. inserts an item inside a list at a certain index
%d
insert()
open()
*
49. deletes an item from a list
file.seek()
del
-=
==
50. Argument variable
argv
%s
in
n