Question: Objective: Conditional statements in Python Use of if - statement, elif - statement and else statement Performing arithmetic operations based on conditions Formatted display A
Objective:
Conditional statements in Python
Use of ifstatement, elifstatement and else statement
Performing arithmetic operations based on conditions
Formatted display
A computer warehouse sells computers and different parts of computers. This
warehouse carries different brand of computers and accessories. As this is a computer
warehouse, members buy two different items at a time and every member is entitled to
buy any number of each item every time when they purchase two different items.
Write pseudo code to implement following application:
Application prompts user to enter an item name to purchase, user enters item name
eg computer, keyboard, mouse etc. Then application prompts user to enter brand of
the item. User enters brand eg Dell, Acer, HP etc. Application then prompts user to
enter price per item eg $ $ etc. User enters the price. Note: User does
not enter the symbol $ with the price of the item. The application then asks user to
enter the quantity of the item. User enters the quantity eg etc. Application
prompts this twice so that members can purchase two different items.
Information is displayed as:
Name: your name here
Student ID: your student ID
Item name Item brand Item price Item quantity Total item price
Keyboard Dell $ $
Computer Acer $ $
Total price before discount: $
discount amount: $
Taxable amount: $
Tax amount HST: $
Amount payable: $
If members purchase items for before tax amount more than $ up to $
member gets discount shown in this example If members purchase items for
Introduction to Programming NEST Programming exercise
$ or higher up to $ members get discount. If members purchase
items for $ or higher, members get discount.
Note: Use of $ symbol with the price of items and where necessary, used with dollar
amounts. Also see that data and information are all aligned and organized under the
heading.
give me a proper python code to Run
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
