Python Forum
stupidly easy hw that I need help with
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
stupidly easy hw that I need help with
#4
Ok, so that output at least matches your code.

Here's what's in the image:
Output:
How much is the bill? 100 What percentage of the tip would you like to enter? 10 Tip added is 10 Your total bill is 1106.0
bill * tippy is 100 * 10, which is 1000.  Before you calculate the total, you should create a percentage based off the tip, maybe...
tip_percent = tippy / 100.0
print(bill * tip_percent)
Then use that, instead of tippy in the actual calculation.
Reply


Messages In This Thread
RE: stupidly easy hw that I need help with - by nilamo - Sep-13-2017, 08:35 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020