C) Write a program that will prompt the user to enter a sequence of values terminated...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
C) Write a program that will prompt the user to enter a sequence of values terminated by 0, (i.e. stop when the user enters a 0). Print the following on separate lines: The average of the positive values The product of the negative values The total number of values entered ● Input: 4.0 -3.7 -2.9 3.5 0 C) Write a program that will prompt the user to enter a sequence of values terminated by 0, (i.e. stop when the user enters a 0). Print the following on separate lines: The average of the positive values The product of the negative values The total number of values entered ● Input: 4.0 -3.7 -2.9 3.5 0
Expert Answer:
Answer rating: 100% (QA)
Python Prompt the user to enter a sequence of values terminated by 0 printEnter a sequence of values terminated by 0 Initialize variables to keep track of the sum of positive values the product of neg... 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 computer network questions
-
Question-2 Solve the assingned one, in the Table-1, of the given problem in the annex-2 by using MATLAB (30P); FG- 1 m-2kg k=800N/m L=0. 6m 2 + 3/3 - m ww 2k www 2m Slender rod of mass m
-
The outer and inner wheels are spun. Assuming that the wheels are independent and the outcomes are equally likely, determine the probability of obtaining. Numbers greater than 5 on both wheels. 3 2 4...
-
In Exercises delete part of the domain so that the function that remains is one-to-one. Find the inverse function of the remaining function and give the domain of the inverse function. f(x) = (x - 3)...
-
Ethanol reacts with sodium and forms two products which are Options: 1) Sodium ethanoate and hydrogen 2) Sodium ethanoate and oxygen 3) Sodium ethoxide and hydrogen 4) Sodium ethoxide and oxygen
-
Determine the force in members CD and DF of the truss shown. -3 m 10 kN 110 kN [10 kN [10 kN o m
-
Economic theory would suggest that the profitability of an industry would be a. Directly related to the number of firms competing in the industry. b. Inversely related to the number of firms...
-
The comparative financial statements for CyberOptic Corporation are in the Working Papers. The financial statements have been completed up to the trend analysis section. The following information is...
-
At September 30, 2012, the accounts of Park Terrace Medical Center (PTMC) include the following: Accounts receivable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $ 141,000...
-
P10-2 (Algo) Preparing the Shareholders' Equity Section after Selected Transactions LO10-3, 10-7, 10-8 10 points 03:44:24 _("eBook ") Print Pring sqrt0 References References Revenues $405,000...
-
For the month of December 2014, Ranger Corporations records show the following information: Cash received on accounts receivable $35,000 Cash sales 30,000 Accounts receivable, December 1, 2014 80,000...
-
A man is planning to retire in 15 years. Money can be deposited at 4% interest compounded quarterly, and it is also estimated that the future general inflation rate will be 6% compounded annually....
-
Select an organization, e.g., a corporation, company, firm or association (ideally, an organization which you have some interest in joining) for in-depth analysis of their sales and customer...
-
19. According to AU-C 300, paragraph 08 (d), auditors should consider the results of preliminary audit procedures in establishing the overall audit strategy. One of the preliminary audit procedures...
-
Elsa is bidding along with 20 other people on a rare painting in a first-price, sealed bid auction. Elsa believes that the bidders have independent valuations of the painting, evenly dispersed, that...
-
Dove - Take care. Be safe. It all started with a beauty soap bar that grew into a global brand with an extensive product range. The beauty bar Dove was launched in 1957. With its 3/4 moisturising...
-
Anderson Corp. has the following information: Beginning Ending Inventory Inventory (1/1) (12/31) Direct Materials Inventory $20,000 $30,000 Work in Process Inventory $16,000 $18,000 Finished Goods...
-
Consider the following: does organization structure precede strategy, or vice versa? That is, which comes first, the organization's design or the strategy that the organization uses? Discuss....
-
Using Gauss-Jordan elimination, invert this matrix ONLY 0 0 0 0 1
-
Bea Jones (age 32) moved from Texas to Florida in December 2011. She lives at 654 Ocean Way, Gulfport, FL 33707. Bea's Social Security number is 466-78-7359 and she is single. Her earnings and income...
-
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...
-
Van makes an investment in a partnership in 2012. Van's capital contributions to the partnership consisted of $30,000 cash and a building with an adjusted basis of$70,000, subject to a nonrecourse...
-
Describe the nature and usefulness of a cash budget.
-
Earnings per share and book value per share are statistics that relate to common stock. When both preferred and common stock are outstanding, explain the computation involved in determining the...
-
Explain the significance of the following dates relating to cash dividends: date of declaration, date of record, date of payment, ex-dividend date.
Study smarter with the SolutionInn App