Python Calculator: Only Addition
def sum(x,y):
return x+y
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
return x+y
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
c = sum(a,b)
print(a,"+",b,"=", c)
For example:
Enter first number: 55
Enter second number: 43
55 + 43 = 98
Wow that was very informative
ReplyDelete