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
or
>>
pass
|
2. Greater than or equal symbol.
print()
>=
append()
open()
3. Symbol used to create comments
file.write(stuff)
file.readline()
int()
#
4. Reads just one line of a text file.
>>
str()
else
*readline
5. asks the user for a response and returns that response
in
**=
//=
input()
6. 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
/=
<<
and
%r
7. A statement that displays a value on the screen.
print
>=
format string
break
8. Function to open or read a file
str()
open()
a**b
>=
9. This statement exits a function. The remaining lines of the function are not executed.
return
for
:
|
10. Command to print to the screen
file.truncate()
print
for
write
11. rounds a number to the number of decimal points you choose
math.sqrt(a)
round()
append()
str
12. 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
close
&
-=
13. Reads the contents of the file you can assign the result to a variable.
in
file.readline()
%
*read
14. divide AND assignment operator
del
/=
file.seek()
-
15. deletes an item from a list
raise
write
del
a%b
16. Function to read the contents of a file
*=
==
~
read
17. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
len()
pass
~
>=
18. Symbol to multiply things
return
input()
a//b
*
19. Prints a string to the screen which will be Unicode.
insert()
%s
a%b
not
20. deletes an item from a list
del
-
assignment
&
21. Symbol to divide by the number to the right of the symbol
|
str
/
%s
22. 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
float
&
23. The keyword beginning a header that will create a new function.
#
def
%d
write
24. This keyword begins the simplest form of a conditional statement.
else
.py
^
if
25. 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
format string
:
math.sqrt(a)
^
26. Less than symbol
<
else
truncate
readline
27. ,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.
del
a%b
print()
28. turns an object into a string
*truncate
a//b
str()
>=
29. prints its parameter to the console
print()
is
break
()
30. Prints a string to the screen which is a signed decimal.
int()
&
%d
//=
31. sets the file's current position
*truncate
+
file.seek()
^
32. floor division AND assignment operator
argument variable
//=
**=
write
33. Less than or equal to symbol
^
len()
<=
abs(a)
34. reads just one line of a text file & keeps track of where in the file you're at
:
file.readline()
a%b
35. subtract AND assignment operator
append()
math.sqrt(a)
argv
-=
36. exponentiation
a**b
except
*
.py
37. End header line.
%s
**=
:
del
38. modulo
>=
<
a%b
print
39. A data type for representing numbers with fractional values.
/=
a%b
floating point number
>
40. A keyword that does nothing but fill space to indicate code which will be written later.
return
del
a**b
pass
41. writes stuff to the file
assignment
if
str()
file.write(stuff)
42. An operator that removes a value from a list.
<
str
del
abs(a)
43. unction to read one line of a file
*write(stuff)
or
==
readline
44. exponentiation
str()
file.write(stuff)
a**b
=
45. Symbol used to create comments
raise
#
abs(a)
a//b
46. A statement that assigns a value to a variable.
is
assignment
-
append()
47. modulus AND assignment operator
readline
round()
try
%=
48. Function to close a file - it will not be able to be used again unless the file is opened.
a%b
close
append()
def
49. Symbol to subtract things from each other
>>
except
*readline
-
50. Adds a new line character
raise
len()
<=
n