Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. def choose
  2. puts "Do you like programming? Yes, no, or maybe please"
  3. choice = gets.chomp
  4. case choice.downcase
  5. when "yes"
  6. puts "That\'s great!"
  7. when "no"
  8. puts "That\'s too bad"
  9. when "maybe"
  10. puts "Glad you\'re giving it a chance!"
  11. else
  12. puts "wrong answer sunshine - yes or no is all we need."
  13. end
  14. end
  15. choose
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement