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. Greater than symbol
del
>
%d
not
2. Adds a new line character
print()
n
open()
break
3. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
str()
&
~
file.seek()
4. turns an object into a string
write
str()
~
or
5. add AND assignment operator
round()
+=
~
%r
6. Adds a new line character
<
*
n
**=
7. subtract AND assignment operator
and
def
print
-=
8. Symbol to divide by the number to the right of the symbol
/
math.sqrt(a)
readline
a%b
9. assignment operator
print
=
%r
%s
10. Symbol to divide by the number to the right of the symbol
=
/
print
%
11. returns the length of a string (number of characters)
==
len()
def
12. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
#
%=
try
argument variable
13. 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
#
a**b
<<
%d
14. Symbol used to create comments
#
len()
file.truncate()
=
15. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
|
def
input()
:
16. Where the parameters go. A necessary punctuation after any function even if it's empty.
()
>=
a//b
a**b
17. multiply AND assignment operator
str()
readline
*=
assignment
18. Prevents a runtime error from stopping the program.
read
+=
except
:
19. Adds something to a variable
+=
math.sqrt(a)
=
-=
20. Evaluates to true if it does not finds a variable in the specified sequence and false otherwise. x not in y - here not in results in a 1 if x is a member of sequence y.
file.readline()
int()
not in
<=
21. absolute value
abs(a)
file.write(stuff)
>
round()
22. Greater than or equal symbol.
-
/
>=
if
23. Command to print to the screen
print
int()
del
class
24. This keyword begins the simplest form of a conditional statement.
if
<
open()
<=
25. turns an object into an integer
break
insert()
int()
:
26. Command to print to the screen
round()
()
print
append()
27. Symbol to subtract things from each other
write
read
<
-
28. A logical operator which requires two expressions to both be true.
and
*
^
:
29. Prints a string to the screen which is converted using repr()
<<
del
%r
**=
30. Greater than symbol
=
:
>
#
31. sets the file's current position
%
%=
len()
file.seek()
32. floor division AND assignment operator
for
//=
is not
^
33. The extension for Python scripts
%d
.py
round()
#
34. Less than or equal to symbol
>
=
str()
<=
35. asks the user for a response and returns that response
input()
math.sqrt(a)
print
.py
36. exponentiation
write
argv
<=
a**b
37. Prints a string to the screen which is converted using repr()
%r
()
Variables
a//b
38. Create a variable.
=
raise
a%b
open()
39. Greater than or equal symbol.
+
>=
round()
~
40. This keyword creates a new class object which is a user-defined type - like a factory for creating objects.
=
class
a//b
|
41. End header line.
abs(a)
&
:
if
42. Reads just one line of a text file.
*readline
a//b
write
for
43. exponentiation
//=
a**b
*truncate
()
44. empties the file
for
close
file.truncate()
=
45. Argument variable
argv
int()
*
46. The extension for Python scripts
.py
close
round()
n
47. This keyword in the body of a conditional - gives an alternative execution.
n
>=
=
else
48. divide AND assignment operator
break
/=
a**b
/
49. 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
%d
math.sqrt(a)
<
>>
50. exponent AND assignment operator
-
break
in
**=