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. Holds the value of something - e.g. oh_hi = 4 where oh_hi is the variable.
round()
Variables
round()
pass
2. Where the parameters go. A necessary punctuation after any function even if it's empty.
:
()
pass
/=
3. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
in
%
print()
*readline
4. A built-in function that takes any value and converts it to an integer if possible - or complains otherwise.
:
int
open()
//=
5. Create a variable.
+=
=
input()
truncate
6. A built-in function that converts its argument to a string.
a//b
str
n
=
7. inserts an item inside a list at a certain index
truncate
insert()
n
if
8. Empties the file - watch out if you care about the file.
*truncate
+
write
return
9. modulo
%r
%
a%b
insert()
10. Reads the contents of the file you can assign the result to a variable.
<=
<
len()
*read
11. Prevents a runtime error from stopping the program.
%=
==
except
12. Symbol used to create comments
read
open()
print
#
13. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
=
|
for
~
14. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
#
~
pass
/
15. rounds a number to the number of decimal points you choose
round()
>>
and
n
16. The keyword beginning a header that will create a loop.
continue
del
not in
for
17. asks the user for a response and returns that response
/=
input()
readline
str()
18. exponentiation
a**b
-
else
del
19. Greater than symbol
>
%s
else
*=
20. modulus AND assignment operator
:
%=
-=
assignment
21. 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
>>
argument variable
and
str()
22. 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
except
raise
^
<<
23. This statement exits a function. The remaining lines of the function are not executed.
round()
return
read
file.readline()
24. Turns a line into a comment instead of executable code.
if
round()
#
%d
25. Function to read the contents of a file
read
-
.py
round()
26. Less than or equal to symbol
<=
else
a//b
%=
27. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
write
%d
and
=
28. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
&
~
not in
a**b
29. Less than or equal to symbol
read
%s
try
<=
30. End header line.
argument variable
try
>>
:
31. A statement that ends the current iteration of a loop but continues looping.
>
print
continue
%s
32. A statement that assigns a value to a variable.
truncate
assignment
=
print
33. floor division
open()
a//b
<<
append()
34. asks the user for a response and returns that response
>=
raise
*truncate
input()
35. Function to write something to a file
#
=
file.readline()
write
36. Symbol to divide by the number to the right of the symbol
math.sqrt(a)
/
close
open()
37. This keyword in the body of a conditional allows chained conditionals.
int()
readline
elif (Else if)
/
38. turns an object into a string
~
str()
|
#
39. exponentiation
^
a**b
#
Variables
40. sets the file's current position
=
**=
raise
file.seek()
41. assignment operator
str()
=
file.write(stuff)
input()
42. writes stuff to the file
~
len()
<
file.write(stuff)
43. divide AND assignment operator
input()
pass
/=
-
44. floor division
*write(stuff)
a//b
<
def
45. modulus AND assignment operator
%d
~
%=
*readline
46. A keyword that does nothing but fill space to indicate code which will be written later.
elif (Else if)
pass
%r
-=
47. Symbol to multiply things
#
+=
*
print
48. inserts an item inside a list at a certain index
if
insert()
def
%s
49. Command to print to the screen
print
open()
def
Variables
50. End header line.
abs(a)
close
insert()
: