Write a program that initializes and stores the following resistance values in an Array/List named resistance:...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that initializes and stores the following resistance values in an Array/List named resistance: 12, 16, 27, 39, 56, and 81. Your program should also create two additional Lists named current and power, each capable of storing six float numbers. Using a for loop and an input statement, have your program accept six user-input numbers in the current List when the program is run. Validate the input data and reject any zero or negative values. If a zero or a negative value is entered, the program should ask the user to re-enter the value. Your program should store the values of the power List. To calculate the power, use the formula given below. power = 1² R V = 24v I = 2A For example, power [0]= (current[0]**2) * resistance[0]. Using loop, your program should then display the following output (fill in the chart). The output should be aligned. Consider exploring Python format' statement. Resistance 12 16 27 39 56 81 Total: ? Current ? R= 120 P = 48W ? Power ? 2. Write a program that initializes and stores the following resistance values in an Array/List named resistance: 12, 16, 27, 39, 56, and 81. Your program should also create two additional Lists named current and power, each capable of storing six float numbers. Using a for loop and an input statement, have your program accept six user-input numbers in the current List when the program is run. Validate the input data and reject any zero or negative values. If a zero or a negative value is entered, the program should ask the user to re-enter the value. Your program should store the values of the power List. To calculate the power, use the formula given below. power = 1² R V = 24v I = 2A For example, power [0]= (current[0]**2) * resistance[0]. Using loop, your program should then display the following output (fill in the chart). The output should be aligned. Consider exploring Python format' statement. Resistance 12 16 27 39 56 81 Total: ? Current ? R= 120 P = 48W ? Power ? 2.
Expert Answer:
Answer rating: 100% (QA)
Lists and Variables declaration Resistance121627395681 Current6 capable of storing 6 values of flaot ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
The following are trial balance of Clarissa Amanda Sdn. Bhd. as at 31st December 2021. Debit RM Credit RM Opening stock, 1 Jan 2021 16,000 Purchases 75,000 Sales return 5,000 Carriage inwards 1,500...
-
Ivanhoe Company incurred research and development costs of $ 9 0 0 0 0 to develop a patent, and legal fees of $ 3 0 0 0 0 to register the patent. The patent has a legal life of 2 0 years and a useful...
-
Information sent electronically over the Internet affords little privacy. One of the reasons that cryptography is included in this text is because its importance is growing due to the increasing need...
-
Artsy Corporation has been sued in U.S. Federal Court on charges of sex discrimination in employment under Title VII of the Civil Rights Act of 1964.7 The litigation at contention here is a...
-
Explain how a purchase made with a store credit card is different from a purchase made with a bank credit card.
-
Two parallel-plate capacitors have the same plate separation. The plate area of capacitor 1 is twice that of capacitor 2. (a) How do the potential differences across the two capacitors compare if the...
-
Route Canal Shipping Company has the following schedule for aging of accounts receivable: a. Fill in column (4) for each month. b. If the firm had $1,500,000 in credit sales over the four-month...
-
16. Using the given data find value of resonance energy of benzene C6H6. AydgH of cyclohexene = -119 kJ/mole AhydgH of benzene = -206.5 kJ/mole (a) -150.5 kJ/mole (b) -325.5 kJ/mole (c) -87.5 kJ/mole...
-
Cary Company manufactures two models of industrial componentsa Standard model and an Advanced Model. It has provided the following information with respect to these two products: Standard Advanced...
-
when spoilage occurs as a result of exacting specifications or difficult processing, any loss is charged to a an extraordinary losses b the specific job on which the spoilage occurred c...
-
On what grounds can law prevent/limit the redefinition or transformation of "traditional family structures"? Why do we continue to place value on such structures? What is the law's main "job" when it...
-
How can interdisciplinary approaches, drawing from fields such as psychology, sociology, anthropology, and economics, deepen our understanding of the cognitive, social, and cultural underpinnings of...
-
how did Title VI law impact teachers or education as a whole? How did the law impact students and families?
-
Ruth transfers property worth $200,000 (basis of $60,000) to Goldfinch Corporation. In return, she receives 80% of its stock (worth $180,000) and a long-term note, executed by Goldfinch and made...
-
You are performing a simulation to investigate the probability that a basketball player will make free throws during a game. The information that you have to help create your simulation, is that this...
-
For the first time, in a worying sign, oil futures fell into the negative territory What strange times we live in. Unprecedented Unsure. Where givens are turned upside down. Yes, coronavirus is one...
-
A consultant is beginning work on three projects. The expected profits from these projects are $50,000, $72,000, and $40,000. The associated standard deviations are $10,000, $12,000, and $9,000....
-
David and Darlene Jasper have one child, Sam, who is 6 years old. The Jaspers reside at 4639 Honeysuckle Lane, Los Angeles, CA 90248. David's Social Security number is 577-11-3311, Darlene's is...
-
Jan has two jobs during 2012. One employer withheld and paid FICA taxes on $66,600 of Jan's salary, and the other employer withheld and paid FICA taxes on $44,400 in salary paid to Jan. Calculate the...
-
On July 1, 2012, Ted, age 73 and single, sells his personal residence of the last 30 years for $365,000. Ted's basis in his residence is $35,000. The expenses associated with the sale of his home...
-
How can we effectively analyze a firm's financial ratios?
-
In 2019, Italia Mining Corporation had sales of \($69\) million, total assets of \($45\) million, and total liabilities of \($23\) million. The interest rate on the debt is 6.5 percent, and its tax...
-
BlackBerry Ltd. has a target current ratio of 2.0 but has experienced some difficulties financing its expanding sales in the past few months. At present, the firm has current assets of $750,000 and a...
Study smarter with the SolutionInn App