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. Function to read the contents of a file
read
>>
print()
*truncate
2. Binary XOR Operator copies the bit if it is set in one operand but not both. (a ^ b) will give 49 which is 0011 0001
^
<=
close
argv
3. Adds something to a variable
assignment
>>
round()
=
4. This keyword in the body of a conditional allows chained conditionals.
class
raise
elif (Else if)
>>
5. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
for
|
a**b
//=
6. Less than or equal to symbol
~
close
continue
<=
7. This statement exits a function. The remaining lines of the function are not executed.
print
return
>
open()
8. Prints a string to the screen which is converted using repr()
input()
%r
read
*=
9. End header line.
:
del
+=
str
10. Symbol to divide by the number to the right of the symbol
insert()
>=
/
//=
11. rounds a number to the number of decimal points you choose
file.write(stuff)
continue
print()
round()
12. Writes stuff to the file.
*write(stuff)
=
open()
13. Function to write something to a file
def
*truncate
#
write
14. Reads the contents of the file you can assign the result to a variable.
write
+=
/=
*read
15. modulus AND assignment operator
%d
%=
write
>
16. Binary XOR Operator copies the bit if it is set in one operand but not both. (a ^ b) will give 49 which is 0011 0001
=
^
>>
&
17. An operator that removes a value from a list.
a**b
assignment
str()
del
18. floor division
insert()
a//b
%d
argument variable
19. A statement that displays a value on the screen.
>=
**=
print
int()
20. 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.
/
n
a**b
not in
21. A data type for representing numbers with fractional values.
+
>
class
floating point number
22. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
if
Variables
=
&
23. The keyword beginning a header that will create a new function.
def
-
//=
=
24. turns an object into an integer
int()
/=
()
%s
25. divide AND assignment operator
a**b
float
/=
&
26. Prints a string to the screen which will be Unicode.
else
input()
%d
%s
27. Prints a string to the screen which is a signed decimal.
|
.py
%d
>=
28. unction to read one line of a file
file.truncate()
try
&
readline
29. Modulus operator. It's the remainder after division
%
/
|
open()
30. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
/
%=
a//b
|
31. A statement that breaks out of a loop.
read
/
print()
break
32. Less than symbol
<
-=
a//b
<=
33. exponent AND assignment operator
~
<=
**=
*=
34. Command to print to the screen
//=
print
continue
|
35. modulo
class
elif (Else if)
a%b
read
36. Symbol to subtract things from each other
+
is
str()
-
37. Function to empty the contents of a file - no recovery is possible
truncate
*truncate
insert()
not in
38. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
try
is not
del
a//b
39. divide AND assignment operator
/=
#
not
<<
40. Function to close a file - it will not be able to be used again unless the file is opened.
>
close
int()
argv
41. returns the length of a string (number of characters)
file.readline()
len()
#
:
42. Adds something to a variable
open()
a//b
%r
=
43. floor division AND assignment operator
//=
read
=
read
44. assignment operator
//=
^
=
==
45. Reads just one line of a text file.
^
=
math.sqrt(a)
*readline
46. A logical operator which compares two operands and produces True if they are equal and False otherwise
+=
close
==
#
47. absolute value
abs(a)
not
readline
while
48. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
str()
+=
in
()
49. A built-in function that converts its argument to a string.
read
str
int
<
50. turns an object into a string
%r
del
str()
#