forked from Ada-Developers-Academy/jump-start-live
-
Notifications
You must be signed in to change notification settings - Fork 0
/
good_style_madlibs.rb
36 lines (26 loc) · 964 Bytes
/
good_style_madlibs.rb
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
# Good style example
# susan evans
# Last edited 11/25/2016
# Takes input from the user and outputs a madlib story
# welcome message
print "Welcome to my MadLib program. Please enter in some information below.\n\n"
# user inputs
print "name: "
user_name = gets.chomp
print "adjective: "
adj1 = gets.chomp
print "noun: "
noun1 = gets.chomp
print "adjective: "
adj2 = gets.chomp
print "food(plural): "
food = gets.chomp
print "noun(plural): "
noun_plural = gets.chomp
print "verb ending in -ed: "
verb = gets.chomp
print "noun: "
noun2 = gets.chomp
# output message
print "\nHERE'S YOUR MADLIB.......\n\n"
puts "Come on over to #{user_name}’s Pizza Parlor where you can enjoy your favorite #{adj1}-dish pizza`s.\nYou can try our famous #{noun1}-lovers pizza,\nor select from our list of #{adj2} toppings,\nincluding delicious #{food}, #{noun_plural}, and many more.\nOur crusts are hand-#{verb} and basted in #{noun2} to make\nthem seem more hand-made."