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
#3
This is my window. I'm using cloud9.
[Image: kB7e1v]

Now it's behaving differently. I don't know what made it change. I also altered my code, but I'm still getting the same final answer.

tax = .06

# How much is the bill?
bill = input("How much is the bill? ")

# What percentage of the tip would you like to enter?
tippy = input("What percentage of the tip would you like to enter? ")

# Tip added
print "Tip added is " + str(tippy)

# What is the total bill?
TotalBill = (bill * tax) + (bill * (tippy / 100)) + bill
print "Your total bill is " + str(TotalBill) 
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 106.0
Reply


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

Forum Jump:

User Panel Messages

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