2. Write a script file that will prompt the user an arbitrary number of positive input...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
2. Write a script file that will prompt the user an arbitrary number of positive input values and will solve the harmonic mean of the numbers. Display an error message when the user input a negative number. Test your program by computing the harmonic mean of five numbers: 1, 4, 9, 12, and 20. Use the formula for harmonic mean: N harmonic mean = Use while loop OR for loop. 1 1 + +...+ X X 1 XN 2. Write a script file that will prompt the user an arbitrary number of positive input values and will solve the harmonic mean of the numbers. Display an error message when the user input a negative number. Test your program by computing the harmonic mean of five numbers: 1, 4, 9, 12, and 20. Use the formula for harmonic mean: N harmonic mean = Use while loop OR for loop. 1 1 + +...+ X X 1 XN
Expert Answer:
Answer rating: 100% (QA)
The image displays instructions for a programming task It requires writing a script th... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
re Regular Languages and Finite Automata (a) Let L be the set of all strings over the alphabet {a, b} that end in a and do not contain the substring bb. Describe a deterministic finite automaton...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
In Problems 6374, perform the indicated operations and simplify the result. Leave your answer in factored form. 3x x - 1 x - 4 18 x - 2x + 1 2
-
On July 1, 2017, Stan Getz, Inc., bought call option contracts for 500 shares of Selmer Manufacturing common stock. The contracts cost $200, expire on September 15, and have an exercise price of $40...
-
A random sample of size n = 12 from a normal population has the mean x = 27.8 and the variance 2 = 3.24. If we base our decision on the statistic of Theorem 8.13, can we say that the given...
-
The \(x\) component of velocity of a particle as a function of time is shown in Figure P9.6. Over what intervals is the work done on the particle \((a)\) positive, \((b)\) negative, (c) zero? Data...
-
Zambian Co. uses a periodic inventory system. Its records show the following for the month of May, in which 68 units were sold. Instructions Compute the ending inventory at May 31 and cost of goods...
-
Launch Company uses a cash receipts journal. The company is a wholesaler and does not charge sales tax, makes no bank credit card sales, and offers a 2% cash discount to customers who pay 10-20 days...
-
You talk to Sally about getting paid for the work you're doing. You suggest $25 an hour and she agrees. You are only doing this temporarily since you have some extra time so you set yourself up as a...
-
All of these are features of bills in QuickBooks Online except what? Select an answer: You can add the contents of a purchase order to a bill. You can add the contents of a customer estimate to a...
-
Alta Ski Company's inventory records contained the following information regarding its latest ski model. The company uses a periodic inventory system. Beginning Inventory, January 1, 2018 1,200 units...
-
Jennifer, the assistant manager in the accounting department, assists in month-end close and financial reporting. The other accounting staff and clerks are assigned various accounting...
-
Gregs Bicycle Shop has the following transactions related to its top-selling Mongoose mountain bike for the month of March. Greg's Bicycle Shop uses a periodic inventory system. Date Transactions...
-
Edwina's accountant correctly calculated her 2 0 2 2 RRSP deduction limit to be $ 1 7 , 3 2 5 . In 2 0 2 2 , having no undeducted contributions from prior years, Edwina contributed $ 9 , 3 9 5 to her...
-
During the steelhead fishing season in north central Idaho, fishing enthusiasts flock to the Salmon river. The fish and game department recorded the distance between fishermen, in yards, on several...
-
if available in your library, read the article, '' Improved survival in patients with locally advanced prostate cancer treated with radiotherapy and goserelin," by Michel Bolla et al. a. How was...
-
Quality Chicken grows and processes chickens. Each chicken is disassembled into five main parts. Information pertaining to production in July 2012 is: Joint cost of production in July 2012 was $50. A...
-
The velocity of a skydiver whose parachute is still closed can be modeled by assuming that the air resistance is proportional to the velocity. From Newton's second law of motion the relationship...
-
The surface of many airfoils can be described with an equation of the form y = tc/0.2 [a0x/c + a1 (x/c) + + a2(x/c)2 + a3(x/ c)3 + a4(x/c)4] where t is the maximum thickness as a fraction of the...
-
The Taylor's series expansion for cosx about x = 0 is given by: where x is in radians. Write a user-defined function that determines cosx using Taylor's series expansion. For function name and...
-
Action Quest Games adjusts its accounts annually. The following information is available for the year ended December 31, 2025. 1. Purchased a 1-year insurance policy on June 1 for $1,800 cash. 2....
-
With each pass of a comet about the Sun, the comets mass (a) remains virtually unchanged. (b) actually increases. (c) is appreciably reduced.
-
Why is carbon such a special atom?
Study smarter with the SolutionInn App