KnowledgeBoat Logo

Computer Science

Predict the output


a, b, c = 2, 3, 4
a, b, c = a*a, a*b, a*c
print(a, b, c)

Python

Python Funda

25 Likes

Answer

Output

4 6 8

Explanation

  1. a, b, c = 2, 3, 4 ā‡’ assigns initial value of 2 to a, 3 to b and 4 to c.
  2. a, b, c = a*a, a*b, a*c
    ā‡’ a, b, c = 2*2, 2*3, 2*4
    ā‡’ a, b, c = 4, 6, 8
  3. print(a, b, c) ā‡’ prints values of a, b, c as 4, 6 and 8 respectively.

Answered By

10 Likes


Related Questions