Created
December 23, 2012 05:35
-
-
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…
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 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