Find and write the output of the following python code: def Call(P = 40, Q = 20):P = P + Q Q = P - Q

Опубликовано: 25 Октябрь 2024
на канале: Portal Express
9,455
117

Q. Find and write the output of the following python code:

Website link :-
https://www.pathwalla.com/2022/06/fin...

def Call (P = 40, Q = 20) :
P = P + Q
Q = P - Q
print(P, '@', Q)
return P

R = 200
S = 100
R = Call(R, S)
print (R, '@',S)
S = Call(S)
print (R, '@',S)


Answer :-

Output :-

300 @ 200
300 @ 100
120 @ 100
300 @ 120