# Python program to add two numbers
number1 = input("First number: ")
number2 = input("Second number: ")
# Adding two numbers
# User might also enter float numbers
sum = float(number1) + float(number2)
# Display the sum
# will print value in float
print("The sum of {0} and {1} is {2}" .format(number1, number2, sum))
#clcoding.com
First number: 21
Second number: 31
The sum of 21 and 31 is 52.0
0 Comments:
Post a Comment