Informatics Practices

Give the output.

a, b, c = 10, 20, 30
p, q, r = c - 5, a + 3, b - 4
print(p, q, r)

Python Funda

2 Likes

Answer

25 13 16

Working

In the given code, using multiple assignment, three variables a, b, and c are initially assigned values 10, 20, and 30 respectively and variables p, q, and r are assigned new values: p is assigned c - 5 (resulting in 25), q is assigned a + 3 (resulting in 13), and r is assigned b - 4 (resulting in 16). When print(p, q, r) is executed, it outputs 25 13 16, representing the values after the assignments.

Answered By

3 Likes


Related Questions