SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
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. Empties the file - watch out if you care about the file.
a**b
-=
*read
*truncate
2. exponentiation
**=
a**b
<
int()
3. ,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.
|
*write(stuff)
<=
4. modulus AND assignment operator
read
*readline
%=
-
5. A logical operator which requires two expressions to both be true.
and
is
close
class
6. writes stuff to the file
int()
file.write(stuff)
*=
+
7. square root
math.sqrt(a)
%s
%
*truncate
8. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
-
assignment
~
pass
9. subtract AND assignment operator
-=
math.sqrt(a)
<
insert()
10. Binary OR Operator copies a bit if it exists in eather operand. (a | b) will give 61 which is 0011 1101
except
+
/=
|
11. assignment operator
else
format string
floating point number
=
12. 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.
not in
read
/=
a**b
13. rounds a number to the number of decimal points you choose
round()
len()
str()
14. Prints a string to the screen which is a signed decimal.
<
print
>
%d
15. multiply AND assignment operator
try
*=
/=
=
16. Adds a new line character
break
assignment
()
n
17. A logical operator which negates an expression so that it returns a value of True if the expression is false.
for
not
read
>=
18. 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.
math.sqrt(a)
continue
in
+=
19. A boolean operator that takes two strings and returns True if the first appears as a substring in the second.
in
>=
floating point number
int()
20. Greater than symbol
>>
>
write
^
21. End header line.
:
read
%r
and
22. This keyword attempts to do something that would cause the program to crash if it were not for this statement.
a//b
try
readline
&
23. Called Logical AND operator. If both the operands are true then then condition becomes true. (a and b) is true.
and
%=
=
a%b
24. Symbol used to create comments
#
^
len()
read
25. asks the user for a response and returns that response
+
input()
Variables
+=
26. The keyword beginning a header that will create a loop.
a%b
=
for
format string
27. A statement that ends the current iteration of a loop but continues looping.
argv
del
continue
str()
28. This statement causes an exception.
file.write(stuff)
file.readline()
/
raise
29. This keyword in the body of a conditional - gives an alternative execution.
readline
%r
a**b
else
30. Prevents a runtime error from stopping the program.
def
except
elif (Else if)
%=
31. asks the user for a response and returns that response
input()
.py
file.seek()
raise
32. Function to read the contents of a file
read
#
open()
for
33. End header line.
del
>>
truncate
:
34. modulo
a//b
n
#
a%b
35. exponentiation
close
/
a**b
float
36. prints its parameter to the console
format string
file.seek()
print()
while
37. Create a variable.
=
*readline
append()
&
38. Adds something to a variable
=
def
/=
>
39. An operator to check whether two variables refer to the same object.
//=
abs(a)
is
=
40. Binary AND Operator copies a bit to the result if it exists in both operands. (a & b) will give 12 which is 0000 1100
>=
def
else
&
41. Symbol to divide by the number to the right of the symbol
.py
len()
/
~
42. deletes an item from a list
n
except
/
del
43. add AND assignment operator
def
+=
or
file.seek()
44. Symbol to multiply things
len()
/=
int()
*
45. The keyword beginning a header that will create a new function.
argv
and
print
def
46. Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. (~a ) will give -60 which is 1100 0011
+
~
str
print
47. returns the length of a string (number of characters)
print()
len()
>=
def
48. turns an object into an integer
int()
readline
del
>
49. prints its parameter to the console
close
<<
print()
for
50. This statement exits a function. The remaining lines of the function are not executed.
not
&
return
==