Hi I am new to python and I am practicing by making a simple calculator. The program lets me input numerical values for meal, tax, and tip but when doing the calculation I get this error:
Traceback (most recent call last):
File "C:/Users/chacha04231991/Desktop/pytuts/mealcost.py", line 5, in <module>
meal = meal + meal * tax
TypeError: can't multiply sequence by non-int of type 'str'
The is the code:
meal = raw_input('Enter meal cost: ')
tax = raw_input('Enter tax price in decimal #: ')
tip = raw_input('Enter tip amount in decimal #: ')
meal = meal + meal * tax
meal = meal + meal * tip
total = meal
print 'your meal total is ', total