Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.
def main(): # Get quantity in pounds quantity = int(input('Enter the quantity of coffee in pounds.')) # Calculate the cost of the coffee using if else structure if quantity >= 40: cost = quantity * 7.5 else: if quantity >= 20: cost = quantity * 8.75 else: if quantity >= 10: cost = quantity * 10.0 else: if quantity < 10: cost = quantity * 12.0 else: print('You did not enter a valid quantity.') # Calculate sales tax salesTax = cost * .07 # Calculate shipping fee if cost > 150.0: shippingFee = 0 else: shippingFee = quantity * 1.0 # Calculate Total Payable ttlPayable = cost + salesTax + shippingFee print('Cost of coffee = $', format(cost, ',.2f'), sep ='') print('7% Sales Tax = $', format(salesTax, ',.2f'), sep='') print('Shipping fee = $', format(shippingFee, ',.2f'), sep='') print('Total payable = $', format(ttlPayable, ',.2f'), sep='') main()
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.