CBSE Class 11 Computer Science
Question 86 of 106
Python Fundamentals — Question 15
Back to all questions 15
Question Question 15
Predict the output
a, b, c = 2, 3, 4
a, b, c = a*a, a*b, a*c
print(a, b, c)Output
4 6 8
Explanation
a, b, c = 2, 3, 4⇒ assigns initial value of 2 to a, 3 to b and 4 to c.a, b, c = a*a, a*b, a*c
⇒ a, b, c = 2*2, 2*3, 2*4
⇒ a, b, c = 4, 6, 8print(a, b, c)⇒ prints values of a, b, c as 4, 6 and 8 respectively.