100% found this document useful (1 vote)
6 views1 page

Chatbot Luna: Friendly Interaction Guide

The document outlines an assignment to create a chatbot named Luna using Python. Luna is designed to interact with users through predefined responses based on if-else statements, including greetings, jokes, and farewells. The chatbot recognizes specific user inputs and provides appropriate responses, ensuring a friendly interaction.

Uploaded by

aditya.lenovo06
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
6 views1 page

Chatbot Luna: Friendly Interaction Guide

The document outlines an assignment to create a chatbot named Luna using Python. Luna is designed to interact with users through predefined responses based on if-else statements, including greetings, jokes, and farewells. The chatbot recognizes specific user inputs and provides appropriate responses, ensuring a friendly interaction.

Uploaded by

aditya.lenovo06
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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!

You might also like