Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Better indentation
- def choose
- puts "Do you like programming? Yes or no please."
- choice = gets.chomp
- case choice.downcase
- when "yes"
- puts "that\'s great!"
- when "no"
- puts "That\'s too bad!"
- when "maybe"
- puts "I have no idea what that means."
- end
- end
- choose
- // Your code so look at the top example and see why its better :)
- def choose
- puts "Do you like programming? Yes or no please."
- choice = gets.chomp
- case choice.downcase
- when "yes"
- puts "that\'s great!"
- when "no"
- puts "That\'s too bad!"
- when "maybe"
- puts "I have no idea what that means."
- end
- end
- choose
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement