Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Group 1: Create a program that will prompt a user for a resistor numeric code and translate that value into the corresponding resistance. Recall what

Group 1:

Create a program that will prompt a user for a resistor numeric code and translate that value into the corresponding resistance. Recall what the base units are for resistors.

image text in transcribed
Lab 3: Numeric Code Calculator (Conditionals) DUE: by end of the dey Group size: Up to 2 students per group Deliverables: 1. Hardcopy of your program (you can wubmit to my dropber over by 2204 ) a. Also upload a softcopy of your s to the Slate dropben (for verification) 2. Ensure that the program is well commented: a. Comments at the top of the program name, date, program synopsis b. Key comments through the program c. Ensure that the program is neatly formatted for reastability Overview: Create a program where a user enters a 3-det numeric code and trastute this cede into an appropriate value to be displeved on the screen, ez for a resistor a code of 120 will be disployed as 1211210= 12), 121 as 120(12101=120l,122 as 1.2k{12102=1200}, and 123 as 12k(12103= 12,000) General steps: 1) Have the user enter the numeric code 2) If the value corresponds to a 3-digit range (carefuly thinik about this): a. Break the 3-digit code into the significant deits lee the 12 in the above examplel, and the multipler (e \&. the 3 in the above example). b. NOTE: for the above make use of the modulus operator and division ftry a few scenarios to see how to make this work-there are probably tamples somewhere on the internet) c. Caiculate the value using the significant digits and the multiples, eg. 12,000 for the above example d. If the calculated value: L. is below 1000 , then display the rewlt in base units, eg. Ohms 1 ii. Is between 1000 and below 1,000,000, then displiy the retult in the next upper engineering range, e.g. kiloOhms take the calculated value and divide by 1000 ii. Otherwise show it in the upper engineering range, eg. megsohms take the calculated value and divide by 1,000,000 iv. NOTE: for the above you will need nested it ebes 3) Otherwise daploy an error message

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

Students also viewed these Databases questions