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. writes stuff to the file
file.write(stuff)
*
*=
print
2. Prints a string to the screen which is a signed decimal.
/
%s
%d
del
3. Symbol to multiply things
Variables
*
raise
input()
4. Modulus operator. It's the remainder after division
<<
print()
float
%
5. 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
*truncate
for
6. deletes an item from a list
del
and
is
%=
7. divide AND assignment operator
=
/=
print
break
8. exponent AND assignment operator
truncate
<
+=
**=
9. rounds a number to the number of decimal points you choose
pass
round()
~
and
10. Less than symbol
()
a%b
*=
<
11. ,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.
//=
while
del
12. Command to print to the screen
write
print
+=
%=
13. turns an object into a string
str()
-=
truncate
open()
14. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
print
close
=
15. Less than or equal to symbol
/
int()
<=
abs(a)
16. Symbol to add things together
|
+
int()
truncate
17. sets the file's current position
open()
%d
file.seek()
Variables
18. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
read
Variables
+
19. Greater than symbol
n
not in
>
in
20. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
^
/
Variables
>
21. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
or
math.sqrt(a)
|
<=
22. asks the user for a response and returns that response
>>
input()
float
%r
23. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
file.truncate()
close
~
%=
24. End header line.
in
//=
:
int()
25. Function to open or read a file
close
is not
open()
assignment
26. modulo
a%b
close
str
for
27. Prints a string to the screen which is a signed decimal.
%d
if
round()
class
28. add AND assignment operator
except
+=
math.sqrt(a)
n
29. turns an object into a string
*
+=
open()
str()
30. Command to print to the screen
>=
print
del
.py
31. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
readline
n
Variables
()
32. subtract AND assignment operator
str
-=
int
~
33. 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
*write(stuff)
*=
del
<<
34. multiply AND assignment operator
%
>
*=
else
35. single line comment
%d
.py
append()
#
36. exponent AND assignment operator
**=
-=
<=
>>
37. adds an item to a list
a%b
append()
<=
is
38. Greater than symbol
>
**=
*=
>=
39. This keyword begins a header for a body that repeats until the condition is no longer true.
/
while
%d
del
40. Symbol to multiply things
*readline
abs(a)
.py
*
41. Function to write something to a file
a//b
:
=
write
42. 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
>=
<<
=
file.readline()
43. absolute value
**=
class
abs(a)
-
44. returns the length of a string (number of characters)
*truncate
+
%
len()
45. 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.
#
in
print
//=
46. Less than symbol
floating point number
<
break
%r
47. floor division AND assignment operator
Variables
()
if
//=
48. returns the length of a string (number of characters)
a//b
>
len()
<=
49. 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
=
*=
floating point number
50. floor division AND assignment operator
print
//=
file.seek()
input()