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. add AND assignment operator
n
round()
+=
>>
2. Adds a new line character
.py
n
math.sqrt(a)
else
3. reads just one line of a text file & keeps track of where in the file you're at
argv
a%b
file.readline()
%d
4. exponent AND assignment operator
**=
<=
del
.py
5. deletes an item from a list
format string
**=
print()
del
6. Function to open or read a file
insert()
open()
for
str
7. modulus AND assignment operator
class
def
math.sqrt(a)
%=
8. divide AND assignment operator
print
/=
readline
else
9. multiply AND assignment operator
not
Variables
==
*=
10. exponent AND assignment operator
len()
print
+
**=
11. This statement exits a function. The remaining lines of the function are not executed.
argv
return
float
print
12. Command to print to the screen
not
.py
=
print
13. exponentiation
read
try
print
a**b
14. A logical operator which negates an expression so that it returns a value of True if the expression is false.
raise
close
not
print()
15. Argument variable
class
argv
==
:
16. 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
>
raise
>>
%=
17. asks the user for a response and returns that response
file.seek()
len()
input()
.py
18. ,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.
==
in
>
19. Modulus operator. It's the remainder after division
in
%
=
==
20. End header line.
:
input()
=
-
21. Modulus operator. It's the remainder after division
%r
raise
:
%
22. Writes stuff to the file.
*write(stuff)
=
~
/=
23. The keyword beginning a header that will create a new function.
*read
-
a//b
def
24. square root
if
math.sqrt(a)
&
print()
25. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
while
~
pass
write
26. absolute value
abs(a)
//=
int()
*readline
27. Function to write something to a file
print()
/
argv
write
28. prints its parameter to the console
file.write(stuff)
a%b
-=
print()
29. Prints a string to the screen which will be Unicode.
for
%d
input()
%s
30. floor division AND assignment operator
~
*read
len()
//=
31. Symbol to subtract things from each other
-
|
a%b
close
32. turns an object into an integer
int()
:
n
>=
33. adds an item to a list
class
/=
math.sqrt(a)
append()
34. exponentiation
==
|
.py
a**b
35. Symbol to add things together
/=
+
read
str()
36. The keyword beginning a header that will create a loop.
==
print
<<
for
37. Greater than or equal symbol.
/
~
>=
input()
38. 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
//=
<<
if
and
39. sets the file's current position
file.seek()
>
#
%d
40. A logical operator which requires two expressions to both be true.
not in
and
def
#
41. Function to close a file - it will not be able to be used again unless the file is opened.
%r
/
close
insert()
42. Less than or equal to symbol
math.sqrt(a)
<=
+
return
43. Reads just one line of a text file.
float
*readline
&
or
44. Prints a string to the screen which will be Unicode.
insert()
=
.py
%s
45. adds an item to a list
append()
**=
while
read
46. Symbol to multiply things
*
%d
>
/=
47. Prints a string to the screen which is converted using repr()
%r
>>
:
abs(a)
48. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
math.sqrt(a)
a**b
abs(a)
|
49. A statement that ends the current iteration of a loop but continues looping.
continue
=
/
readline
50. A statement that breaks out of a loop.
break
Variables
str()
.py