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


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)


You can understand by Watching video :-



Answer :-

Output :-

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

16 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. Why this question is highlighted in red is the output wrong??

    ReplyDelete
    Replies
    1. No, It is due to some error in website. We will fix soon.

      Delete
  2. Please make u'r u tube chanbel soon....i really need video explanation...

    ReplyDelete
  3. In last output when i run it shows 300 check it bro

    ReplyDelete
    Replies
    1. mtb phele jo hai p ko use assign hogayi aisa hi hota sab function mei??

      Delete
  4. Brilliant explanation! I was getting confused with the multiple calls and I thought it won't be printed out if its stored in a variable(which will get substituted by return). Thanks now i understood!

    ReplyDelete
  5. LAST MAI 300@120 ku aaya dobara

    ReplyDelete
  6. yo bro sup your website be looking clean, my bad cuz , imma leave, im out, see you path walla

    ReplyDelete
  7. yo bro i will sub 2 you your the least goofy guy i know! good job

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post