Challenge
No
Write a program asking the user what size dog they want: small, medium, or large. Here's some I/O:
- What size dog do you want (small, medium, large)? tiny
- What size dog do you want (small, medium, large)? enormous!
- What size dog do you want (small, medium, large)? SMall
- OK, let's get you a small dog.
The program keeps asking until the user types a valid value. Let them use whatever case they want, and add extra spaces at the beginning and end.
Note that in the last case, the user types SMall
, but the output says small
. Your program should do that.
Upload a zip of your project folder. The usual coding standards apply.
If you were logged in as a student, you could submit a solution to this exercise.
Where referenced