Assignment Solution
Assignment Solution
Page 1 of 3
print('Grade B')
elif mark >= 50:
print('Grade C')
elif mark >= 40:
print('Grade D')
else:
print('Fail')
a. Grade A b. Grade B c. Grade C d. Grade D e. Fail
Answer: b
(viii) What will the binary value (11011) be in decimal?
a. 0, 1, 2, b. 1, 2, 3, c. 2, 3, 4, d. None of the Above
Answer: d
(ix) What will be the decimal value (93) be in binary?
a. 1, 2, 3, 4 b. 2, 4, 6, 8 c. 1, 3, 5, 7 d. None of the Above
Answer: d
(x) Which of the following Python logical expressions can determine whether z is less than both
x and y?
a. x & y > z b. (x > z) & (y > z) c. (y > z) & (x > z)
d. Both b and c e. All of the above
Answer: e
Page 2 of 3
(vi) Assembly and machine languages are known as low level languages. (T)
(vii) Compilers occupy more memory than interpreters. (T)
(viii) Interpreter is faster than compiler. (F)
(ix) Python is an example of high level languages. (T)
(x) Python use both Interpreter and Compiler. (F)
Page 3 of 3