Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+42-1 Describe our ability to communicate nonverbally.

Answered: 1 week ago

Question

What are the need and importance of training ?

Answered: 1 week ago

Question

What is job rotation ?

Answered: 1 week ago