predict the output if p=5,q=3,r=2
Answers
Answered by
0
Explanation:
Output
a, b, c : 10 20 30p, q, r : 25 13 16
Explanation
a, b, c = 10, 20, 30 ⇒ assigns initial value of 10 to a, 20 to b and 30 to c.
p, q, r = c - 5, a + 3, b - 4
⇒ p, q, r = 30 - 5, 10 + 3, 20 - 4
⇒ p, q, r = 25, 13, 16.
So p is 25, q is 13 and r is 16.
print ('a, b, c :', a, b, c, end = '') ⇒ This statement prints a, b, c : 10 20 30. As we have given end = '' so output of next print statement will start in the same line.
print ('p, q, r :', p, q, r) ⇒ This statement prints p, q, r : 25 13 16
Similar questions