Question: python 3 code Assume a machine during its initial testing phase produces 10 widgets a day. After 10 days of testing (starting on day 11),

python 3 code

Assume a machine during its initial testing phase produces 10 widgets a day. After 10 days of testing (starting on day 11), it begins to run at full speed, producing 40 widgets a day. After 50 days at full speed (days 11-60), it gradually starts becoming less productive, and produces 1 fewer widget per day, (ie. 39 widgets on day 61, etc.) until on day 100 it no longer produces any widgets. Write a program that will read in a day number from the keyboard and will report the total number of widgets produced from the initial testing phase up to and including the day entered. For example, entering 3 would report 30 widgets.

Your code should also . . .

Include the valid range of day numbers on the user prompt

Check for inappropriate day numbers and message the user accordingly

Echo the input in the output when you report the number of widgets

(Note: Part of the challenge in this program is for YOU to work out the model for how to compute widgets produced in total, given the above information. Hint: Solve this problem on paper, then implement the solution in Python. A graph or diagram is particularly helpful. This approach is much easier than debugging some lousy Python code written before you understand the problem.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!