Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assume we have 1 2 months ( m ) of price ( p ) and region 1 quantity ( q 1 ) and region 2
Assume we have months m of price p and region quantity q and region quantity q data. Therefore, create the following "lists" in Python by entering the following code:
m
p
q
q
printThe months are: strm
printThe prices are: strp
printThe region quantities are: strq
printThe region quantities are: strq
Part
Apply the following computations:
Using the quantity data q perform total revenue computations for each month. Note that total revenue price quantity.
Store the results in a new list called tr Hint: Create a new item list called tr and place s into each location. Then, perform the appropriate calculation for each month and place the result into the appropriate location in the tr list.
Use a "print" statement to echo the following on the screen: The region total revenues are:
The procedure in the above steps can be more easily implemented using a "for" flow control statement.
Therefore, using a "for" flow control statement, perform total revenue computations for each month using the quantity data q Note that total revenue price quantity.
Store the results in a new list called tr Hint: Create a new item list called tr and place s into each location.
Then, using the "for" flow control statement, perform the appropriate calculation for each month and place the result into the appropriate location in the tr list.
Use a "print" statement to echo the following on the screen: The region total revenues are:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started