How to concatenate a "%" to an input?

  calculator, python

Below is a copy of my simple tip calculator:

bill_total = float(input("What is your total?n"))

people_total = float(input("How many people are splitting the bill?n"))

tip_percent = float(input("What percent tip would you like to leave?n"))

total = (bill_total + (int(bill_total*(tip_percent/100))))/(people_total)

print("Everyone should leave about $" +'{:.2f}'.format(round(total, 2)))

How would I go about concatenating a "%" sign to the end of the user’s input so that result shows a percentage sign without them having to type the actual sign?

i.e:
"What percent tip would you like to leave?"
20%

Source: Python Questions

LEAVE A COMMENT