Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kmandreza/4362174 to your computer and use it in GitHub Desktop.
Save kmandreza/4362174 to your computer and use it in GitHub Desktop.
Exercise: Define a method that returns a formatted address Create a method called make_address that accepts parameters for the street, city , state, and zip and returns a single address string. For example if we call the method as follows: make_address("717 California St.", "San Francisco", "CA", "94111") The return value would be "You live at 7…
def make_address(street,city,state,zip)
"You live at #{street} in the beautiful city of #{city}, #{state}. Your zip is #{zip}."
end
make_address("6056 Plumas St.", "Reno", "NV","89519")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment