Skip to content
Sign UpLog In
Profile icon

Jeiel Herrera

@Djbrimpipompi
Repls
Community
Djbrimpipompi
Djbrimpipompi
shared a Post
3 years ago
I don't know how to fix this error in my repl.
Cost1 = input("Please enter the first expense: ") Cost2 = input("Please enter the second expense: ") print("Your total for both expenses was", Cost1+C
RomeroSchwarz
RomeroSchwarz
The problem is that the variables are stored as strings, and you are just concatenating them. Turn them into ints instead. Cost1 = int(input("Please enter the first expense: ")) Cost2 = int(input("Please enter the second expense: ")) print("Your total for both expenses was", Cost1+Cost2 ) > If this post helped, mark it as the answer3 years ago