-
Notifications
You must be signed in to change notification settings - Fork 0
Recipe Book
This is my dev log for the Recipe Book I'm building in Python. I'm using it to practice OOP and learn how classes and objects can be used to organize recipes and their ingredients.
The Recipe Book is a Python project that stores information about different recipes.
The project uses classes to organize recipe information and methods to display and work with the recipes.
Some of the information the system can work with includes:
recipe_nameingredientsingredients_amountinstructionsservings
I used a class to represent a recipe.
Each recipe can have its own information stored in attributes.
For example, different recipes can have different:
- Names
- Ingredients
- Instructions
- Serving amounts
This helped me understand how objects can store their own data while using the same class structure.
The program asks the user for information about a recipe and stores it in the Recipe object.
The user can enter the number of ingredients and then enter each ingredient individually.
The ingredients are stored in a list so that a recipe can have multiple ingredients.
This helped me practice using lists inside objects and using loops to collect multiple pieces of information.
Some of the Python and OOP concepts I practiced in this project include:
ClassesObjects__init__()- Instance attributes
- Methods
- Lists
- Loops
- User input
self
This project helped me understand how a class can be used to organize multiple pieces of related information into one object.
Some features I could add to the project later:
- Multiple recipes
- Search for recipes
- Add and remove recipes
- Recipe categories
- Favorite recipes
- Ingredient search
- Recipe ratings
- Cooking time
- Difficulty levels
- Save recipes using
JSON - Edit existing recipes
- A recipe menu
I'm going to keep improving the project as I learn more Python and OOP.
Pet Simulator Game