Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions