๐Ÿค‘ Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! ๐Ÿš€ New videos dropping every weekโ€”start learning today!

๐ŸŒŸ Dreaming of a bright future? ๐ŸŽ“ Ask about the Treehouse Scholarship program! ๐Ÿš€

โœจ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Community Projects
    • Live Sessions
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Community Projects Live Sessions Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • Ishan Sharma
    Ishan Sharma
    2,480 Points

    what is wrong with my code

    Posted June 8, 2019 7:14am by Ishan Sharma
    Ishan Sharma
    2,480 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Richard Wentford
    Richard Wentford
    19,730 Points

    Modifying method to return a hash

    Posted July 14, 2018 12:26pm by Richard Wentford
    Richard Wentford
    19,730 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Simon Goldman
    Simon Goldman
    1,028 Points

    shopping list

    Posted December 8, 2016 10:53pm by Simon Goldman
    Simon Goldman
    1,028 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Yuichi Narisawa
    Yuichi Narisawa
    19,548 Points

    How can I fix this code?

    Posted October 26, 2016 4:54pm by Yuichi Narisawa
    Yuichi Narisawa
    19,548 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Marguerite Holden
    Marguerite Holden
    6,075 Points

    How do I create a hash with the keys and values here?

    Posted October 24, 2016 9:33pm by Marguerite Holden
    Marguerite Holden
    6,075 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Brian Patterson
    Brian Patterson
    19,588 Points

    So why is this giving me an error?

    Posted April 28, 2016 8:29pm by Brian Patterson
    Brian Patterson
    19,588 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    2 Answers

  • Alexandre Gomes
    Alexandre Gomes
    4,775 Points

    The challenge asks me to modify the method to return a hash with this pair:

    Posted February 7, 2016 1:39pm by Alexandre Gomes
    Alexandre Gomes
    4,775 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    0 Answers

  • OฤŸulcan Girginc
    OฤŸulcan Girginc
    24,848 Points

    Modify the "create_shopping_list" method to return a hash with the following keys and values:

    Posted January 24, 2016 10:08pm by OฤŸulcan Girginc
    OฤŸulcan Girginc
    24,848 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    2 Answers

  • Cody Mumford
    Cody Mumford
    11,531 Points

    Modify the "create_shopping_list" method to return a hash with the following keys and values:

    Posted January 9, 2016 7:42pm by Cody Mumford
    Cody Mumford
    11,531 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    3 Answers

  • Alphonse Cuccurullo
    Alphonse Cuccurullo
    2,513 Points

    Modify the "create_shopping_list" method to return a hash with the following keys and values:

    Posted December 20, 2015 6:00am by Alphonse Cuccurullo
    Alphonse Cuccurullo
    2,513 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Niki Torres
    Niki Torres
    1,026 Points

    Am I overthinking this challenge with this code?

    Posted September 25, 2015 3:29pm by Niki Torres
    Niki Torres
    1,026 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Daniel Dalrymple
    Daniel Dalrymple
    5,817 Points

    Making a Hash with an Empty Array

    Posted September 5, 2015 3:46am by Daniel Dalrymple
    Daniel Dalrymple
    5,817 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Daniel Wise
    Daniel Wise
    9,119 Points

    What is wrong with this code? It seem right to me.

    Posted June 16, 2015 5:44am by Daniel Wise
    Daniel Wise
    9,119 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • nithish kumar murcherla
    PLUS
    nithish kumar murcherla
    Courses Plus Student 1,023 Points

    unable to understand what i am doing wrong

    Posted April 17, 2015 2:56pm by nithish kumar murcherla
    nithish kumar murcherla
    Courses Plus Student 1,023 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    2 Answers

  • Caleb Kleveter
    MOD
    Caleb Kleveter
    Treehouse Moderator 37,862 Points

    Method returns with hashes and arrays.

    Posted March 18, 2015 12:16am by Caleb Kleveter
    Caleb Kleveter
    Treehouse Moderator 37,862 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    2 Answers

  • Brant Faulkner
    Brant Faulkner
    7,921 Points

    [solved] Build a Grocery List Program challenge.

    Posted January 26, 2015 8:30pm by Brant Faulkner
    Brant Faulkner
    7,921 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.