Input a list of peoples ages from the user (terminated by 0) and find the average age.
Question:
Input a list of people’s ages from the user (terminated by 0) and find the average age. Be sure to check that the user enters only positive numbers.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 28% (7 reviews)
Code def averageno list i1 sum0 while i0 lintinputEn...View the full answer
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Input a list of positive numbers, terminated by 0, into an array Numbers[]. Then display the array and the largest and smallest number in it.
-
Create a program that allows the user to input a list of first names into one array and last names into a parallel array. Input should be terminated when the user enters a sentinel character. The...
-
An interviewer is given a list of people she can interview. If the interviewer needs to interview 5 people, and if each person (independently) agrees to be interviewed with probability 2/3, what is...
-
In the Edgeworth production box diagram, what conditions must hold for an allocation to be on the production contract curve? Why is a competitive equilibrium on the contract curve?
-
It is desirable to use well-designed controllers to maintain building temperature with solar collector space-heating systems. One solar heating system can be described by [10] dx1/dt = 3x1 + u1 + u2...
-
Computech Corporation is expanding rapidly and currently needs to retain all of its earnings; hence, it does not pay dividends. However, investors expect Computech to begin paying dividends,...
-
What is meant by the equivalence of the unit of analysis? Explain with examples.
-
Poke a hole in a piece of cardboard and hold the cardboard horizontally in the sunlight (as in Figure 1.6). Note the image of the Sun that is cast below. To convince yourself that the round spot of...
-
Tropic Corp. has sales revenue of $501,000 resulting in operating income of $54,000. Average invested assets total $608,000, and the cost of capital is 6% Calculate the return on investment if sales...
-
Separate company and consolidated financial statements for Pop Corporation and its only subsidiary, Sal Corporation, for 2012 are summarized here. Pop acquired its interest in Sal on January 1, 2011,...
-
If a For loops increment is positive, then the body of the loop will not be executed if the initial value is ____________ the limiting value.
-
To ____________ data means to ensure that they are in the proper range.
-
Which of these methods is used for writing bytes to an outputstream? (a) put() (b) print() (c) printf() (d) write()
-
3 Below is financial information for December Inc., which manufactures a single product: 4 5 5 7 3 #units produced October Low activity November High activity 7,000 11,000 Cost of goods manufactured...
-
(b) The satellite's booster rockets fire and lift the satellite to a higher circular orbit of radius 2R1. The satellite follows the path shown in the diagram below, moving a total distance S during...
-
D. An airplane flies at a speed of 250 kilometers per hour (kph) at an altitude of 3000 m. Assume the transition from laminar to turbulent boundary layers occurs at critical Reynolds Number, RE cr, =...
-
1. (35 points) by Qet = QoQ = Q0Q2 N!37 N/A (1-B, (r), where A- B(T) V * 4R (e-(R)/KT - 1) R dR is the second virial coefficient. The classical partition function for an imperfect gas comprising N...
-
es Farm has 28 employees who are paid biweekly. The payroll register showed the following payroll deductions for the pay period ending March 23, 2021. Gross Pay 85,950.00 EI Premium Income Taxes...
-
According to Keplers second law, the earth travels fastest when it is closest to the sun. Is this consistent with the law of gravitation? Explain.
-
a. Why does the Wi-Fi Alliance release compatibility testing profiles in waves instead of combining the entire standards features initially? 27a1.) An 802.11ac Wi-Fi compatibility testing profile...
-
List five non-proprietary Internet applications and the application-layer protocols that they use.
-
For a communication session between a pair of processes, which process is the client and which is the server?
-
Consider an HTTP client that wants to retrieve a Web document at a given URL. The IP address of the HTTP server is initially unknown. What transport and application-layer protocols besides IITTP are...
-
The company sold merchandise to a customer on March 31, 2020, for $100,000. The customer paid with a promissory note that has a term of 18 months and an annual interest rate of 9%. The companys...
-
imer 2 0 2 4 Question 8 , PF 8 - 3 5 A ( similar to ) HW Score: 0 % , 0 of 1 0 0 points lework CH 8 Part 1 of 6 Points: 0 of 1 5 Save The comparative financial statements of Highland Cosmetic Supply...
-
An investor wants to purchase a zero coupon bond from Timberlake Industries today. The bond will mature in exactly 5.00 years with a redemption value of $1,000. The investor wants a 12.00% annual...
Study smarter with the SolutionInn App