Learning Python – Plans for a meal picker

I have some basic experience with Python — which is to say I’m a beginner. I want to become more fluent in it. So, I plan to write a toy script using Python to help me decide what to eat for breakfast, lunch, and dinner.

I want to start it off as simple as possible. I want to model it after a lunchtime restaurant picker I wrote (in Perl) when I was working at Amazon. I manually pre-categorized a list of restaurants, placing each one in tier-1, tier-2, or tier-3. The script would then randomly pick one restaurant from each tier, and then choose one out of those 3 using a weighted random number.

Some simple improvements will come in the next iteration. I plan to perhapsĀ incorporate what’s in my fridge and pantry. I’m not sure how to model that data and store it, though. It needs to be human-readable, so I’m thinking a text file. That’s how I stored my list of restaurants and their tiers. For my new script, I could write a frontend tool to manage this data, but that might be over-engineering this simple script.

Anyway, the purpose is just to get familiar with Python, so it doesn’t need to get too complex.

Advertisements