Inspiration

I was shopping for groceries and was bored and thought of this.

What it does

The game lets you input a grocery list with the quantity of how much you need for each item. It then gives you a timer to get the item.

How I built it

I opened python and in my programming 1 class we just learned libraries and classes so I decided I could use those to help me make the code. I made the functions I thought I would need and made an item class that has a random time assigned to each item as well as some other values needed in the code. Then I wrote the main function.

Challenges I ran into

I kept forgetting the syntax for dictionaries so that was annoying. I also didn't know how to add a countdown timer to python, so I had to research that before I coded.

Accomplishments that I am proud of

This is on the longer side of code I've written since I am still a beginner, so it is cool to see a higher line count.

What we learned

I had to research and learn how to use the time class in python to make the countdown timer. Specifically time.sleep(), which sleeps the program for however much time you input.

What's next for Grocery Shopping Game

I mean this isn't the most revolutionary code in the world so I will probably just add a way to stop the timer midway through in case you finish early and let that be that.

Built With

Share this project:

Updates