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. A built-in function that converts its argument to a string.
%=
is not
for
str
2. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
argv
//=
try
readline
3. unction to read one line of a file
^
readline
Variables
>=
4. Symbol to add things together
+
close
=
else
5. 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
^
%
file.write(stuff)
*write(stuff)
6. add AND assignment operator
+=
int()
float
>
7. 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.
insert()
close
readline
in
8. turns an object into an integer
int()
#
()
math.sqrt(a)
9. Symbol to subtract things from each other
<=
abs(a)
-
append()
10. Reads just one line of a text file.
*readline
not
input()
Variables
11. writes stuff to the file
close
*
argument variable
file.write(stuff)
12. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
continue
%d
|
abs(a)
13. This keyword in the body of a conditional allows chained conditionals.
<=
print()
%d
elif (Else if)
14. Symbol to multiply things
insert()
n
*
<=
15. Empties the file - watch out if you care about the file.
str()
*truncate
break
int
16. Symbol to add things together
+
int()
n
==
17. Symbol used to create comments
in
>>
+
#
18. Symbol used to create comments
read
#
while
if
19. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
def
~
close
math.sqrt(a)
20. A data type for representing numbers with fractional values.
%d
floating point number
truncate
n
21. Adds a new line character
n
*write(stuff)
=
len()
22. deletes an item from a list
del
file.readline()
*read
elif (Else if)
23. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
-
**=
in
a//b
24. asks the user for a response and returns that response
input()
for
print
open()
25. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
and
a%b
<
//=
26. Prints a string to the screen which is a signed decimal.
-=
file.truncate()
%d
<<
27. modulus AND assignment operator
%=
and
file.write(stuff)
=
28. Prints a string to the screen which is converted using repr()
=
%r
break
*
29. adds an item to a list
=
append()
%r
+
30. rounds a number to the number of decimal points you choose
&
round()
a//b
del
31. modulo
+=
a%b
%=
break
32. This keyword in the body of a conditional - gives an alternative execution.
n
else
~
float
33. Greater than or equal symbol.
>=
is not
str()
len()
34. An operator that removes a value from a list.
readline
del
readline
/
35. Less than symbol
>
+=
<
truncate
36. floor division
pass
+
a//b
close
37. Command to print to the screen
print
-=
in
>>
38. Greater than symbol
#
>
insert()
str()
39. exponentiation
*truncate
a**b
in
and
40. turns an object into an integer
<
~
write
int()
41. Function to open or read a file
*=
#
open()
write
42. Argument variable
a//b
argv
<
>
43. 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
not in
del
<<
def
44. inserts an item inside a list at a certain index
#
()
a//b
insert()
45. Modulus operator. It's the remainder after division
abs(a)
%
*read
%=
46. Adds a new line character
n
file.truncate()
while
%d
47. floor division AND assignment operator
/
else
//=
+=
48. Symbol to divide by the number to the right of the symbol
/
|
append()
<
49. A keyword that does nothing but fill space to indicate code which will be written later.
>>
%
<<
pass
50. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
def
**=
file.seek()
int