so I'm writing a code for a tipping system that on the basis of percentages calculates how much the tip added to the bill will be. I wanted to add a condition if the user wanted to give no tip
print("welcome to the tip calculator, hope you had a good time")
bill=input("how much was your bill\n")
tip=input("how much would you like to tip?\n No tip, 10% , 15%, 20%\n")
if tip == "No tip":
print("Thank you for dining.")
else: crowd= input("how many people will split the bill?\n")
new_tip= float(bill)* int(tip)/100
bill=int(bill) + int(new_tip)
pay= int(bill) / int(crowd)
print(f"Each person should pay {pay}.")
print("Thank you.")
It works fine when put in any number but when I put no tip, this is the error
Traceback (most recent call last): File "main.py", line 15, in new_tip= float(bill)* int(tip)/100
ValueError: invalid literal for int() with base 10: 'No tip'
"No tip"to a number. What do you expect to happen? Can you think of a way to avoid this?