Question: BlockPy: #38.2) While Input Use a while loop to repeatedly take input from the user and print whatever they type in. When the user enters

BlockPy: #38.2) While Input

Use a while loop to repeatedly take input from the user and print whatever they type in. When the user enters the empty string (""), then your program should stop.

Note that if your program accidentally loops forever, your browser may become unresponsive for up to 15 seconds. Be very careful while writing while loops!

BlockPy: #38.3) Sum for a While

Use a while loop to repeatedly take input from the user and calculate a sum. The user will only be allowed to type in numbers, but remember the input function returns strings (so you will need to convert them with the built-in int function). If the user inputs the value -999, then the program should stop and print out the sum of all the numbers entered.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!