Skip to content

Instantly share code, notes, and snippets.

@elizabrock
Created April 7, 2014 16:38
Show Gist options
  • Save elizabrock/10023772 to your computer and use it in GitHub Desktop.
Save elizabrock/10023772 to your computer and use it in GitHub Desktop.
Cheers Exercise
# From irb:
# my_array = ["foo", "bar", "grille"]
# my_array.each do |item|
# puts item.capitalize
# end
puts "What's your name?"
name = gets.chomp
# puts "Your name is: " + name
name.each_char do |character|
puts "Give me " + character
end

How do we start a new program?

Let’s try it by building:

A small program that takes input and does something with it.

Cheers, Pt. 1

Build on the results of our in-class exploration to output, for example:

Give me an... A
Give me a... B
Give me a... B
Give me a... Y
ABBY’s just GRAND!

When given the input of “Abby”.

Note: the “a” vs. “an”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment