Write a program in Python to accept two numbers and display their sum. Also write the output.
Answers
Answered by
0
# Store input numbers
num1 = input('Enter first number: ')
num2 = input('Enter second number: ')
# Add two numbers
sum = float(num1) + float(num2)
# Display the sum
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))
Similar questions
Social Sciences,
17 days ago
Social Sciences,
17 days ago
History,
17 days ago
English,
1 month ago
Math,
1 month ago
English,
9 months ago
Science,
9 months ago
Social Sciences,
9 months ago