diff --git a/Ingredient-Based Recipe Generator/README.md b/Ingredient-Based Recipe Generator/README.md new file mode 100644 index 0000000..fbf55d3 --- /dev/null +++ b/Ingredient-Based Recipe Generator/README.md @@ -0,0 +1,28 @@ +# Ingredient-Based Recipe Generator + +This Python script suggests recipes based on the starting letter of a user's input. It includes over 20 recipes and allows for flexible searching by both ingredient availability and recipe name. + +## Features + +- **Ingredient-Based Recipe Suggestions**: Enter ingredients, and the script will suggest recipes you can make. +- **Recipe Suggestions by Starting Letter**: Input a letter to get all recipes starting with that letter. +- **Random Recipe Generator**: Get a random recipe for inspiration (coming soon). +- **Category Filter**: Filter recipes by type (e.g., vegetarian, dessert) (coming soon). +- **Favorite Recipes**: Save recipes to favorites for quick access (coming soon). + +## Getting Started + +### Prerequisites + +- **Python 3**: Ensure Python is installed. You can download it [here](https://www.python.org/downloads/). + +### Installation + +1. Clone this repository or download the script. +2. Open a terminal in the project directory. + +### Usage + +1. Run the script using the command: + ```bash + python recipes.py diff --git a/Ingredient-Based Recipe Generator/recipes.py b/Ingredient-Based Recipe Generator/recipes.py new file mode 100644 index 0000000..4a167e0 --- /dev/null +++ b/Ingredient-Based Recipe Generator/recipes.py @@ -0,0 +1,49 @@ +import random + +# Expanded recipe data +recipes = { + "Pasta": ["pasta", "tomato sauce", "cheese", "olive oil", "garlic"], + "Omelette": ["eggs", "milk", "salt", "pepper", "cheese"], + "Salad": ["lettuce", "tomato", "cucumber", "olive oil", "vinegar"], + "Grilled Cheese": ["bread", "butter", "cheese"], + "Smoothie": ["banana", "milk", "honey", "berries"], + "Tacos": ["tortilla", "ground beef", "cheese", "lettuce", "sour cream"], + "Pizza": ["pizza dough", "tomato sauce", "cheese", "pepperoni"], + "Chicken Stir Fry": ["chicken breast", "bell pepper", "soy sauce", "rice", "garlic"], + "Guacamole": ["avocado", "lime", "salt", "tomato", "onion"], + "Pancakes": ["flour", "milk", "egg", "sugar", "baking powder"], + "French Toast": ["bread", "egg", "milk", "cinnamon", "syrup"], + "Baked Salmon": ["salmon", "lemon", "garlic", "olive oil", "salt"], + "Stuffed Peppers": ["bell pepper", "rice", "ground beef", "cheese", "tomato sauce"], + "Fried Rice": ["rice", "egg", "soy sauce", "peas", "carrot"], + "Tomato Soup": ["tomato", "garlic", "onion", "basil", "cream"], + "Mac and Cheese": ["macaroni", "cheese", "milk", "butter", "flour"], + "Garlic Bread": ["bread", "garlic", "butter", "parsley", "cheese"], + "Mashed Potatoes": ["potato", "butter", "milk", "salt", "pepper"], + "Chocolate Cake": ["flour", "cocoa powder", "sugar", "eggs", "butter"], + "Lemonade": ["lemon", "water", "sugar"], + "Fruit Salad": ["apple", "banana", "berries", "orange", "grapes"], + "Chicken Soup": ["chicken", "carrot", "celery", "onion", "broth"], + "Bruschetta": ["bread", "tomato", "basil", "olive oil", "garlic"], + "Beef Stew": ["beef", "potato", "carrot", "celery", "broth"], + "Shrimp Scampi": ["shrimp", "garlic", "butter", "lemon", "pasta"] +} + +# Function to suggest recipes based on starting letter +def suggest_recipes_by_letter(start_letter): + suggestions = [recipe for recipe in recipes if recipe.lower().startswith(start_letter.lower())] + return suggestions + +# Get the starting letter input from the user +start_letter = input("Enter the starting letter for recipe suggestions: ").strip() + +# Get recipe suggestions based on the starting letter +suggested_recipes = suggest_recipes_by_letter(start_letter) + +# Output results +if suggested_recipes: + print(f"Recipes that start with '{start_letter}':") + for recipe in suggested_recipes: + print(f"- {recipe}") +else: + print(f"No recipes found starting with '{start_letter}'.") diff --git a/README.md b/README.md index cb63b7d..df9fba6 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ More information on contributing and the general code of conduct for discussion | Image Watermarker | [Image Watermarker](https://github.com/DhanushNehru/Python-Scripts/tree/master/Image%20Watermarker) | Adds a watermark to an image. | | Image to ASCII | [Image to ASCII](https://github.com/DhanushNehru/Python-Scripts/tree/master/Image%20to%20ASCII) | Converts an image into ASCII art. | | Image to Gif | [Image to Gif](https://github.com/DhanushNehru/Python-Scripts/tree/master/Image%20to%20GIF) | Generate gif from images. | +| Ingredient-Based Recipe Generator | [Ingredient-Based Recipe Generator](https://github.com/DhanushNehru/Python-Scripts/tree/master/Ingredient-Based%20Recipe%20Generator) | Ingredient-Based Recipe Generator | Interactive Dictionary | [Interactive Dictionary](https://github.com/DhanushNehru/Python-Scripts/tree/master/Image%20InteractiveDictionary) | finding out meanings of words | | IP Geolocator | [IP Geolocator](https://github.com/DhanushNehru/Python-Scripts/tree/master/IP%20Geolocator) | Uses an IP address to geolocate a location on Earth. | | Jokes Generator | [Jokes generator](https://github.com/DhanushNehru/Python-Scripts/tree/master/Jokes%20Generator) | Generates jokes. | @@ -118,7 +119,6 @@ More information on contributing and the general code of conduct for discussion | QR Code with logo | [QR code with Logo](https://github.com/DhanushNehru/Python-Scripts/tree/master/QR%20with%20Logo) | QR Code Customization Feature | | Random Color Generator | [Random Color Generator](https://github.com/DhanushNehru/Python-Scripts/tree/master/Random%20Color%20Generator) | A random color generator that will show you the color and values! | | Remove Background | [Remove Background](https://github.com/DhanushNehru/Python-Scripts/tree/master/Remove%20Background) | Removes the background of images. | -| Road-Lane-Detection | [Road-Lane-Detection](https://github.com/NotIncorecc/Python-Scripts/tree/master/Road-Lane-Detection) | Detects the lanes of the road | | Rock Paper Scissor 1 | [Rock Paper Scissor 1](https://github.com/DhanushNehru/Python-Scripts/tree/master/Rock%20Paper%20Scissor%201) | A game of Rock Paper Scissors. | | Rock Paper Scissor 2 | [Rock Paper Scissor 2](https://github.com/DhanushNehru/Python-Scripts/tree/master/Rock%20Paper%20Scissor%202) | A new version game of Rock Paper Scissors. | | Run Then Notify | [Run Then Notify](https://github.com/DhanushNehru/Python-Scripts/tree/master/Run%20Then%20Notify) | Runs a slow command and emails you when it completes execution. | @@ -154,6 +154,8 @@ More information on contributing and the general code of conduct for discussion | Youtube Downloader | [Youtube Downloader](https://github.com/DhanushNehru/Python-Scripts/tree/master/Youtube%20Downloader) | Downloads any video from [YouTube](https://youtube.com) in video or audio format! | | Youtube Playlist Info Scraper | [Youtube Playlist Info Scraper](https://github.com/DhanushNehru/Python-Scripts/tree/master/Youtube%20Playlist%20Info%20Scraper) | This python module retrieve information about a YouTube playlist in json format using playlist link. | + + ## Gitpod Use the cloud-free development environment where you can directly start coding.