Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- answer = ""
- loop do
- puts ("\n"*25) #added the closing parenthesis
- puts "How much do you like Star Wars?\n\n"
- puts "A: I love it so much!"
- puts "B: It's alright"
- puts "C: I don't like it"
- puts "D: I live under a rock and don't know what that is"
- print "?: "
- answer = STDIN.gets
- answer.chop!
- if answer !~ /[abcd]/i
- puts "Invaild answer! Press enter to try again..."
- STDIN.gets
- else
- break
- end
- end
- puts ("\n"*25)
- case answer
- when /A|a/
- puts "That's awesome! I love it, too!"
- when /B|b/ #added the closing slash '/'
- puts "Well maybe you should watch it again."
- when /C|c/
- puts "Everyone is entitled to their own opinion..."
- else
- puts "Stop what you're doing and go watch it now!"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement