Write a program with the while loop which allows user to repeatedly enter a series of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program with the while loop which allows user to repeatedly enter a series of numbers (one number in each loop iteration). For each entered number, its square value is calculated and printed. By the end of each loop iteration, user will be asked whether he/she wants to enter another number: if user enters Yes, loop continues; otherwise, loop terminates. [Run your program in Python IDLE to get rid of syntax errors and verify if the program works correctly as described above. Program that cannot run due to syntax error(s) will receive 0 point.] Enter a number: 3 The square of the entered number is 9 Do you want to continue? answer yes/no yes Enter a number: 5 The square of the entered number is 25 Do you want to continue? answer yes/no yes Enter a number: 10 The square of the entered number is 100 Do you want to continue? answer yes/no no Write a program with the while loop which allows user to repeatedly enter a series of numbers (one number in each loop iteration). For each entered number, its square value is calculated and printed. By the end of each loop iteration, user will be asked whether he/she wants to enter another number: if user enters Yes, loop continues; otherwise, loop terminates. [Run your program in Python IDLE to get rid of syntax errors and verify if the program works correctly as described above. Program that cannot run due to syntax error(s) will receive 0 point.] Enter a number: 3 The square of the entered number is 9 Do you want to continue? answer yes/no yes Enter a number: 5 The square of the entered number is 25 Do you want to continue? answer yes/no yes Enter a number: 10 The square of the entered number is 100 Do you want to continue? answer yes/no no
Expert Answer:
Answer rating: 100% (QA)
Python program that uses a while loop to repeatedly ask for a number and displa... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
On April 1 , Jiro Nozomi created a new travel agency, Adventure Travel. The following transactions occurred during the company s first month. April 2 Nozomi invested $ 4 1 , 0 0 0 cash and computer...
-
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...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
In Fig. P2.72 gate AB is circular. Find the moment of the hydrostatic force on this gate about axis A. Neglect atmospheric pressure.
-
A 10-lb rod of uniform cross section is used to form the shaft shown. Knowing that the shaft rotates with a constant angular velocity of magnitude 12 rad/s, determine (a) The angular momentum HG of...
-
After completing his electrical technology degree program, Jason Whitmer accepted a position as an electricians assistant for a large electrical repair company. After working for three years, Jason...
-
Why does average employee contribution offer a better estimate of the contribution of individuals to an organization than total compensation (wages, incentives, and benefits)?
-
The European Division of Worldwide Reference Corporation produces a pocket dictionary containing popular phrases in six European languages. Annual budget data for the coming year follow. Projected...
-
152. Given these matrices, answer the following questions or compute the following matrices (if they exist). 1 1 4-[91] A = B = 00 10 1 0 [11 1 1 0 C= and D= 0 10 101 a) Calculate Av C. b) Calculate...
-
BUSINESS CASE (100 points) Julia has recently opened a dry fruits wholesale company dedicated to the sale of peanuts, almonds and pistachios. The company's name is "The Nuthouse". THE NUTHOUSE Since...
-
How do you implement a work break structure (WBS) on your final year project? Describe.
-
Your investment of $9,000 that you started six years ago earned 7.3% compounded quarterly for the first 3 years, followed by 8.2% compounded monthly after that. How much interest has your investment...
-
a. What factors should Ling consider in setting performance materiality for the asset accounts? b. Explain why Ling set performance materiality for cash at the lowest amount. c. Explain why Ling set...
-
On its January 1, 2016, balance sheet, Calvin Company reported equipment of $60,000 and accumulated depreciation of $20,000. During 2016, Calvin sold equipment with an original cost of $5,000....
-
A manufacturer has planned his level of operations at 50% of his plant capacity of 30,000 units. His expenses are estimated as follows, at 50% of the plant capacity utilization: The expected selling...
-
A patient with COPD is unable to perform activities of daily living (ADLs) without becoming exhausted. Which nursing diagnosis best describes this alteration in oxygenation as the etiology? Explain
-
The diagram represents a contour map of a hilly island. Copy it into your lab notebook. The outer contour of the figure is at sea level. All points on any one particular contour line are at the same...
-
Suppose that you could invest in the following projects but have only $30,000 to invest. How would you make your decision and which projects would you invest in? Project Cost $ 8,000 11,000 9,000...
-
The compiler performs a matching process to determine which method to call when a method is invoked. Under what circumstances does an attempt to make a match result in a compile-time error?
-
Arrange these byte measurements in order from smallest to largest: terabyte, megabyte, petabyte, gigabyte and kilobyte.
-
Does the async and await mechanism create new threads?
-
Which elements an agile software team must consider to attribute effort to a product?
-
Why is the rounded Fibonacci series used to assign story points instead of the natural numbers?
-
Variants and exception handlers are alternate flows for a use case. In which situations should one or the other be used?
Study smarter with the SolutionInn App