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. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
in
-
|
//=
2. adds an item to a list
/
append()
assignment
insert()
3. Prints a string to the screen which will be Unicode.
%=
else
=
%s
4. unction to read one line of a file
%
readline
pass
^
5. A built-in function that converts integers and strings to floating-point numbers.
append()
float
write
>=
6. Prints a string to the screen which is a signed decimal.
+=
*read
<=
%d
7. A statement that displays a value on the screen.
print
del
^
+=
8. modulus AND assignment operator
>
floating point number
%=
abs(a)
9. Reads just one line of a text file.
float
<
open()
*readline
10. Function to close a file - it will not be able to be used again unless the file is opened.
readline
*readline
argv
close
11. inserts an item inside a list at a certain index
insert()
else
format string
input()
12. Adds something to a variable
+=
=
%
<=
13. Create a variable.
=
insert()
floating point number
not
14. turns an object into an integer
break
int()
<=
*write(stuff)
15. The keyword beginning a header that will create a new function.
*
file.write(stuff)
#
def
16. exponentiation
del
a//b
a**b
&
17. Adds something to a variable
Variables
is
=
#
18. Function to read the contents of a file
+
%=
read
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
:
#
^
*read
20. Writes stuff to the file.
del
raise
*write(stuff)
readline
21. A logical operator which requires two expressions to both be true.
is not
*write(stuff)
and
Variables
22. A logical operator which compares two operands and produces True if they are equal and False otherwise
/=
==
*
math.sqrt(a)
23. Turns a line into a comment instead of executable code.
#
*truncate
>>
<<
24. assignment operator
print
math.sqrt(a)
=
|
25. Where the parameters go. A necessary punctuation after any function even if it's empty.
str
()
/=
26. A data type for representing numbers with fractional values.
raise
#
print()
floating point number
27. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
append()
continue
#
28. Function to write something to a file
raise
#
write
abs(a)
29. Greater than or equal symbol.
file.readline()
>=
def
<<
30. The keyword beginning a header that will create a loop.
read
()
in
for
31. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
close
~
class
raise
32. square root
del
if
#
math.sqrt(a)
33. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
pass
n
*truncate
Variables
34. modulo
raise
print
del
a%b
35. modulo
int()
*readline
a%b
not in
36. absolute value
abs(a)
%
file.readline()
&
37. deletes an item from a list
if
=
del
argument variable
38. Prevents a runtime error from stopping the program.
if
pass
except
continue
39. A statement that ends the current iteration of a loop but continues looping.
:
-=
continue
len()
40. A built-in function that converts its argument to a string.
%s
/
str
str()
41. multiply AND assignment operator
*=
readline
print
>=
42. Empties the file - watch out if you care about the file.
/
truncate
>
*truncate
43. Prints a string to the screen which is converted using repr()
for
%r
+
print()
44. Less than or equal to symbol
insert()
<=
**=
not
45. Adds a new line character
n
def
=
a//b
46. The keyword beginning a header that will create a loop.
if
:
for
and
47. writes stuff to the file
open()
file.write(stuff)
for
continue
48. Symbol used to create comments
#
len()
**=
*readline
49. turns an object into a string
raise
~
str()
.py
50. Argument variable
raise
:
argv
a//b