To add numbers using function > Python Program

To add numbers using functions > Python Program

Artificial Intelligence


Program:

#function to add two nos

def sum(arg1,arg2):
    total=arg1+arg2
    return(total)
total=sum(10,20)
print("TOTAL=",total)

#>>> 
#= RESTART: C:\Users\student\AppData\Local\Programs\Python\Python35-32\sum.py =
#TOTAL= 30
#>>> 

Comments

Popular posts from this blog

Intermediate Code Generation > C Program