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 add things together
str()
+
*truncate
readline
2. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
open()
int
close
|
3. Command to print to the screen
()
break
print
~
4. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
insert()
for
|
and
5. exponentiation
close
&
a**b
/
6. Function to read the contents of a file
math.sqrt(a)
try
*
read
7. modulus AND assignment operator
=
*read
/
%=
8. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
write
int
&
except
9. An operator to check whether two variables refer to the same object.
for
abs(a)
len()
is
10. A logical operator which returns a value of True if either of the conditions is true.
*readline
or
read
^
11. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
#
else
Variables
12. absolute value
or
abs(a)
is not
for
13. A keyword that does nothing but fill space to indicate code which will be written later.
^
pass
truncate
open()
14. writes stuff to the file
%
else
file.write(stuff)
:
15. A logical operator which negates an expression so that it returns a value of True if the expression is false.
%r
not
del
~
16. This keyword begins a header for a body that repeats until the condition is no longer true.
while
floating point number
print
17. exponentiation
%r
abs(a)
a**b
n
18. square root
close
in
/=
math.sqrt(a)
19. Less than or equal to symbol
=
if
is
<=
20. 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
<<
file.truncate()
return
in
21. asks the user for a response and returns that response
raise
or
input()
==
22. Reads just one line of a text file.
*readline
<
n
==
23. Empties the file - watch out if you care about the file.
assignment
-=
==
*truncate
24. absolute value
#
%d
abs(a)
print
25. Function to write something to a file
write
|
int()
%=
26. returns the length of a string (number of characters)
and
len()
truncate
=
27. turns an object into a string
str()
int()
^
is
28. turns an object into an integer
int()
insert()
<
+=
29. adds an item to a list
pass
*truncate
*write(stuff)
append()
30. modulo
a%b
=
continue
&
31. Function to empty the contents of a file - no recovery is possible
truncate
not in
len()
insert()
32. Adds something to a variable
floating point number
pass
=
33. ,multi-line comment hard-code,Fix (data or parameters) in a program in such a way that they cannot easily be altered by the user.
break
read
a%b
34. 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.
#
in
while
assignment
35. Adds something to a variable
=
*=
a**b
36. The keyword beginning a header that will create a new function.
a%b
def
try
%s
37. A statement that displays a value on the screen.
readline
floating point number
print
int()
38. inserts an item inside a list at a certain index
if
insert()
str
^
39. Function to open or read a file
if
open()
and
#
40. inserts an item inside a list at a certain index
insert()
del
else
%
41. Writes stuff to the file.
=
a%b
*write(stuff)
is
42. floor division AND assignment operator
print()
read
%s
//=
43. asks the user for a response and returns that response
~
input()
>>
float
44. divide AND assignment operator
/=
/
<<
insert()
45. Create a variable.
=
+
not in
n
46. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
in
while
-
int()
47. Function to close a file - it will not be able to be used again unless the file is opened.
input()
close
|
while
48. Greater than symbol
**=
return
del
>
49. The keyword beginning a header that will create a new function.
argv
readline
def
-
50. multiply AND assignment operator
%
=
%r
*=