Created
June 20, 2019 07:57
-
-
Save hawz/91d9018e50c7a31d664192fce76833ed to your computer and use it in GitHub Desktop.
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
# Analyzer.rb - Getting input from user | |
p "What is your first name?" | |
first_name = gets.chomp | |
puts "What is your last name?" | |
last_name = gets.chomp | |
# String Interpolation | |
full_name = "#{first_name} #{last_name}" | |
# Output | |
p "Your full name is #{full_name}" | |
p "Your full name reversed is #{full_name.reverse}" | |
p "Your full name has #{first_name.length + last_name.length} characters in it" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment