My teacher requests me to make a calculator that can calculate a 15% tip on a submitted price. I followed an online tutorial for this python application. I made a simple addition, subtraction, multiplication, and division calculator for practice before I make what my teacher requires. In the YouTube video I followed the python application ran on his computer. I get a a "Invalid Syntax" error in the Python Shell. I'm using Python 3.3.0. Thank you.
EDIT: I followed a different tutorial figured out how to finish my project. The only problem I'm having is using both regular integers (1, 2, 3, 4, etc.) and float integers (4.36, 5.45, etc.).
print("Welcome to the calculator!")
mealPrice = int(input("Enter your meal price:"))
asw = mealPrice * 0.15
print("The tip you owe is: ", asw)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…