Check sibling questions
Computer Science - Class 12
Chapter 14 - Functions in python

Find and write the output of the following Python code:

def Change(P ,Q=30):

P=P+Q

Q=P-Q

print( P,"#",Q)

return (P)

R=150

S=100

R=Change(R,S)

print(R,"#",S)

S=Change(S)

 

Answer:

Question1-Find and write the output - Teachoo.jpg

The output of the given code is:

250 # 150

250 # 100

130 # 100

Are ads bothering you?

CA Maninder Singh's photo - Expert in Practical Accounts, Taxation and Efiling

Made by

CA Maninder Singh

CA Maninder Singh is a Chartered Accountant for the past 12 years. He also provides Accounts Tax GST Training in Delhi, Kerala and online.