Skip to content

singadarsh790-cmyk/CodeAlpha_python_Basic_chatbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Basic Chatbot

A simple Python rule-based chatbot built for CodeAlpha – Python Programming Internship (Task 4).

Author: Adarsh Singh

Goal

Build a simple rule-based chatbot that responds to basic user messages.

How It Works

  • The user types a message in the console.
  • The bot checks the message for certain keywords (like "hello", "how are you", "bye", "joke", "weather", "help").
  • Based on the keyword matched, it replies with a predefined response.
  • If no keyword matches, it gives a fallback response.
  • The conversation ends when the user types "bye" or "goodbye".

Key Concepts Used

  • if-elif conditionals
  • Functions
  • Loops
  • Input/Output

How to Run

  1. Make sure you have Python 3 installed.
  2. Download basic_chatbot.py from this repo.
  3. Open a terminal in that folder and run:
    python basic_chatbot.py
    
  4. Type messages like hello, how are you, tell me a joke, or bye to chat with the bot.

Example Conversation

You: hello
Bot: Hi! How can I help you today?
You: how are you
Bot: I'm fine, thanks! How about you?
You: tell me a joke
Bot: Why do programmers prefer dark mode? Because light attracts bugs!
You: bye
Bot: Goodbye! Have a great day.

Files

  • basic_chatbot.py – main program

Part of the CodeAlpha Python Programming internship – Module 1, Task 4. Created by Adarsh Singh

About

A simple Python rule-based chatbot that responds to greetings, questions, and basic commands like 'hello', 'how are you', and 'bye' — built for the CodeAlpha Python Programming internship.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages