Skip to content

Instantly share code, notes, and snippets.

@boddhisattva
Last active August 29, 2015 13:56
Show Gist options
  • Save boddhisattva/9081871 to your computer and use it in GitHub Desktop.
Save boddhisattva/9081871 to your computer and use it in GitHub Desktop.
Taking User input in Ruby
HI..!! enter ur name please: Test User
Hello Test User
print('HI..!! enter ur name please: ')
name = gets()
puts("Hello #{name}")
#this symbol is mainly used for comments.. what role is it playing here..??
# the hash symbol in the puts stmnt above within quotes can be used to print the value of the entity within the quotes
puts("\n")
#<<name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment