Assume a machine during its initial testing phase produces 10 widgets a day. After 10 days...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 reads in a day (as an integer) from the keyboard and reports 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 do the following: Include the valid range of day numbers on the user prompt (a positive number) Check for inappropriate day numbers and message the user accordingly Echo the input in the output when you report the number of widgets Use the output format shown below 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 by hand on paper first, 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. Example output using input -1 (Note, You will need to change the prompt in your code): Please enter a positive value for day: -1 You entered an invalid number! Save your code as Lab4b_Act2.py and save to your hard drive. You will then upload this file to Mimir for testing. 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 reads in a day (as an integer) from the keyboard and reports 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 do the following: Include the valid range of day numbers on the user prompt (a positive number) Check for inappropriate day numbers and message the user accordingly Echo the input in the output when you report the number of widgets Use the output format shown below 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 by hand on paper first, 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. Example output using input -1 (Note, You will need to change the prompt in your code): Please enter a positive value for day: -1 You entered an invalid number! Save your code as Lab4b_Act2.py and save to your hard drive. You will then upload this file to Mimir for testing.
Expert Answer:
Related Book For
Financial Algebra advanced algebra with financial applications
ISBN: 978-0538449670
1st edition
Authors: Robert K. Gerver
Posted Date:
Students also viewed these algorithms questions
-
Write a program that will take as input two Web page URLs and find a path of links from one to the other. What is an appropriate search strategy is bidirectional search a good idea? Could a search...
-
Write a program that will compute statistics for eight coin tosses. The user will enter either an h for heads or a t for tails for the eight tosses. The program will then display the total number and...
-
Write a program that will read data from the file "p6.txt". The file (that you will create) always contains 15 test scores (whole numbers between 0 and 100). The test scores are scores for 5 students...
-
Assume that investment spending depends only on the interest rate and no longer depends on output. Given this information, a decrease in money supply: a. will cause investment to increase. b. may...
-
Consider the outpatient service times in Exercise 3.3. Construct a normal probability plot, an exponential probability plot, and a Weibull probability plot for these data. Do any of these...
-
Define and distinguish between an open and a closed adoption.
-
If the sample size is small, the differences between the items in the matched pairs must show no evidence of strong and must contain no ______________ . In Exercises 3 and 4, fill in each blank with...
-
A manager has received an analysis of several cities being considered for a new office complex. The data (10 points maximum) are as follows: a. If the manager weights the factors equally, how would...
-
Products LX4 EX6 RX8 Selling price $180 $280 $320 Variable manufacturing cost per unit $110 $190 $210 Variable marketing cost per unit $20 $60 $68 Contribution margin per unit $50 $30 $42 Machine...
-
Mr. Juan Dela Cruz is a self-employed professional based in the Philippines. He provides consulting services in the field of information technology. As a resident Filipino citizen, Mr. Dela Cruz is...
-
Johnson Company Internal Controls Johnson Company Inc. (Johnson Company or the Company) is a U.S. public company that files quarterly and annual reports with the Securities and Exchange Commission...
-
Analyze the movement of the USD against the foreign currency for Portfolio A. Justify your choice. Kamala Gupta, a currency management consultant, is hired to evaluate the performance of two...
-
Given the recent movement in the forward premium for the SEK/EUR rate, Bjrk can expect that the hedge will experience higher: A. basis risk. B. roll yield. C. premia income. Rika Bjrk runs the...
-
Analyze the foreign-currency return for Portfolio B. Justify your choice. The fund manager of Portfolio B is evaluating an internally-managed 100% foreigncurrency hedged strategy. Kamala Gupta, a...
-
Describe two considerations for each type of component recommended to Grimmett for her manager selection process. Grimmett asks the adviser if any other preparatory steps should be taken before...
-
Calculate the contribution of foreign currency to the Bhatt accounts total return. Show your calculations. Darden meets with Bhatt and learns that Bhatt will be moving back to his home country of...
-
What strategies would you employ to ensure remote employees receive the same level of training and development as those working on-site?
-
During 2012, Cheng Book Store paid $483,000 for land and built a store in Georgetown. Prior to construction, the city of Georgetown charged Cheng $1,300 for a building permit, which Cheng paid. Cheng...
-
Jean bought a $1,980 snow thrower on the installment plan. The installment agreement included a 10% down payment and 18 monthly payments of $116 each. a. How much is the down payment? b. What is the...
-
The Lerners had x dollars in medical expenses. Medical insurance covered 80% of these expenses, so they had to pay 20% of the medical bills. The IRS allows medical and dental expenses deductions for...
-
The Gidget Widget Corporation produces widgets. The fixed expenses are $65,210, and the variable expenses are $4.22 per widget. Express the expense function algebraically.
-
The man has a mass of 78 kg and stands motionless at the end of the diving board. If the board has the cross section shown, determine the maximum normal strain developed in the board. The modulus of...
-
The steel rod having a diameter of 1 in. is subjected to an internal moment of M = 300lbft. Determine the stress created at points A and B. Also, sketch a three-dimensional view of the stress...
-
The steel beam has the cross-sectional area shown. If w=5 kip/ft, determine the absolute maximum bending stress in the beam. W 8 8 ft- 8 ft W ft- -8 ft- .8 in. 0.30 in. 0.3 in.- 10 in. 0.30 in.
Study smarter with the SolutionInn App