Last active
December 24, 2015 02:09
-
-
Save rosiehoyem/6728360 to your computer and use it in GitHub Desktop.
Ruby homework, day 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
1. print phrases with names | |
2. create array with phrases | |
3. assign rooms to speakers | |
4. create another array with speaker welcome | |
=end | |
# "Hello, my name is _____." | |
name = ["Edsger", "Ada", "Charles", "Alan", "Grace", "Linus", "Matz"] | |
rooms = [1, 2, 3, 4, 5, 6, 7] | |
def badges(name) | |
badge_list = [] | |
name.each do |x| | |
badge_list << "Hello, my name is #{x}." | |
end | |
badge_list | |
end | |
def schedule(name) | |
rm = 1 | |
room_assignments = [] | |
name.each do |x| | |
room_assignments << "Hello, #{x}! You will be assigned to room #{rm}!" | |
rm += 1 | |
end | |
room_assignments | |
end | |
badge_lables = badges(name) | |
schedules = schedule(name) | |
def prints-things | |
puts badge_lables | |
puts schedules | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment