반응형
print('Welcome to the tip calculator!')
total_bill = float(input('What was the total bill? $'))
tip = int(input('How much tip would you like to give? 10, 12, or 15?'))
people = int(input('How many people to split the bill?'))
money = (total_bill + (total_bill * tip / 100))/people
round_money = round(money, 2)
print(f'Each person should pay : ${round_money}')
반응형
'파이썬 > exercise' 카테고리의 다른 글
3-3 python love calulator (0) | 2022.12.27 |
---|---|
3-2 python Pizza calculator (0) | 2022.12.27 |
2-2 python 남은 삶 계산 (0) | 2022.12.27 |
2-1/3-1 python BMI calculator (0) | 2022.12.27 |
1-2 python variables (0) | 2022.12.27 |