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
#1
I have to do a stupid tip calculator hw assignment for my beginning coding class. It's literally only our second assignment, but I'm stuck. For some reason, the program will not calculate the tip. I don't know what I'm doing wrong. It's probably something basic. Here's the input and output.

Input-----------------------------
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) + bill
print "Your total bill is " + str(TotalBill)
Output---------------------------
Output:
How much is the bill? 100 What percentage of the tip would you like to enter? 10 Tip added is 0 Your total bill is 106.0

Oh that's fancy. Sorry, literally just found this site, don't know much about it
Reply


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

Forum Jump:

User Panel Messages

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