diff --git a/README.md b/README.md index f85f3bd..2e560be 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# C2C Elite 101 Python Chatbot Starter +# Introduction -This chatbot was created by Jorge Luna - update +This is a repository created by *Raina* -This project is a starter project that includes a dev [container (GitHub Codespace)](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers) that is set up for a python -development environment. +## Usage + +Run this command to execute the application: -The project is meant to be a starter for your chatbot project. To use this project do the following: @@ -16,6 +16,3 @@ in the browser or in a local installation of vs code) for more info [go here](ht ![Screenshot](codespace_usage.png) 3. To run the starter program, in a terminal run python main.py, or open the main.py file and click the play button at the top right of the editor -![Screenshot](codespace_run_file.png) - -Example change diff --git a/main.py b/main.py index 44fcc27..354939d 100644 --- a/main.py +++ b/main.py @@ -1,27 +1,60 @@ -""" - Welcome to Elite 101 this program is a starter for your chatbot project. - The starter prompts the user to enter their name and then greets them with a personalized message. - - Functions: - get_user_name(): Prompts the user to enter their name and returns it. - greet_user(name): Prints a greeting message using the provided name. - main(): Main function that orchestrates the user input and greeting process. - - Execution: - When the script is run directly (not imported as a module), it will execute the main() function. -""" +##1. Create a simple chatbot for a retail store that can answer customers' frequently asked questions about store hours, location, available products, and prices. def get_user_name(): return input("Please enter your name: ") def greet_user(name): - print(f"Hello, {name}, how are you?") + print(f"\nHello, {name}! I am the rain-retail chatbot. How may I help you today?\n") def main(): + # Start chatbot user_name = get_user_name() greet_user(user_name) + # Menu loop + while True: + print("Please choose from the following options:") + print("1. Ask about store hours") + print("2. Ask for store location") + print("3. Ask about available products") + print("4. Ask about prices") + print("5. Exit the conversation") + + choice = input("Enter the number of your choice: ") + + if choice == "1": + print("Our store hours are Monday-Saturday: 10 AM-9 PM\n") + + elif choice == "2": + print("We are located at 123 Main Street TX.\n") + + elif choice == "3": + print("We currently have laptops, headphones, chargers, mouses, and smartwatches.\n") + + elif choice == "4": + text = input("Please type your question about prices: \n ") + + if "laptop" in text: + print("The laptop costs $750.\n") + elif "headphone" in text: + print("The headphones cost $60.\n") + elif "charger" in text: + print("The phone charger costs $20.\n") + elif "mouse" in text: + print("The wireless mouse costs $25.\n") + elif "watch" in text: + print("The smartwatch costs $150.\n") + else: + print("Please tell me which product you want the price for\n") + + elif choice == "5": + print("Goodbye! Thank you for chatting with rain-retail chatbot.") + break + + else: + print("Please choose 1, 2, 3, 4, or 5.\n") + if __name__ == "__main__": main()