English

Write the output of the code given below: p=5 def sum(q,r=2): global p p=r+q**2 print(p, end= '#') a=10 b=5 sum(a,b) sum(r=5,q=1) - Computer Science (Python)

Advertisements
Advertisements

Question

Write the output of the code given below:

p=5
def sum(q,r=2):
      global p
      p=r+q**2
      print(p, end= '#')

a=10
b=5
sum(a,b)
sum(r=5,q=1)
One Word/Term Answer

Solution

Output:
105#6#

shaalaa.com
Notations for Arithmetic Expressions
  Is there an error in this question or solution?
2022-2023 (March) Sample

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×