Skip to content

Instantly share code, notes, and snippets.

@EtherTyper
Last active February 10, 2016 18:42
Show Gist options
  • Select an option

  • Save EtherTyper/96be9e9a4f7951a62aba to your computer and use it in GitHub Desktop.

Select an option

Save EtherTyper/96be9e9a4f7951a62aba to your computer and use it in GitHub Desktop.
Some codecademy thing I was doing...
print "What's your first name?"
first_name = gets.chomp
first_name.capitalize!
print "What's your last name?"
last_name = gets.chomp
last_name.capitalize!
print "What's your city name?"
city = gets.chomp
city.capitalize!
print "What's your State code?"
state = gets.chomp
state.upcase!
puts "Hello, #{first_name} #{last_name} from #{city}, #{state}!"
print "Thtring variable input:"
user_input=gets.chomp
user_input.downcase!
if user_input.include? "s"
user_input.gsub!(/s/, "th")
puts "I think it'th pronounthed #{user_input}!"
else
puts "The inputh lookth normal."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment