173k views
5 votes
Write a program in Python to sum to numbers:

Urgently needed, please.

User Keisy
by
4.5k points

1 Answer

4 votes

num1 = float(input("Enter the first number: "))

num2 = float(input("Enter the second number: "))

print("{} + {} = {}".format(num1,num2,num1+num2))

Variables num1 and num2 prompt the user for a number. The print function then displays the answer and equation.

User Bulan
by
4.6k points