Question: use python to do the following Series Resistance= R eq = R 1 + R 2 + .... R n Parallel Resistance= R eq =
use python to do the following
Series Resistance= Req = R1 + R2 + .... Rn
Parallel Resistance= Req = 1/{(1/R1)+(1/R2)+(1/R3)..+(1/Rn)}
Suppose you are a co-op student and you have just started your first tour of duty at Mho-ROM Electronic Components, Inc., a large manufacturer of semiconductors and integrated circuits. Your first assignment is to develop a program which will help to model resistance in a circuit.
Since you have already completed EECE 2050C, you know that resistance can come from anywhere in a circuit: wires, board traces, components within the circuit, or resistors themselves.
You have determined that you will need to accommodate two types of resistance: series and parallel. Additionally, you know that they are computed differently. Looking back at your EECE 2050C notes, you find the following equations for parallel and series resistance:
You know that, for the most part, any network of resistances can be replaced by a single equivalent resistance by combining pairs of resistances until the entire network has been reduced to a single resistance. Thus, one only has to deal with two resistances at any time. For this assignment, you will need to write two Python functions. The first one will calculate parallel resistance, and the second will calculate series resistance. Each function will take 2 input values, one for each resistance and it will return one value, namely the total or equivalent resistance.
Additionally, you are asked to write a python program to test the functions. The main program should ask the user for 2 inputs and the inputs should be given in TWO separate lines (i.e. user MUST hit ENTER after typing the first input before the program can move onto the second input). The test program should then calculate the series resistance and the parallel resistance of the two resistance values using the series and parallel functions you created. The main program will output the result for both the series AND parallel calculations. You have been given some test cases by your supervisor to make sure your functions are calculating the correct values:
| Type of Network | First Resistance | Second Resistance | Equivalent Resistance |
| Parallel | 10 (ohms) | 10 | 5 |
| Parallel | 15 | 20 | 8.57 |
| Series | 10 | 50 | 60 |
| Series | 22.2 | 5.64 | 27.84 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
