Day 2.8 Exercise 11 Asking Questions

Here’s my work.
Here’s the exercise.

Ex11 Code
Ex11 Code
Ex11 Shell
Ex11 Output

Study Drills

1. Go online and find out what Ruby’s gets.chomp does.
Ruby’s gets command takes in an input from the user, while chomp removes the \n after the input.

2. Can you find other ways to use it? Try some of the samples you find.
Using chomp separately.

3. Write another “form” like this to ask some other questions.
Done.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s