# Purpose: Tax input amount
#
#-----------------------------------------------------------------------
# VARIABLE DEFINITIONS
salesAmount= 0.0
salesTax=0.0
total=0.0
#-----------------------------------------------------------------------
# CONSTANT DEFINITIONS
#-----------------------------------------------------------------------
# FUNCTION DEFINITIONS
#-----------------------------------------------------------------------
# PROGRAM'S MAIN LOGIC
salesAmount = float (raw_input("Enter the sales amount:"))
salesTax = float(salesAmount*0.08)
total = salesAmount + salesTax
print "The sales amount is $", salesAmount
print "The sales tax is $",salesTax
print "The total sale is $",total
raw_input("\nRun complete. Press the Enter key to exit.")
Fernando_1 0 Newbie Poster
Recommended Answers
Jump to PostYou can aslo use the WYSIWYG approach to format your output ...
# Purpose: Tax input amount # #----------------------------------------------------------------------- # VARIABLE DEFINITIONS #----------------------------------------------------------------------- # CONSTANT DEFINITIONS #----------------------------------------------------------------------- # FUNCTION DEFINITIONS #----------------------------------------------------------------------- # PROGRAM'S MAIN LOGIC salesAmount = float (raw_input("Enter the sales amount: ")) salesTax = salesAmount*0.08 total …
All 4 Replies
Fernando_1 0 Newbie Poster
misokolsky -1 Newbie Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.