Created
February 23, 2017 00:36
-
-
Save rebeccabartels/7a3d6c537d2c8e8f5c3c6b35401096ef to your computer and use it in GitHub Desktop.
Reused code created by rebeccabartels - https://repl.it/FJ6Y/1
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
def emphasize(msg) | |
msg + "!" | |
end | |
puts emphasize("My brain hurts") | |
puts emphasize("But this is pretty cool") | |
puts emphasize("I'll get the hang of it") | |
# custom_greeting method. Input 1: greeting - string. Input 2: a person's name - String example input: "Hi" and "Enrique" | |
def custom_greeting(greeting, name) | |
"#{greeting}, #{name}!" | |
end | |
custom_greeting("Yo", "Gandalf") | |
def adder(x, y, z) | |
x + y + z | |
end | |
puts adder(1, 1, 8) | |
puts adder(2, 3, 7) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment