Open
Description
I decided to add Boolean variable to this code of solving it and whenever I ran my code I get additional $1 added if the total shipping order exceeds or equals $50. Why?
This is the code:
Program to calculate a shipping order and give a tip of free shipping if order exceeds $50 else $10 fee
shippingFee = False
sumTotal = 0
orderTotal = float(input("Enter the total amount of order "))
if orderTotal >= 50:
shippingFee = True
print("Shipping is free")
else:
shippingFee = 10
print("Shipping fee will cost additional $10")
sumTotal = orderTotal + shippingFee
print("Your total shipping fee with order is $%2f" % sumTotal)
print("Your total shipping fee with order is $" + str(sumTotal))
Metadata
Metadata
Assignees
Labels
No labels