Computer Science
Evaluate and Justify:
(i) 22 / 17 = 37 / 47 + 88 /83
(ii) len('375')**2
Python Data Handling
28 Likes
Answer
(i) It produces an error as LHS value in this case is an expression that evaluates to a literal whereas LHS value should be a variable.
(ii) len('375')**2
⇒ 3 ** 2 [∵ len('375') = 3]
⇒ 9 [∵ 3 * 3 = 9]
Answered By
19 Likes
Related Questions
Evaluate and Justify:
(i) false and None
(ii) 0 and None
(iii) True and None
(iv) None and None
Evaluate and Justify:
(i) 22.0/7.0 - 22/7
(ii) 22.0/7.0 - int(22.0/7.0)
(iii) 22/7 - int (22.0)/7
int('a') produces error but following expression having int('a') in it, does not return error. Why?
len('a') + 2 or int('a')
Write expression to convert the values 17, len('ab') to (i) integer (ii) str (iii) boolean values