Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs

Try this its working, any suggestions on how to make it more compact??


print("Welcome to the tip calculator!!")

bill_b = input("What was the total bill?" + " " + "$")

tip = input("What percentage tip would you like to give? + 10, 12, or 15? ")

tip1 = float(tip)

percentage = tip1/100 + 1

bill_amount = float(bill_b) * percentage

num_people = input("How many people to split the bill? ")

each_share = bill_amount/int(num_people)

r_ound = round(each_share, 2)

print(f"Each person shall pay: ${r_ound}")

1 year ago
You are viewing a single comment. View All