Last active
February 10, 2016 18:42
-
-
Save EtherTyper/96be9e9a4f7951a62aba to your computer and use it in GitHub Desktop.
Some codecademy thing I was doing...
This file contains hidden or 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
| 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}!" |
This file contains hidden or 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
| 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