Skip to content

xogus6125/pythonProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tip calculator

Instructions

If your bill is $150, divide it into 5 people with a 12% tip.

Each person must pay (150.00 / 5) * 1.12 = 33.6

Format the result to 2 decimal places = 33.60

So everyone’s share of the total bill is $30.00 to $3.60 tips.

Tip: There are two ways to round up the numbers. You may need to google some to solve this problem. 💪

Example of input


Welcome to the tip calculator!

What was the total bill? $124.56

How much tip would you like to give? 10 or 12 or 15? 12

How many people need to split their bills? 7

Example of output


Each person must pay: $19.93

Hints

One [How to round up to 2 decimal places on Python] (https://www.google.com/search? Q=how+to+round+number+to+2+decimal+places+python&oq=how+to+round+number+to+2+decimal)

  1. [How to limit floats to two decimal places on Python] (https://www.kite.com/python/answers/how-to-limit-a-float-to-two-decimal-places-in-python)

the solution

[Https://replit.com/@appbrewery/tip-calculator-end] (https://replit.com/@appbrewery/tip-calculator-end)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published