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 divide by the number to the right of the symbol
#
/
file.seek()
-=
2. Adds something to a variable
=
print()
%=
>=
3. add AND assignment operator
+=
del
%s
a%b
4. exponentiation
/
str()
a**b
if
5. modulus AND assignment operator
%=
append()
readline
print
6. Function to empty the contents of a file - no recovery is possible
truncate
%r
a**b
:
7. Command to print to the screen
Variables
is
print
and
8. Function to write something to a file
write
file.seek()
=
in
9. Symbol to subtract things from each other
-
>
len()
or
10. rounds a number to the number of decimal points you choose
==
not
%d
round()
11. unction to read one line of a file
>=
readline
%d
12. Turns a line into a comment instead of executable code.
for
:
file.truncate()
#
13. returns the length of a string (number of characters)
*readline
len()
math.sqrt(a)
floating point number
14. subtract AND assignment operator
%r
except
argv
-=
15. 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
//=
16. turns an object into an integer
in
readline
int()
a%b
17. sets the file's current position
round()
//=
append()
file.seek()
18. subtract AND assignment operator
#
-=
%d
for
19. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
Variables
class
a%b
float
20. square root
math.sqrt(a)
-=
|
#
21. Symbol to multiply things
()
*
=
%r
22. turns an object into a string
str()
math.sqrt(a)
&
=
23. Function to open or read a file
open()
+=
>
round()
24. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
not
**=
*
25. single line comment
#
read
~
format string
26. The keyword beginning a header that will create a loop.
#
print
is not
for
27. Adds a new line character
:
round()
n
>
28. divide AND assignment operator
=
%r
/=
del
29. prints its parameter to the console
+
not in
math.sqrt(a)
print()
30. floor division
a//b
//=
str()
print
31. Create a variable.
=
%s
argv
read
32. Less than symbol
a//b
def
open()
<
33. Prints a string to the screen which is converted using repr()
%r
del
>>
format string
34. absolute value
abs(a)
%=
a%b
-
35. Prints a string to the screen which is a signed decimal.
truncate
%d
str()
>>
36. Function to open or read a file
open()
print
del
Variables
37. This keyword in the body of a conditional allows chained conditionals.
elif (Else if)
str()
input()
>>
38. Where the parameters go. A necessary punctuation after any function even if it's empty.
*read
%s
()
>>
39. square root
%s
def
is
math.sqrt(a)
40. 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.
%r
#
not in
append()
41. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
float
*read
write
42. A logical operator which compares two operands and produces True if they are equal and False otherwise
a**b
==
%d
print
43. multiply AND assignment operator
print
print()
*=
insert()
44. Reads the contents of the file you can assign the result to a variable.
*read
*truncate
<<
a**b
45. Evaluates to true if it finds a variable in the specified sequence and false otherwise. x in y - here in results in a 1 if x is a member of sequence y.
write
<<
=
in
46. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
:
a//b
close
~
47. modulus AND assignment operator
continue
#
%=
in
48. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
in
**=
*write(stuff)
not in
49. A data type for representing numbers with fractional values.
floating point number
del
def
<<
50. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
try
write
%=
.py