Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 5 Create a new python file with the usual comment header and write code that computes how much a customer has to pay after

image text in transcribed
Problem 5 Create a new python file with the usual comment header and write code that computes how much a customer has to pay after purchasing two items. Use the variable names item1 and item2 to indicate the two different items. The price is calculated according to the following rules: 1. There is a buy one get one half off promotion. The lower priced item is half price. 2. If the customer is a club card member, they get an additional 10% discount. Use Y to indicate Yes and N to indicate No. You should have a variable that is True if the user has a club card and False otherwise. 3. Tax is added. Use the variable name tax rate to indicate the tax value which will hold the rate as a percentage. For example, the value 8.25 indicates a tax rate of 8.25%. 4. Your code should ask the user for the price of both items they purchased, if they are a club card member, and how much the tax rate is. Your code should return the total price the customer has to pay including tax. Below is a sample execution of the program: Price of Item 1: 10 Price of Item 2: 20 Club Card Member (Y/N): Y Tax: 8.25 Total Price: $24.35625

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

0619064625, 978-0619064624

More Books

Students also viewed these Databases questions

Question

What are thefive functional areas that are associated with HRM

Answered: 1 week ago