Calculate the +,- ,* and / of two user given no.s using function and return type.
- Team ATC
- Sep 24, 2020
- 1 min read
Asked: Anonymously |Category: Python
def func(a,b):
add=a+b
sub=a-b
mul=a*b
div=a/b
return (add,sub,mul,div);
a=int(input("Enter the 1st number: "))
b=int(input("Enter the 2nd number: "))
add,sub,mul,div=func(a,b)
print("sum=",add,"substract=",sub,"multiply=",mul,"division=",div)
コメント