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. unction to read one line of a file
readline
~
>>
str()
2. A built-in function that converts its argument to a string.
=
&
str
-=
3. turns an object into an integer
**=
read
int()
input()
4. Less than symbol
()
<
open()
5. modulus AND assignment operator
^
insert()
a//b
%=
6. Greater than or equal symbol.
a**b
%
>=
argument variable
7. An operator that removes a value from a list.
del
str()
%
def
8. modulo
input()
<=
a%b
:
9. divide AND assignment operator
format string
n
#
/=
10. rounds a number to the number of decimal points you choose
<
<
<=
round()
11. This variable holds the arguments you pass to your Python script when you run it. Then you unpack it in your script so you have variables you can work with.
while
argument variable
is not
input()
12. Modulus operator. It's the remainder after division
while
n
%
a**b
13. Symbol to multiply things
file.seek()
*
abs(a)
readline
14. divide AND assignment operator
not
round()
/=
%=
15. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
int()
int
a//b
*=
16. Function to empty the contents of a file - no recovery is possible
>>
assignment
truncate
read
17. Symbol to add things together
assignment
+
:
read
18. square root
+=
math.sqrt(a)
-=
&
19. 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
^
readline
continue
and
20. Where the parameters go. A necessary punctuation after any function even if it's empty.
a**b
Variables
int()
()
21. Turns a line into a comment instead of executable code.
write
#
def
else
22. deletes an item from a list
append()
del
*write(stuff)
is
23. single line comment
Variables
write
in
#
24. Adds a new line character
-=
file.seek()
()
n
25. Function to write something to a file
break
Variables
write
#
26. Reads just one line of a text file.
#
del
*readline
readline
27. Less than or equal to symbol
argv
**=
if
<=
28. inserts an item inside a list at a certain index
insert()
pass
*
for
29. Function to close a file - it will not be able to be used again unless the file is opened.
round()
close
floating point number
truncate
30. A statement that ends the current iteration of a loop but continues looping.
continue
in
read
del
31. A logical operator which negates an expression so that it returns a value of True if the expression is false.
/=
not
*
if
32. Greater than symbol
or
=
>
argv
33. deletes an item from a list
~
insert()
del
&
34. Function to read the contents of a file
file.truncate()
a%b
read
>>
35. A statement that assigns a value to a variable.
=
break
assignment
/
36. This keyword begins a header for a body that repeats until the condition is no longer true.
&
^
+
while
37. inserts an item inside a list at a certain index
insert()
format string
for
/
38. rounds a number to the number of decimal points you choose
:
round()
%=
=
39. subtract AND assignment operator
-=
for
break
|
40. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
>=
continue
/=
|
41. Symbol to multiply things
*
<
>>
==
42. sets the file's current position
*
()
open()
file.seek()
43. Greater than symbol
>
<<
file.seek()
%=
44. A keyword that does nothing but fill space to indicate code which will be written later.
<
>>
str()
pass
45. 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
continue
^
==
a%b
46. modulo
*write(stuff)
a%b
()
^
47. 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.
str()
not in
insert()
pass
48. Function to close a file - it will not be able to be used again unless the file is opened.
write
-
argv
close
49. asks the user for a response and returns that response
input()
<
str
len()
50. This statement causes an exception.
%d
raise
except
<