liliverson45 / Hello_World

My Hello World Ruby Training
0 stars 0 forks source link

What happens if the user enters a blank line twice? #1

Closed anthonycarlos closed 9 years ago

anthonycarlos commented 9 years ago

The program executes linearly from top to botton. Can you find a way to handle multiple blank lines?

liliverson45 commented 9 years ago

Currently I have it the error handling to not accept blanks at all. It will give you the message "I'm sorry, this field cannot be blank." Then repeat the question you were currently on. I also have it set to strip any spaces. For example, if you added 10 blank spaces then typed a name, on the output the spaces will have been stripped and your input would appear.

anthonycarlos commented 9 years ago

John:

You're absolutely right. I actually ran it and saw exactly what you described. Are you ready to move on to something else? Here's a new programming assignment:

"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."

Are you up to it?

Thanks,

-Anthony

On Mar 5, 2015, at 10:13 AM, John Thornton wrote:

Currently I have it the error handling to not accept blanks at all. It will give you the message "I'm sorry, this field cannot be blank." Then repeat the question you were currently on. I also have it set to strip any spaces. For example, if you added 10 blank spaces then typed a name, on the output the spaces will have been stripped and your input would appear.

— Reply to this email directly or view it on GitHub.