Skip to content

Instantly share code, notes, and snippets.

@rebeccabartels
Created February 23, 2017 00:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rebeccabartels/7a3d6c537d2c8e8f5c3c6b35401096ef to your computer and use it in GitHub Desktop.
Save rebeccabartels/7a3d6c537d2c8e8f5c3c6b35401096ef to your computer and use it in GitHub Desktop.
Reused code created by rebeccabartels - https://repl.it/FJ6Y/1
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