From e0b0d238ab47429f39853ba3f8afe1bf131a7a51 Mon Sep 17 00:00:00 2001 From: raina404 Date: Tue, 16 Sep 2025 02:35:07 +0000 Subject: [PATCH 1/5] Added practice edit to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 12e5149..35e1edc 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,5 @@ 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) + +This is my practice edit! From 06a0acf14b968594beff56cd9822645e4283f21f Mon Sep 17 00:00:00 2001 From: raina404 Date: Tue, 16 Sep 2025 02:47:59 +0000 Subject: [PATCH 2/5] Updated README with introduction section --- README.md | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 35e1edc..bbbe6fe 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,9 @@ -# 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 -The project is meant to be a starter for your chatbot project. +Run this command to execute the application: -To use this project do the following: - -1. Fork this project -2. From the code section of the repository click the green code button, select Codespaces -tab in the popup and click the + button to create a codespace (you will be able to use this codespace -in the browser or in a local installation of vs code) for more info [go here](https://docs.github.com/en/codespaces/developing-in-a-codespace/opening-an-existing-codespace) -![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) - -This is my practice edit! +`python filename.py` From 17c073f7005e49a1fb57ca1fa12a823a07d1f5fa Mon Sep 17 00:00:00 2001 From: isasmar5060 Date: Thu, 18 Sep 2025 03:20:31 +0000 Subject: [PATCH 3/5] added an extra introduction to the chatbot through the initial greeting --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 723e869..a37664b 100644 --- a/main.py +++ b/main.py @@ -17,7 +17,7 @@ def get_user_name(): return input("Please enter your name: ") def greet_user(name): - print(f"Hello, {name}!") + print(f"Hello, {name}! I am the Chatbot. How may I help you?") def main(): user_name = get_user_name() From 952f4e116af4822030188a731d0fa72179333f99 Mon Sep 17 00:00:00 2001 From: raina404 Date: Fri, 19 Sep 2025 01:08:01 +0000 Subject: [PATCH 4/5] Added beginner code --- main.py | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index a37664b..401e122 100644 --- a/main.py +++ b/main.py @@ -12,16 +12,38 @@ When the script is run directly (not imported as a module), it will execute the main() function. """ - def get_user_name(): return input("Please enter your name: ") def greet_user(name): - print(f"Hello, {name}! I am the Chatbot. How may I help you?") + print(f"Hello, {name}! I am the Chatbot. How may I help you?\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. Placeholder Option 1") + print("2. Placeholder Option 2") + print("3. Placeholder Option 3") + print("4. Exit the conversation") + + choice = input("Enter the number of your choice: ") + + if choice == "1": + print("You chose Option 1 — [placeholder].\n") + elif choice == "2": + print("You chose Option 2 — [placeholder].\n") + elif choice == "3": + print("You chose Option 3 — [placeholder].\n") + elif choice == "4": + print("Goodbye! Thanks for chatting.") + break + else: + print("Please choose 1, 2, 3, or 4.\n") + if __name__ == "__main__": main() From 467d08645ac10aa9b38d0780010552a3979826ea Mon Sep 17 00:00:00 2001 From: raina404 Date: Mon, 10 Nov 2025 23:54:53 +0000 Subject: [PATCH 5/5] chatbot code --- main.py | 57 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/main.py b/main.py index b45209f..354939d 100644 --- a/main.py +++ b/main.py @@ -1,26 +1,12 @@ -""" - 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. +##1. Create a simple chatbot for a retail store that can answer customers' frequently asked questions about store hours, location, available products, and prices. - 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. -""" def get_user_name(): return input("Please enter your name: ") def greet_user(name): - - print(f"Hello, {name}! I am the Chatbot. How may I help you?\n") -======= - print(f"Hello, {name}, how are you?") - >>>>>>> main + print(f"\nHello, {name}! I am the rain-retail chatbot. How may I help you today?\n") def main(): # Start chatbot @@ -30,24 +16,45 @@ def main(): # Menu loop while True: print("Please choose from the following options:") - print("1. Placeholder Option 1") - print("2. Placeholder Option 2") - print("3. Placeholder Option 3") - print("4. Exit the conversation") + 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("You chose Option 1 — [placeholder].\n") + print("Our store hours are Monday-Saturday: 10 AM-9 PM\n") + elif choice == "2": - print("You chose Option 2 — [placeholder].\n") + print("We are located at 123 Main Street TX.\n") + elif choice == "3": - print("You chose Option 3 — [placeholder].\n") + print("We currently have laptops, headphones, chargers, mouses, and smartwatches.\n") + elif choice == "4": - print("Goodbye! Thanks for chatting.") + 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, or 4.\n") + print("Please choose 1, 2, 3, 4, or 5.\n") if __name__ == "__main__": main()