Looking for answers? Westonci.ca is your go-to Q&A platform, offering quick, trustworthy responses from a community of experts. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly platform. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly platform.

Create a program that will compute the voltage drop across each resistor in a series circuit consisting of three resistors. The user is to input the value of each resistor and the applied circuit voltage. The mathematical relationships are 1. Rt- R1 R2 + R3 It Vs/Rt Where Rt -Total circuit resistance in ohms R1,R2,R3 Value of each resistor in ohms It - Total circuit current in amps Vs -Applied circuit voltage Vn- Voltage drop across an individual resistor n (n-1, 2 or 3) in volts Rn-R1,R2, or R3
Use the values of 5000 for R1, 3000 for R2,2000 for R3, and 12 for Vs. The output of the program should be an appropriate title which identifies the program and include your name. All values should be accompanied by appropriate messages identifying each. Submit a printout of your program and the printed output to your instructor


Sagot :

Answer:

The program in Python is as follows:

R1 = int(input("R1: "))

R2 = int(input("R2: "))

R3 = int(input("R3: "))

   

Rt = R1 + R2 + R3

Vs = int(input("Circuit Voltage: "))

It = Vs/Rt

V1= It * R1

V2= It * R2

V3= It * R3

print("The voltage drop across R1 is: ",V1)

print("The voltage drop across R2 is: ",V2)

print("The voltage drop across R3 is: ",V3)  

Explanation:

The next three lines get the value of each resistor

R1 = int(input("R1: "))

R2 = int(input("R2: "))

R3 = int(input("R3: "))

This calculates the total resistance    

Rt = R1 + R2 + R3

This prompts the user for Circuit voltage

Vs = int(input("Circuit Voltage: "))

This calculates the total circuit voltage

It = Vs/Rt

The next three line calculate the voltage drop for each resistor

V1= It * R1

V2= It * R2

V3= It * R3

The next three line print the voltage drop for each resistor

print("The voltage drop across R1 is: ",V1)

print("The voltage drop across R2 is: ",V2)

print("The voltage drop across R3 is: ",V3)