Create a program that uses a while loop to read in numbers from the user until...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create a program that uses a while loop to read in numbers from the user until the user types O, without doing anything else with the numbers. 2. Extend the program by creating an empty list before the while loop. Next, change the loop so that for each run through it stores the number the user enters in this list. 3. After the while loop is finished, write a for loop that goes through the list and prints each individual element. 4. Extend the program with a variable minSum. Then write a new for loop that goes through the list you created earlier and adds the value of each number to minSum. (Hint: +=). Then print the sum to the user. 5. Use two separate for loops to find respectively the smallest and the largest element in the list, and print these. Here, you must arrive at the smallest and largest number in the list without using min() or max(). Create a program that uses a while loop to read in numbers from the user until the user types O, without doing anything else with the numbers. 2. Extend the program by creating an empty list before the while loop. Next, change the loop so that for each run through it stores the number the user enters in this list. 3. After the while loop is finished, write a for loop that goes through the list and prints each individual element. 4. Extend the program with a variable minSum. Then write a new for loop that goes through the list you created earlier and adds the value of each number to minSum. (Hint: +=). Then print the sum to the user. 5. Use two separate for loops to find respectively the smallest and the largest element in the list, and print these. Here, you must arrive at the smallest and largest number in the list without using min() or max().
Expert Answer:
Answer rating: 100% (QA)
1 Create a program that uses a while Loop to read in numbers from the user until the user types 0 wi... View the full answer
Related Book For
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall
Posted Date:
Students also viewed these programming questions
-
What is the best costing method for the Walt Disney Company and explain why you think this method will work best
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
In this assignment, you will create a program that allows theuser to draw in a window using brushes of different sizes andcolors. The user will be able to change the size and color of thebrush using...
-
If an investor holds a credit-linked note and the credit event does not occur, the investor receives: A. All promised cash flows as scheduled. B. All coupon payments as scheduled but not the par...
-
The garden shears shown consist of two blades and two handles. The two handles are connected by pin C and the two blades are connected by pin D. The left blade and the right handle are connected by...
-
An external force F = F 0 sin wt is applied to the cylinder as shown. What value w c of the driving frequency would cause excessively large oscillations of the system? k 2m m YF
-
Two parallel disks each of radius \(R\) are facing each other and separated by a distance \(H\). Derive an expression for the view factor between these disks.
-
The following data come from the financial statements of Mitchell Company for the year ended March 31, 2015 (in millions): Requirements 1. Prepare a cash flow statement for the year ended March 31,...
-
1. As a Marketing Manager with responsibility for staff, describe three (3) issues that you see as most likely to create boundary-spanning problems for employees in a customer call center at your...
-
McGee Carpet and Trim installs carpet in commercial offices. Andrea McGee has been very concerned with the amount of time it took to complete several recent jobs. Some of her workers are very...
-
Kamada: UIA Japan (B). Takeshi Kamada, Credit Suisse (Tokyo), observes that the yen-dollar spot rate has been holding steady, and that both dollar and yen interest rates have remained relatively...
-
Focus the proposal to develop the change agent on one of the following: career development, work-life balance, compensation and benefits, retention, or labor-management relations
-
Below you will find the link to the article "Why we Hate HR". In addition to your reflection paper, please read, summarize, and reflect on this article https://www.fastcompany.com/53319/why-we-hate-hr
-
Discuss The 5 component of General, Strategies, Industry, Relationship and Company-Specific for the human resource?
-
Organizational culture is important to a business. Research a company of your choice and share the organizational culture of the company. Is the culture working? If you were on the management team,...
-
Explain what is meant by employee relations and what employers can do to improve it. Include in your discussion how employers can deal with employee treatment during layoffs and/or mergers. 2. Using...
-
Required 1 In our United States system of criminal justice, individuals are considered innocent until proven guilty. Do you believe this general rule apply to disputes between a taxpayer and the...
-
The production budget of Artest Company calls for 80,000 units to be produced. If it takes 30 minutes to make one unit and the direct labor rate is $16 per hour, what is the total budgeted direct...
-
Using the interview data you gained from the group exercise on Maverick Transport in Project 1, meet with your group to brainstorm the design of a questionnaire for the hundreds of truck drivers that...
-
What are three situations that point to printers as the best choice for output technology?
-
List three main ways in which presentations of output are unintentionally biased.
-
Henry Ford, founder of Ford Motor Company, is quoted as saying that customers could choose a car in any color as long as it was black. Things have come a long way since that timewhen customization...
-
Not long ago, New England Confectionery Company, or Necco for short, marked the production of its one trillionth candy wafer. The humble roots of Necco, the country's oldest continuously operating...
-
What is utility?
Study smarter with the SolutionInn App