Please answer it in Python Anna has to manage the stocks of a window warehouse, week by week. The stock for week 1 is 1024 windows. In addition, it managed to obtain the following forecasts: during week n, the number of windows that leave the warehouse (towards the stores) is 20+n. In addition, if the week number is a multiple of 4, then the warehouse receives a delivery of 500 windows from the production plant. So week 1 stock is 1024, week 2 stock is 1024-(20+2)=1002, week 3 stock is 1002-(20+3)=979, week 4 stock is 979-(20+4)+500=1455, etc. This exercise is dedicated to the design of a program helping Anna in her inventory management and according to the specifications described below. The program should start by  displaying the following menu: English translation. Stock forecasts b. Stock maximal (q to leave) If Anna types q, the program stops. If Anna taps a, the program asks her for a week n issue and then displays the stock forecast from week 1 to week n. For example: Choose a week:  10 Week 1 : stock 1024 Week 2 : stock 1002 Week 3 : stock 979 Week 4 : stock 1455 Week 5 : stock 1430 Week 6 : stock 1404 Week 7 : stock 1377 Week 8 : stock 1849 Week 9 : stock 1820 Week 10 : stock 1790 If Anna types b, the program asks her for a week number n and then calculates what the maximum stock will be between week 1 and week n (and tells her in which week this maximum stock will be reached). For example: b Choose a week: 8 Max stock equal to 1849 , reached in week 8

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please answer it in Python

Anna has to manage the stocks of a window warehouse, week by week. The stock for week 1 is 1024 windows. In addition, it managed to obtain the following forecasts: during week n, the number of windows that leave the warehouse (towards the stores) is 20+n. In addition, if the week number is a multiple of 4, then the warehouse receives a delivery of 500 windows from the production plant. So week 1 stock is 1024, week 2 stock is 1024-(20+2)=1002, week 3 stock is 1002-(20+3)=979, week 4 stock is 979-(20+4)+500=1455, etc.

This exercise is dedicated to the design of a program helping Anna in her inventory management and according to the specifications described below.

The program should start by  displaying the following menu:

  1. English translation. Stock forecasts
    b. Stock maximal
    (q
    to leave)

If Anna types q, the program stops.

If Anna taps a, the program asks her for a week n issue and then displays the stock forecast from week 1 to week n. For example:
Choose a week:  10

Week 1 : stock 1024
Week 2 : stock 1002
Week 3 : stock 979
Week 4 : stock 1455
Week 5 : stock 1430
Week 6 : stock 1404
Week 7 : stock 1377
Week 8 : stock 1849
Week 9 : stock 1820
Week 10 : stock 1790

If Anna types b, the program asks her for a week number n and then calculates what the maximum stock will be between week 1 and week n (and tells her in which week this maximum stock will be reached). For example:

b
Choose a week8
Max stock equal to 1849 , reached in week 8

 

 

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY