. Create a script with if, else if, and else conditionals to calculate the Total Resistance (R_T) when r1 = 10 Ω, r2 = 20 Ω, and r3 = 30 Ω. 1) r1 , r2, and r3 are connected in series manner. (R_T= r1+r2+r3) 2) r1, r2, and r3 are connected in parallel manner.(R_T = 1/((1/r1)+(1/r2)+(1/r3)) ) 3) r1 is connected to the parallelly connected r2 and r3 in series manner. (Let’s call this Combination) (R_T = r1 + r2xr3/(r2+r3) ) Based on the choice of connection in your script, your script should generate ONLY ONE output out of these followings with numerical result. The Total Resistance is [your result] ohms since r1, r2, r3 are connected in series manner. OR The Total Resistance is [your result] ohms since r1, r2, r3 are connected in parallel manner. OR The Total Resistance is [your result] ohms since r1, r2, r3 are connected in combination manner.
. Create a script with if, else if, and else conditionals to calculate the Total Resistance (R_T) when r1 = 10 Ω, r2 = 20 Ω, and r3 = 30 Ω.
1) r1 , r2, and r3 are connected in series manner. (R_T= r1+r2+r3)
2) r1, r2, and r3 are connected in parallel manner.(R_T = 1/((1/r1)+(1/r2)+(1/r3)) )
3) r1 is connected to the parallelly connected r2 and r3 in series manner.
(Let’s call this Combination) (R_T = r1 + r2xr3/(r2+r3) ) Based on the choice of connection in your script, your script should generate ONLY ONE output out of these followings with numerical result.
The Total Resistance is [your result] ohms since r1, r2, r3 are connected in series manner.
OR
The Total Resistance is [your result] ohms since r1, r2, r3 are connected in parallel manner.
OR
The Total Resistance is [your result] ohms since r1, r2, r3 are connected in combination manner.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps