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. square root
>
readline
:
math.sqrt(a)
2. Prints a string to the screen which is a signed decimal.
floating point number
%d
**=
print()
3. floor division AND assignment operator
n
//=
argument variable
*=
4. Prints a string to the screen which is converted using repr()
%r
>=
insert()
readline
5. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
insert()
%s
-
|
6. inserts an item inside a list at a certain index
a%b
+
insert()
+=
7. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
Variables
#
close
and
8. The extension for Python scripts
open()
.py
except
()
9. 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
math.sqrt(a)
in
10. The keyword beginning a header that will create a new function.
abs(a)
def
for
insert()
11. writes stuff to the file
*
int
is not
file.write(stuff)
12. multiply AND assignment operator
*=
assignment
file.readline()
str()
13. divide AND assignment operator
/=
#
append()
str()
14. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
~
Variables
()
**=
15. exponent AND assignment operator
**=
>=
write
=
16. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
close
Variables
a%b
%d
17. Symbol to divide by the number to the right of the symbol
/
read
-=
**=
18. Argument variable
round()
format string
argv
**=
19. Adds something to a variable
is
=
raise
//=
20. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
in
and
*truncate
write
21. Symbol to add things together
+
n
str()
file.seek()
22. Less than symbol
<<
truncate
<
:
23. turns an object into an integer
int()
floating point number
and
float
24. The keyword beginning a header that will create a loop.
for
pass
def
str()
25. turns an object into a string
<<
round()
*
str()
26. add AND assignment operator
%s
argv
+=
a**b
27. modulus AND assignment operator
except
+=
%=
write
28. Function to write something to a file
append()
del
=
write
29. Greater than symbol
%=
>
<
not
30. Prints a string to the screen which will be Unicode.
>
&
%s
==
31. 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).
abs(a)
continue
|
is not
32. prints its parameter to the console
#
int()
>
print()
33. Less than or equal to symbol
~
<=
%r
print
34. 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
abs(a)
>>
append()
/
35. absolute value
abs(a)
float
floating point number
==
36. End header line.
write
==
:
&
37. Where the parameters go. A necessary punctuation after any function even if it's empty.
**=
()
del
abs(a)
38. Reads the contents of the file you can assign the result to a variable.
not
*read
+=
int()
39. sets the file's current position
<
str()
file.seek()
>=
40. 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
/=
==
a//b
41. Symbol used to create comments
and
#
=
del
42. Create a variable.
-
print
=
elif (Else if)
43. Prints a string to the screen which will be Unicode.
*truncate
not in
#
%s
44. Argument variable
input()
()
argv
str()
45. adds an item to a list
assignment
append()
%d
/=
46. Symbol used to create comments
print
#
int()
^
47. Create a variable.
=
a%b
#
insert()
48. The keyword beginning a header that will create a loop.
close
str
:
for
49. End header line.
:
a//b
insert()
==
50. 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
n
%d
file.seek()
^