Write a program which uses a while loop to sum the squares of integers (starting from...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program which uses a while loop to sum the squares of integers (starting from 1) until the total exceeds 200. Print the final total and the last number to be squared and added. Q2. Write a program which finds the factorial of a given number. E.g. 3 factorial, or 3! is equal to 3 x 2 x 1; 5! is equal to 5 x 4 x 3 x 2 x 1, etc.. Your program should only contain a single loop. Q3. Write a program which prompts the user for 10 floating-point numbers and calculates their sum, product and average. Your program should only contain a single loop. Write a program which uses a while loop to sum the squares of integers (starting from 1) until the total exceeds 200. Print the final total and the last number to be squared and added. Q2. Write a program which finds the factorial of a given number. E.g. 3 factorial, or 3! is equal to 3 x 2 x 1; 5! is equal to 5 x 4 x 3 x 2 x 1, etc.. Your program should only contain a single loop. Q3. Write a program which prompts the user for 10 floating-point numbers and calculates their sum, product and average. Your program should only contain a single loop.
Expert Answer:
Answer rating: 100% (QA)
Here are the solutions to your questions python Q1 tot... View the full answer
Related Book For
Intermediate accounting
ISBN: 978-0077647094
7th edition
Authors: J. David Spiceland, James Sepe, Mark Nelson
Posted Date:
Students also viewed these programming questions
-
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...
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
What type of isomers are exhibited by [Fe(en) 3 ]Cl 2 (en = ethane-1,2-diamine)? no isomers are possible. cis and trans isomers fac and mer isomers optical isomers
-
Do you agree the old consumer- motive of getting something attractive for nothing" is replaced in that the pleasure in shopping today is more recognized and catered today, e.g." shop till you drop."?
-
As part of a Type C reorganization, Tulsa Corporation exchanges assets having a $300,000 FMV and a $175,000 adjusted basis for $250,000 of Akron Corporation voting common stock and Akrons assumption...
-
In a certain state lottery, people select eight numbers in advance of a random drawing of six numbers. If someone's selections include the six drawn, they receive a large prize, but this prize is...
-
For fiscal year 2011, Starbucks Corporation (SBUX) had total revenues of $11.70 billion, net income of $1.25 billion, total assets of $7.36 billion, and total shareholders equity of $4.38 billion. a....
-
Let L = Let K = 1 23 456 1 2 1 00 Explain why L has an inverse and find it. 1 2 0 and define J = KL 1 where L is the matrix in 123 the previous question. Find all solutions x of the equation Jx = 0.
-
A point charge q of mass M is located at the centre of a ring having radius R and charge Q. When it is displaced slightly, the point charge accelerates along the x-axis to infinity. Find the ultimate...
-
Midnight Star Enterprises, L.P. (Midnight Star) is a limited partnership, which operates a gaming, on-sale liquor and restaurant business in Deadwood, South Dakota. The owners of Midnight Star...
-
Jessie Romero went to the Scoggin-Dickey Chevrolet-Buick, Inc., dealership in Lubbock, Texas, and sought to purchase a 2006 Silverado pickup from Fred Morales. Romero proposed to purchase the pickup...
-
On December 16, 2005, James M. Eaton, Jr., and Marguerite Eaton [his mother] * * * fi led a complaint against [Bobby Joe] Waldrop alleging, among other things, that Waldrop had fraudulently induced...
-
Schultz was the president and sole shareholder/ owner of Intra-Med [Services, Inc.], a Kentucky corporation that performed medical diagnostic imaging services, such as MRIs and CT scans. GE [General...
-
Grace Tarnavsky and her sons, Manny and Jason, bought a ranch known as the Cowboy Palace in March 2007, and the three verbally agreed to share the business for fi ve years. Grace contributed 50...
-
Jonathan has the following separate casualties during the year: Decrease in Fair Market Value Adjusted Basis Insurance Reimbursement Holding Period Personal furniture $2,000 $3,000 $1,600 3 months...
-
Show that the block upper triangular matrix A in Example 5 is invertible if and only if both A 11 and A 22 are invertible. Data from in Example 5 EXAMPLE 5 A matrix of the form A = [ A11 A12 0 A22 is...
-
At the end of 2012, Majors Furniture Company failed to accrue $61,000 of interest expense that accrued during the last five months of 2012 on bonds payable. The bonds mature in 2026. The discount on...
-
On June 30, 2013, Fly-By-Night Airlines leased a jumbo jet from Boeing Corporation. The terms of the lease require Fly-By-Night to make 20 annual payments of $400,000 on each June 30. Generally...
-
[This is a variation of Exercise 5-3 focusing on journal entries.] Charter Corporation, which began business in 2013, appropriately uses the installment sales method of accounting for its installment...
-
LDDS continued to publicly report increasing profits and sales in the financial statements, which allowed it to acquire more companies with no limit to the growth of its stock price. True/False
-
LDDS suffered from high fixed costs coupled with a lack of technical knowledge and expertise in optimizing the configuration of circuits, which resulted in high line costs. True/False
-
WorldCom overstated its sales by holding its books open at the close of a reporting period. True/False
Study smarter with the SolutionInn App