✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

  • 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
    • 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
  • 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
    • Showing results for:
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays
    • Close
  • Ishan Sharma
    Ishan Sharma
    2,480 Points

    what is wrong with my code

    Posted on Jun 8, 2019 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 on Jul 14, 2018 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 on Dec 8, 2016 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 on Oct 26, 2016 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 on Oct 24, 2016 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 on Apr 28, 2016 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 on Feb 7, 2016 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 on Jan 24, 2016 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 on Jan 9, 2016 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 on Dec 20, 2015 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 on Sep 25, 2015 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 on Sep 5, 2015 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 on Jun 16, 2015 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 on Apr 17, 2015 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 on Mar 18, 2015 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 on Jan 26, 2015 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.