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. Symbol to multiply things
and
*
int
>>
2. Less than or equal to symbol
write
<=
input()
>=
3. modulo
%=
insert()
|
a%b
4. Symbol used to create comments
>=
//=
#
%d
5. The keyword beginning a header that will create a new function.
def
file.readline()
-=
a%b
6. Greater than symbol
%s
/
>
continue
7. Argument variable
argv
or
elif (Else if)
+=
8. Modulus operator. It's the remainder after division
>
%
truncate
is not
9. 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
<<
a%b
def
print
10. exponentiation
write
not
a**b
file.readline()
11. Function to read the contents of a file
a//b
read
insert()
n
12. divide AND assignment operator
/=
del
floating point number
readline
13. adds an item to a list
append()
^
floating point number
*=
14. assignment operator
&
**=
/
=
15. Adds something to a variable
>>
Variables
<
=
16. This statement causes an exception.
truncate
format string
raise
close
17. A logical operator which compares two operands and produces True if they are equal and False otherwise
if
==
or
>=
18. subtract AND assignment operator
*truncate
-=
|
n
19. unction to read one line of a file
=
%d
readline
=
20. The extension for Python scripts
a//b
*read
.py
is not
21. deletes an item from a list
<<
in
del
abs(a)
22. floor division
>=
def
a//b
=
23. prints its parameter to the console
%r
%d
print()
#
24. End header line.
del
:
truncate
del
25. An operator to check whether two variables refer to the same object.
is
readline
format string
-=
26. Symbol to divide by the number to the right of the symbol
/
print
insert()
.py
27. square root
#
%
&
math.sqrt(a)
28. Adds something to a variable
while
a%b
:
=
29. A data type for representing numbers with fractional values.
#
floating point number
a%b
print
30. turns an object into a string
str()
()
%
^
31. The keyword beginning a header that will create a loop.
for
**=
>
del
32. This keyword in the body of a conditional - gives an alternative execution.
else
/
*=
assignment
33. writes stuff to the file
math.sqrt(a)
file.write(stuff)
readline
del
34. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
>
%d
a%b
35. floor division AND assignment operator
//=
<<
append()
input()
36. A statement that breaks out of a loop.
Variables
input()
a%b
break
37. 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.
read
<
not in
38. multiply AND assignment operator
open()
-
*=
del
39. Prints a string to the screen which is converted using repr()
=
%r
^
close
40. Reads the contents of the file you can assign the result to a variable.
>>
*read
write
format string
41. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
>=
close
def
42. Argument variable
argv
/=
abs(a)
truncate
43. Prints a string to the screen which will be Unicode.
==
%s
floating point number
==
44. multiply AND assignment operator
format string
*=
math.sqrt(a)
in
45. turns an object into an integer
except
int()
float
>
46. Create a variable.
for
while
=
()
47. Symbol to subtract things from each other
/=
-
print
file.truncate()
48. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
del
**=
~
*truncate
49. Prevents a runtime error from stopping the program.
input()
except
-
insert()
50. asks the user for a response and returns that response
input()
#
print()
**=