Simple calculator not adding | Cant figure out why

Question:

first = input("Enter First Number: ")
second = input("Enter Second Number: ")
value = first + second

print(first + "+" + second + "=" + value)

I want it to add both numbers and give me the result for example 1+2=3, but it keeps doing 1+2=12 instead. does anyone know why this is happening?

Asked By: Dellroy Jenkins

||

Answers:

first = input("Enter First Number: ")
second = input("Enter Second Number: ")
value = float(first) + float(second)

print(str(first) + "+" + str(second) + "=" + str(value))
Answered By: BOB SMITH
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.