Last active
August 29, 2015 13:56
-
-
Save boddhisattva/9081871 to your computer and use it in GitHub Desktop.
Taking User input in Ruby
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
HI..!! enter ur name please: Test User | |
Hello Test User |
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
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