-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmadlib.rb
More file actions
52 lines (42 loc) · 1.17 KB
/
madlib.rb
File metadata and controls
52 lines (42 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# creating a Madlib
# use "here comes the sun" from Beatles
# ask for a noun
puts "Please type a noun."
noun = gets
noun = noun.chomp
# ask for a adjective
puts "Please type an adjective."
adjective = gets.chomp
# ask for another adjective
puts "Please type one more adjective."
adjective_1 = gets.chomp
# ask for a name
puts "What is your name?"
name = gets.chomp
# ask for a number
puts "Choose one number."
number = gets.chomp
# ask for a place
puts "Write a name of place."
place = gets.chomp
# ask for a season
puts "Pick a season."
season = gets.chomp
# ask for a temperature
puts "How is the temperature now?"
temperature = gets.chomp
# ask for a length
puts "How long is your hair?"
length = gets.chomp
# ask for a word for feeling
puts "How is your feeling?"
feeling = gets.chomp
# run Madlib with answers
puts "\n"
puts "Here comes the " + noun + " (doo doo doo)"
puts "Here comes the " + noun + ", and I say"
puts "It's all " + adjective
puts "\n"
puts "Little " + name.capitalize + ", it's been a " + length + " " + temperature + " " + feeling + " " + season
puts "Little " + name.capitalize + ", it feels like #{number} years since it's been in " + place.upcase
# pat my shoulder