Using Python, write a script that accepts a series of sales transactions from the user. For each of the sales transactions, the user will enter 2 values: department and sales total. The application should provide the sum of all sales totals for each entered department and output the totals. The application should also end and display the total when the user enters “none” for the department. You will need to use both branching and loops in this application. You may assume that there are only 2 department names entered. The interaction might look like the following: Enter department: Sporting goods Enter total: 500 Enter department: Grocery Enter total: 1,000 Enter department: None The total for sporting goods is 500. The total for grocery is 1,000. You need to test the application with a total transaction count of eight and two departments.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 7RQ
icon
Related questions
Question
100%

Using Python, write a script that accepts a series of sales transactions from the user. For each of the sales transactions, the user will enter 2 values: department and sales total.

The application should provide the sum of all sales totals for each entered department and output the totals. The application should also end and display the total when the user enters “none” for the department.

You will need to use both branching and loops in this application. You may assume that there are only 2 department names entered. The interaction might look like the following:

Enter department: Sporting goods

Enter total: 500

Enter department: Grocery

Enter total: 1,000

Enter department: None

The total for sporting goods is 500.

The total for grocery is 1,000.

You need to test the application with a total transaction count of eight and two departments.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,