This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "welcome to Madlibs!" | |
puts "please enter a noun:" | |
noun=gets.chomp | |
puts "please enter a verb:" | |
verb=gets.chomp | |
puts "please enter an adjective:" | |
adjective=gets.chomp | |
puts "here's your story:" | |
puts "one day,there was a " + noun + " that did not " + verb + " at all " + adjective + " now he sits on his | |
head.The end " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a=1 | |
b=2 | |
c=a+b | |
d=c+a+b | |
puts d | |
hello="goodnight" | |
world=" moon" | |
puts hello+world | |
hello="cat" | |
world="fish" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "YUrI TOMoko".downcase | |
puts "spaceship".reverse | |
puts "racecar".reverse | |
puts "1776".reverse | |
puts 12 * "4".to_i | |
puts 3.to_s + "times a day" |