This repository contains a collection of Python projects developed as part of the CodeAlpha internship program. Each project is a standalone console-based application designed to demonstrate different programming paradigms and problem-solving approaches, including:
- Procedural Programming
- Functional/Modular Programming
- Object-Oriented Programming (OOP)
The goal of this repository is not just functionality, but to explore how different coding styles can be applied to real-world problems.
A simple rule-based chatbot that uses Object-Oriented Programming principles to interact with users via the command line.
- Responds to predefined inputs like "hello", "how are you", and "bye".
- Provides a help message for available commands.
- Runs in a continuous loop until the user types "bye".
- Classes and Objects
- Methods and Encapsulation
- Conditional Logic
- Navigate to the
chatbotdirectory.cd chatbot - Run the Python script.
python chatbot.py
- Interact with the chatbot in your terminal.
A utility script that uses procedural programming approach to extract, sort, and categorize email addresses from a given text file.
- Reads content from a user-specified file.
- Uses regular expressions to find all valid email addresses.
- Removes duplicate entries and sorts the list alphabetically.
- Filters and lists Gmail addresses separately.
- Saves the results to a user-specified output file.
- Loops and Conditionals
- File Handling
- Regular Expressions
- Data Processing
- Navigate to the
email_extractordirectory.cd email_extractor - Run the script.
python email_extractor.py
- When prompted, enter the input file name (e.g.,
dataset.txt). - Enter a name for the output file (e.g.,
emails.txt). The results will be saved there.
A classic command-line implementation of the Hangman word-guessing game using functional and modular programming style.
- Selects a random word from a predefined list.
- Displays the word with blanks for unguessed letters.
- Tracks correctly and incorrectly guessed letters.
- Limits the player to a maximum of 6 wrong guesses.
- Provides a main menu to start a new game or exit.
- Functions and Modularity
- Lists and Strings
- Game Logic Design
- Navigate to the
hangmandirectory.cd hangman - Execute the script.
python hangman.py
- Follow the on-screen instructions to play the game.