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. Less than or equal to symbol
>=
>=
<=
a//b
2. empties the file
:
input()
argument variable
file.truncate()
3. Adds something to a variable
close
=
return
int()
4. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
a//b
/
math.sqrt(a)
&
5. An operator to check whether two variables refer to the same object.
raise
-=
is
not
6. Turns a line into a comment instead of executable code.
*
=
print()
#
7. divide AND assignment operator
/=
/
print
read
8. Function to open or read a file
int
open()
str()
print
9. Reads just one line of a text file.
def
*readline
|
abs(a)
10. The keyword beginning a header that will create a loop.
for
math.sqrt(a)
def
-
11. Writes stuff to the file.
write
*write(stuff)
continue
insert()
12. adds an item to a list
**=
append()
insert()
-=
13. A logical operator which negates an expression so that it returns a value of True if the expression is false.
a//b
not
()
len()
14. Modulus operator. It's the remainder after division
%
file.readline()
del
n
15. Where the parameters go. A necessary punctuation after any function even if it's empty.
&
#
read
()
16. turns an object into a string
math.sqrt(a)
str()
*read
try
17. Prints a string to the screen which is converted using repr()
print
%r
>
#
18. Argument variable
argv
str()
//=
input()
19. unction to read one line of a file
file.readline()
readline
==
&
20. A built-in function that converts its argument to a string.
-=
*truncate
str
for
21. Less than or equal to symbol
=
a**b
<=
and
22. Symbol used to create comments
n
#
assignment
input()
23. Prevents a runtime error from stopping the program.
except
math.sqrt(a)
file.seek()
print
24. 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.
*
argument variable
()
append()
25. A statement that ends the current iteration of a loop but continues looping.
del
continue
*write(stuff)
~
26. Function to read the contents of a file
%
math.sqrt(a)
str()
read
27. Prints a string to the screen which will be Unicode.
()
%s
open()
*write(stuff)
28. add AND assignment operator
+=
format string
*read
>>
29. modulo
break
>=
argv
a%b
30. turns an object into an integer
write
def
del
int()
31. Less than symbol
n
*write(stuff)
if
<
32. inserts an item inside a list at a certain index
if
==
insert()
=
33. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
|
=
pass
/=
34. A keyword that does nothing but fill space to indicate code which will be written later.
pass
is
else
print
35. Reads the contents of the file you can assign the result to a variable.
-=
*=
truncate
*read
36. A data type for representing numbers with fractional values.
floating point number
if
if
int()
37. deletes an item from a list
>>
and
:
del
38. unction to read one line of a file
%d
%d
/=
readline
39. 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.
=
a//b
in
read
40. exponentiation
<<
del
floating point number
a**b
41. 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).
for
is not
%s
if
42. absolute value
*
<
abs(a)
*truncate
43. Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand. a >> 2 will give 15 which is 0000 1111
+=
open()
>>
**=
44. prints its parameter to the console
//=
print()
%r
round()
45. floor division AND assignment operator
print()
-=
input()
//=
46. 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
truncate
^
open()
try
47. adds an item to a list
continue
append()
insert()
=
48. writes stuff to the file
file.truncate()
+
file.write(stuff)
<<
49. multiply AND assignment operator
*=
len()
def
file.write(stuff)
50. Function to close a file - it will not be able to be used again unless the file is opened.
=
Variables
close
pass