Question: Step 2 : Inputs ( Getting the Value of the Resistors ) The program is supposed to ask the user for the resistor values. To

Step 2: Inputs (Getting the Value of the
Resistors)
The program is supposed to ask the user for the resistor values. To do that you will use the "input" function. The way the input function works is that the program presents the user with the prompt (whatever you put in quotation marks between the parentheses) and then waits. Whatever the user then enters is the return value and is placed into the variable. There is a slight variation on this if you are entering text instead of numbers, but we'll see that in a future week: today we are entering numbers.
Use the input function (zyBook section 3.5) two times to ask the user for
7
the resistance of each of the two resistors. For example:
% size of a single widget
inches 1= input("Enter the first widget size in inches: ");
Of course, change the comment, variable name, and message to match your program's task. Each time you use this you will want to replace the variable "inches 1" with a different variable[so that when you are done you have 2 values, for example R1 and R2, that each have stored in them a resistor value.
Step 3: Creating Your Program
Your program should follow this sequence of operations and calculations:
Input the value (resistance) of resistor 1 from the user.
Input the value (resistance) of resistor 2 from the user.
Calculate the effective resistance of the bank of resistors using the formula:
Requivalent=11R1+1R2+cdots
Remember to add in parentheses as necessary, Leave the semicolon off the end of the final calculation, so the answer is printed to the Command Window.
 Step 2: Inputs (Getting the Value of the Resistors) The program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!