Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with this beginners python program Assignment We shall now write a program which will make use of iteration to illustrate the Maximum Power

Need help with this beginners python program image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Assignment We shall now write a program which will make use of iteration to illustrate the Maximum Power Transfer Theorem. It is suggested that the program be saved as MaxPowerpy. This program wil feature both tabular and graphical output. The program should ask the user for a voltage source value along with its internal resistance. It will then crcate a table of results for a range o resistances. The load resistance will range from one-tenth of the internal resistance to internal resistance, incrementing by one-tenth of the internal resistance cach time. For example, if the internal resistance is 200 ohms, the load will start at 20 and increase by 20 until it gets to 400. This will create ten load values less than the internal resistance and ten loads which are greater. The table should show four columns: The load resistance, load voltage, load current, and load power. It should also indicate the maximum power found. Once the table is complete, the program should draw a graph of the load power versus the load resistance. Here's one possible pseudo-code: f load 1. Give the user directions. 2. Ask user for source voltage and resistance (E and Rsource). 3. Initialize the maximum power (Pmax) to zero. 4. Print out a heading for the table (Rload, Vload, I and Pload). 5. Start a loop which initializes the load resistance (Rload) at one-tenth of the source resistance, increments the load resistance by one-tenth of the source resistance and finishes when the load reaches twice the source resistance. 6. Compute the current (), the load voltage (Vload) and load power (Pload) from: IE/(Rsource+Rload) Vload-E Rload/(Rsource+Rload) Pload = 1 * Vlad 7. Compare the load power just calculated to Pmax. If it's larger, reset Pmax to this value. 8. Print out Rload, Vload, I and Pload 9. End of loop (from step five). 10. Print out Pmax. 11. Determine the proper scaling factor for the graph. 12. Print out a title for the graph. 13. Start a loop which will initialize the load resistance (Rload) at one-tenth of the source resistance, increment the load resistance by one-tenth of the source resistance and finish when the load reaches twice the source resistance (same as step five). 14. Compute the current (1), the load voltage (Vload) and load power (Pload) as in step six. 15. Plot Pload using the scale factor from step 11. 16. End of loop (from step 13)

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

Students also viewed these Databases questions

Question

Discuss five types of employee training.

Answered: 1 week ago

Question

LO2 Explain the nature of the psychological contract.

Answered: 1 week ago