Skip to content

Instantly share code, notes, and snippets.

@BandanaKM
Last active December 24, 2015 09:29
Show Gist options
  • Save BandanaKM/6777972 to your computer and use it in GitHub Desktop.
Save BandanaKM/6777972 to your computer and use it in GitHub Desktop.
Creating Hashes
movies_hash = {
:horror => ['The Shining', 'Nightmare on Elm Street', 'People Under the stairs']
:comedy => ['Waterboy', 'Zoolander', 'Napolean Dynamite']
:romance => ['Titanic', 'Casablance', 'Pretty Woman'] }
recipes_hash = {
:dal => ['ginger', 'garlic', 'onions', 'mung beans', 'water', 'green pepper', 'salt', 'olive oil', 'garam masala', 'tumeric']
:basmati_rice => ['basmati_rice', 'olive oil', 'peas', 'cumin', 'salt']
:raita => ['lowfat plain yogurt', 'red pepper', 'cumin', 'salt', 'shredded cucumber']
}
user_profile = {
:mickey => [ 'user profile', [favorite_colors = [green, blue, purple]], [essays = ['essay_1', 'essay_2', 'essay_3']]]
:mini => [ 'user profile', [favorite_colors = [black, white, grey]], [essays = ['essay_1', 'essay_2', 'essay_3']]]
:daffy => ['user profile', [favorite_colors = [red, orange, yellow]], [essays = ['essay_1', 'essay_2', 'essay_3']]]
}
@BandanaKM
Copy link
Author

Creating hashes homework

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment