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 ramp up, producing 1 more widget per day (11 widgets on day 11, 12 on day 12, etc). On day 50 it reaches full speed, where it continues to run until on day 101 it stops producing widgets. Write a program named lab4b_act3. Py that reads in a day (as a number) 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

Answers

Answer 1

Python program named lab4b_act3.py needs to be created to read in a day (as a number) from the keyboard and report the total number of widgets produced from the initial testing phase up to and including the day entered.

Here is a possible Python code solution for this problem:```# Define the number of widgets produced during the initial testing phaseINITIAL_PRODUCTION = 10# Define the day on which the machine starts ramping upRAMP_UP_DAY = 11# Define the maximum number of widgets produced per dayFULL_SPEED_PRODUCTION = 50# Define the day on which the machine stops producing widgetsFINAL_DAY = 101# Read in the day number entered by the userday = int(input("Enter a day number: "))# Calculate the total number of widgets producedtotal_widgets = INITIAL_PRODUCTION * (RAMP_UP_DAY - 1)# Add the widgets produced during the ramp-up phasewhile RAMP_UP_DAY <= day and RAMP_UP_DAY <= FULL_SPEED_PRODUCTION: total_widgets += RAMP_UP_DAY    RAMP_UP_DAY += 1# Add the widgets produced at full speedif day > FULL_SPEED_PRODUCTION:    total_widgets += FULL_SPEED_PRODUCTION * (day - FULL_SPEED_PRODUCTION)# Output the total number of widgets producedprint("Total widgets produced: ", total_widgets)```In this solution, the code first defines the number of widgets produced during the initial testing phase as 10, the day on which the machine starts ramping up as 11, the maximum number of widgets produced per day as 50, and the day on which the machine stops producing widgets as 101.
Then, the program reads in the day number entered by the user and calculates the total number of widgets produced using the formula:total_widgets = INITIAL_PRODUCTION * (RAMP_UP_DAY - 1)where INITIAL_PRODUCTION is the number of widgets produced during the initial testing phase, and RAMP_UP_DAY is the day on which the machine starts ramping up.
The program then adds the widgets produced during the ramp-up phase using a while loop and the formula:total_widgets += RAMP_UP_DAYRAMP_UP_DAY += 1until the day entered by the user or the day the machine reaches full speed (50) is reached.
Finally, if the day entered by the user is greater than the day the machine reaches full speed, the program adds the widgets produced at full speed using the formula:total_widgets += FULL_SPEED_PRODUCTION * (day - FULL_SPEED_PRODUCTION)and outputs the total number of widgets produced.

for more such question on Python

https://brainly.com/question/28675211

#SPJ11


Related Questions

Create a plan, using all four stages of IPM planning, for dealing with the following scenario.

Situation: A strawberry grower lives in an area of the country in which white mildew is endemic. It is resident in the soil and commonly carried by several local weed species. Humidity, overly-damp soil, shade, and lack of air circulation can encourage growth of white mildew. An outbreak in the crop can easily reduce crop yield sufficiently to eliminate the grower’s profit.

Answers

Integrated Pest Management (IPM) is an approach that combines various pest control strategies to effectively manage pest problems while minimizing the use of harmful pesticides. IPM consists of four stages: monitoring and identification, prevention, treatment, and evaluation. Here is a plan for dealing with the white mildew outbreak in the strawberry crop:

Stage 1: Monitoring and Identification
The first step is to monitor the field regularly to identify the early signs of white mildew. Monitoring can be done through visual inspections of the plants for signs of white mildew, such as white powdery patches on the leaves, stems, and fruit. Additionally, soil testing can be conducted to detect the presence of white mildew in the soil.

Stage 2: Prevention
The best approach to controlling white mildew is prevention. The following measures can be taken to prevent white mildew:

Crop rotation: The grower can rotate their strawberry crop with other non-susceptible crops to reduce the incidence of white mildew in the soil.
Soil management: The grower can ensure proper soil drainage to prevent overly damp soil, avoid planting in shady areas, and promote good air circulation in the crop by pruning plants and removing weeds.
Sanitation: The grower can keep the crop area clean by removing and disposing of infected plant debris and weeds.
Resistant varieties: The grower can choose to plant strawberry varieties that are resistant to white mildew.
Stage 3: Treatment
If white mildew is detected in the crop, the grower can use the following treatment options:

Fungicides: Fungicides can be used to treat white mildew, but they should only be used as a last resort after other measures have failed. The grower should select a fungicide that is effective against white mildew and has minimal impact on the environment.
Biological control: The grower can use biological control agents such as Bacillus subtilis or Trichoderma to prevent the growth of white mildew.
Stage 4: Evaluation
The grower should evaluate the effectiveness of the IPM plan by monitoring the field after implementing the prevention and treatment measures. If the measures are successful, the grower can continue with the plan. If not, they can adjust the plan accordingly.

Overall, this IPM plan for white mildew in strawberry crops focuses on prevention measures to reduce the likelihood of an outbreak and minimize the need for pesticides.

Where is the incorrect pronoun shift. Rewrite the sentence correctly.

The band played its fine concert last night.

Answers

The sentence is grammatically correct and there is no incorrect pronoun shift.

What is a pronoun?

A pronoun is a word used to replace a noun or noun phrase in a sentence. It is used to avoid repetition of the same noun or noun phrase in a sentence, making the sentence more concise and readable.

Examples of pronouns include he, she, it, they, we, me, him, her, them, us, and so on. Pronouns can be categorized as personal pronouns, possessive pronouns, reflexive pronouns, demonstrative pronouns, indefinite pronouns, relative pronouns, and interrogative pronouns.


Pronouns are important because they improve the clarity and flow of a sentence by replacing repetitive nouns or noun phrases.

The pronoun in the above is it's.

Learn more about pronouns:
https://brainly.com/question/30510319
#SPJ1

Use the keyword strategy to remember the meaning of the following word. The meaning for the word has been
provided. Write your keyword and describe the picture you would create in your mind.
obfuscate: to make something so confusing that it is difficult to understand.
Keyword:
Picture:

Answers

Keyword: Fog

The Picture to be created

Picture: I would create a mental image of a dense fog that makes it difficult to see clearly. This fog would obscure and confuse the landscape, making it hard to navigate and understand.

The more the fog thickens, the more obscure and confusing the environment becomes, just like obfuscating information. The keyword "fog" would remind me of the meaning of the word "obfuscate" and help me remember its definition.

Read more about keyword strategy here:

https://brainly.com/question/10055344

#SPJ1

Write a narrative on falling asleep on your way home and getting lost make sure to include what happened and how you eventually got home.

Answers

As I got into my car after a long day at work, I felt the exhaustion hit me like a ton of bricks. The drive home was only supposed to take 20 minutes, but my heavy eyelids made the trip feel like an eternity. I tried my best to keep my focus on the road, but it was a losing battle.

I remember struggling to keep my eyes open, and then everything went black. When I opened my eyes again, I was no longer on the familiar streets of my neighborhood. Panic set in as I realized I had fallen asleep at the wheel and must have taken a wrong turn.

My phone's battery was dead, and I had no idea where I was or how to get back home. I drove around aimlessly, hoping to recognize a street name or landmark, but everything looked unfamiliar.

After what seemed like hours, I stumbled upon a gas station and asked for directions. The attendant gave me a puzzled look, probably wondering how I got so lost, but kindly guided me back on track.

Finally, I saw the familiar streets and landmarks, and the relief that washed over me was indescribable. I made it home, safe and sound, but shaken by the experience.

From that day on, I vowed to never drive when overly tired and to always have a fully charged phone for emergencies. It was a wake-up call that reminded me of the importance of road safety and being alert behind the wheel.
Other Questions
[1] After earning a few dollars working on my brother-in law's farm near Portage [Wisconsin], I set off on the first of my long lonely excursions, botanising in glorious freedom around the Great Lakes and wandering through innumerable tamarac and arbor-vitae swamps, and forests of maple, basswood, ash, elm, balsam, fir, pine, spruce, hemlock, rejoicing in their bound wealth and strength and beauty, climbing the trees, revelling in their flowers and fruit like bees in beds of goldenrods, glorying in the fresh cool beauty and charm of the bog and meadow heathworts, grasses, carices, ferns, mosses, liverworts displayed in boundless profusion.[2] The rarest and most beautiful of the flowering plants I discovered on this first grand excursion was Calypso borealis (the Hider of the North). I had been fording streams more and more difficult to cross and wading bogs and swamps that seemed more and more extensive and more difficult to force one's way through. Entering one of these great tamarac and arbor-vitae swamps one morning, holding a general though very crooked course by compass, struggling through tangled drooping branches and over and under broad heaps of fallen trees, I began to fear that I would not be able to reach dry ground before dark, and therefore would have to pass the night in the swamp and began, faint and hungry, to plan a nest of branches on one of the largest trees or windfalls like a monkey's nest, or eagle's, or Indian's in the flooded forests of the Orinoco described by Humboldt.[3] But when the sun was getting low and everything seemed most bewildering and discouraging, I found beautiful Calypso on the mossy bank of a stream, growing not in the ground but on a bed of yellow mosses in which its small white bulb had found a soft nest and from which its one leaf and one flower sprung. The flower was white and made the impression of the utmost simple purity like a snowflower ...In a paragraph of 35 sentences, explain how Muir views nature. Support your answer with two examples from the passage. Explain how each example reveals his view of nature in the yellow wallpaper what is the relationship with john and the power dynamics at play. how do they treat each other? what does the ending say about john's perceptions of his wife? what scientists are credited with the base-pairing rules? true or false: we can use electron microscopy to determine the path of mineral growth during metamorphism. agricultureWhich industries grew in the Midwest due to the Erie Canal?Responsescattle raisingminingtextilesagriculture 123000000 as a power of 10 vygotsky pointed out that children learn to perform at a higher level through interaction with more competent peers and parents. he called the difference between what they could do alone and what they could do with assistance the . aunt butch borrows $19,500 from the bank at 8 percent annually compounded interest to be repaid in 10 equal annual installments. the interest paid in the third year is Choose the correct noun the direct object pronoun has replaced. 1. Ana los Lava. A. un cuchillo B. Uno's tenedores C. una's cucharas2. No la vemos. A. PedroB. GloriaC. El profesor 3. Las tienes? A. Tu pasaporteB. Tu bolsaC. Tus fotos4. Juan lo vende. A. El carroB. La bicicletaC. Los mapas5. Siempre lo tomamos. A. La bicicletaB. La motoC. El autobus when a company sells inventory using the perpetual inventory system, the balance in the inventory account . multiple choice question. decreases is not affected increases Please help need to get a good score HELP ASAP ON TIME LIMIT 50 PNTS How to get the unadjusted cost of sales in cost and management accounting mrs. stevens is an inpatient in your hospital. her prescriber just ordered hydroxyzine 10 mg every 8 hours. how many tablets of hydroxyzine 10 mg will you put in mrs. stevens' med cart drawer for a 24-hour fill? Energy from cellular metabolism is converted to ATP by respiring organisms. Place the following steps in the correct order. Events (5 items) (Drag and drop into the appropriate area) - Influx of Hthrough ATP synthase drives ATP production - NADH and FADH are oxidized by electron transport proteins. - An electrochemical gradient of protons is established (p). - Glycolysis and TCA cycle generate NADH & FADH- Electron transport releases energy that is used to translocate H+. recombinant organisms produced through the introduction of foreign genes are referred to as or . A good scholar know that it is up to him or her to succeed. In order to suceed, you must give your best effort to all learning activities. Explain How you will develop this habit of a scholar the deed to secure debt (security deed), commonly used by lenders who make residential real estate loans in georgia, serves to allison has returned to school after five years out of the work force. she is taking one course at the local university for a cost of $1,420. to minimize her taxes, should she take a tuition and fees deduction or an education credit? (assume a 15 percent tax rate.) (assume the education credit will equal the entire cost of the course.) which of the four histones has the largest tail? do histone tails play an important role in the organization of core nucleosome particle? how do histone tail modifications contribute to chromatin structure