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. 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.
**=
+=
a**b
not in
2. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
>=
:
try
input()
3. Adds something to a variable
for
Variables
=
open()
4. adds an item to a list
append()
-
int()
def
5. Greater than symbol
len()
print
>
is not
6. Argument variable
#
round()
argv
=
7. Prints a string to the screen which is a signed decimal.
for
>>
%d
str
8. 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
.py
format string
9. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
len()
%=
or
and
10. Function to write something to a file
=
write
a%b
round()
11. Command to print to the screen
Variables
is not
print
append()
12. turns an object into a string
break
str()
=
truncate
13. Prints a string to the screen which is converted using repr()
%r
=
def
%d
14. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
for
~
argv
file.write(stuff)
15. divide AND assignment operator
n
*
round()
/=
16. Function to empty the contents of a file - no recovery is possible
len()
for
round()
truncate
17. Reads the contents of the file you can assign the result to a variable.
*read
open()
assignment
%s
18. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
~
a%b
%=
|
19. Empties the file - watch out if you care about the file.
:
*truncate
open()
write
20. Symbol to multiply things
*
>>
if
while
21. returns the length of a string (number of characters)
len()
del
|
open()
22. Symbol used to create comments
a%b
len()
len()
#
23. This keyword begins the simplest form of a conditional statement.
and
+=
if
=
24. The keyword beginning a header that will create a loop.
continue
argv
+
for
25. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
except
/=
<<
&
26. A statement that ends the current iteration of a loop but continues looping.
*
continue
<<
class
27. The keyword beginning a header that will create a new function.
str()
def
close
.py
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
<<
open()
#
&
29. floor division
a//b
>>
a%b
&
30. floor division AND assignment operator
n
print()
//=
*
31. exponentiation
a**b
-
>
*write(stuff)
32. absolute value
=
**=
insert()
abs(a)
33. rounds a number to the number of decimal points you choose
-
+
in
round()
34. Function to open or read a file
open()
a**b
%r
truncate
35. Less than symbol
open()
&
<
/=
36. square root
float
math.sqrt(a)
write
truncate
37. A logical operator which returns a value of True if either of the conditions is true.
str()
or
for
~
38. Greater than or equal symbol.
abs(a)
==
#
>=
39. single line comment
#
and
read
==
40. 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
<<
:
&
and
41. The extension for Python scripts
.py
^
+
>
42. A built-in function that converts its argument to a string.
%
len()
str
=
43. A logical operator which compares two operands and produces True if they are equal and False otherwise
==
%r
Variables
>>
44. rounds a number to the number of decimal points you choose
round()
*read
/
readline
45. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
<<
**=
floating point number
|
46. divide AND assignment operator
for
except
else
/=
47. This keyword begins the simplest form of a conditional statement.
len()
if
a**b
//=
48. A logical operator which negates an expression so that it returns a value of True if the expression is false.
print()
assignment
not
while
49. Where the parameters go. A necessary punctuation after any function even if it's empty.
close
if
file.truncate()
()
50. floor division AND assignment operator
*
()
//=
a//b