Fall 2024 - P1
Big Idea 3 | .1 | .2 | .3 | .4 | .5 | .6 | .7 | .8 | .10 |
Homework Hack for Iteration 3.8
Homework hack available for you to try!
Homework Hack: Looping Practice
Create a program that asks the user for a number and keeps asking until they enter a positive number.
Requirements:
- Input Validation: Make sure that the input is actually a number. Display an ‘error’ message if the user inputted something that is NOT a number
- Positive Checker: If the user has entered a number that is positive, print a ‘success!’ message with the entered number
- If the user has entered a number that is not positive like zero or a negative number, print a ‘try again’ message, prompting them to keep inputting numbers till they input a positive number.