Assignment: Meet "Luna" – Your Friendly Chatbot
Objective:
Create a chatbot named Luna that interacts with the user based on predefined responses using
if-else statements.
Instructions:
1. Write a Python program that introduces Luna as a friendly chatbot.
2. The chatbot should ask for the user's name and greet them.
3. The chatbot should respond based on user input using only if-else statements (not
loops).
4. The chatbot should recognize and respond to the following inputs:
o "How are you?" → "I'm great! Thanks for asking. How about you?"
o "What is your name?" → "My name is Luna! I'm here to chat with
you."
o "Tell me a joke" → "Why don’t skeletons fight each other?
Because they don’t have the guts!"
o "Bye" → "Goodbye! Have a wonderful day!"
o Any other input → "Oops! I didn’t understand that. Can you say
something else?"
CHATBOT LUNA Interaction should be like below :
Luna: Hello! I'm Luna, your friendly chatbot. What's your name?
User: Sam
Luna: Nice to meet you, Sam! How can I assist you today?
User: How are you?
Luna: I'm great! Thanks for asking. How about you?
User: Tell me a joke.
Luna: Why don’t skeletons fight each other? Because they don’t have the guts!
User: Bye
Luna: Goodbye! Have a wonderful day!