Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 110 additions & 72 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,128 +1,166 @@

# 🐍 Python Learning Assistant

<div align="center">

[![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://python-learning-assistant.streamlit.app/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python](https://img.shields.io/badge/Python-3.10%2B-3776AB?logo=python&logoColor=white)](https://python.org)
[![Gemini API](https://img.shields.io/badge/Powered%20by-Gemini%20API-4285F4?logo=google&logoColor=white)](https://aistudio.google.com)
[![PRs Welcome](https://img.shields.io/badge/PRs-Welcome-brightgreen.svg)](https://github.com/RobinaMirbahar/Python-Learning-Assistant/pulls)

**An interactive AI-powered Python tutor — built for all skill levels.**
Adaptive explanations. Live code examples. Instant feedback. Powered by Google Gemini.

An interactive AI tutor powered by Google's Gemini API for learning Python at all skill levels.
[🌐 Live Demo](https://python-learning-assistant.streamlit.app/) · [🐛 Report Bug](https://github.com/RobinaMirbahar/Python-Learning-Assistant/issues) · [✨ Request Feature](https://github.com/RobinaMirbahar/Python-Learning-Assistant/issues)

![App Screenshot](https://github.com/RobinaMirbahar/Python-Learning-Assistant/blob/main/Images/PLA.png?raw=true)

## 📂 Project Structure
</div>

```
PYTHON-LEARNING-ASSISTANT/
├── .devcontainer/ # VSCode dev container configuration
├── .github/ # GitHub workflows and actions
├── venv/ # Python virtual environment
├── .env # Environment variables
├── .gitignore # Git ignore rules
├── LICENSE # MIT License file
├── python-assistant.py # Main Streamlit application
├── README.md # This documentation file
└── requirements.txt # Python dependencies
```
---

## ✨ Features

| Feature | Description |
|---|---|
| 🎯 **Adaptive Learning** | Tailored explanations for beginner, intermediate, and advanced learners |
| 💻 **Interactive Examples** | Run code snippets directly inside the app |
| 📚 **50+ Question Bank** | Pre-loaded with curated Python questions across all skill levels |
| ⚡ **Real-time Feedback** | Instant AI-driven explanations and corrections |
| 🗂️ **Session History** | Progress tracking that persists throughout your learning session |

---

## 🚀 Quick Start

### Prerequisites
- Python 3.10+
- Gemini API key ([get one here](https://aistudio.google.com/app/apikey))

- Python **3.10+**
- A free [Gemini API key](https://aistudio.google.com/app/apikey)

### Installation

```bash
# Clone the repository
# 1. Clone the repository
git clone https://github.com/yourusername/python-learning-assistant.git
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The repository URL in the installation instructions uses a placeholder yourusername. It is recommended to use the actual repository URL (RobinaMirbahar/Python-Learning-Assistant) to make the 'Quick Start' more convenient for users.

Suggested change
git clone https://github.com/yourusername/python-learning-assistant.git
git clone https://github.com/RobinaMirbahar/Python-Learning-Assistant.git

cd python-learning-assistant

# Create and activate virtual environment
# 2. Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
.\venv\Scripts\activate # Windows
source venv/bin/activate # macOS / Linux
.\venv\Scripts\activate # Windows

# Install dependencies
# 3. Install dependencies
pip install -r requirements.txt

# Configure environment
# 4. Add your API key
echo "GEMINI_API_KEY=your_api_key_here" > .env
```

### Running the App
```bash
# 5. Launch the app
streamlit run python-assistant.py
```

## 🌐 Live Demo
Access the live application:
[https://python-learning-assistant.streamlit.app/](https://python-learning-assistant.streamlit.app/)
Then open [http://localhost:8501](http://localhost:8501) in your browser. 🎉

---

## 📂 Project Structure

```
PYTHON-LEARNING-ASSISTANT/
├── .devcontainer/ # VSCode dev container configuration
├── .github/ # GitHub Actions workflows
├── venv/ # Python virtual environment (gitignored)
├── .env # Environment variables (gitignored)
├── .gitignore
├── LICENSE
├── python-assistant.py # Main Streamlit application
├── README.md
└── requirements.txt # Python dependencies
```

## 💡 Features
- **Adaptive Learning**: Tailored explanations for beginners, intermediate, and advanced learners
- **Interactive Examples**: Run code snippets directly in the app
- **Comprehensive Question Bank**: Pre-loaded with 50+ Python questions
- **Real-time Feedback**: Get instant explanations and corrections
- **Progress Tracking**: Session history maintains your learning journey
---

## 📚 Sample Questions
### Beginner

<details>
<summary><strong>🟢 Beginner</strong></summary>

- "Explain variables and data types in Python"
- "How do if-else statements work?"
- "What are lists and how to use them?"
- "What are lists and how do I use them?"

</details>

<details>
<summary><strong>🟡 Intermediate</strong></summary>

### Intermediate
- "Explain OOP concepts with a class example"
- "How to handle file I/O operations?"
- "What are decorators and practical uses?"
- "How do I handle file I/O operations?"
- "What are decorators and when should I use them?"

</details>

<details>
<summary><strong>🔴 Advanced</strong></summary>

### Advanced
- "Explain metaclasses with use cases"
- "How to optimize Python code performance?"
- "Explain metaclasses with real-world use cases"
- "How can I optimize Python code performance?"
- "Implement a custom context manager"

</details>

---

## 🛠️ Development
### Using Dev Container
1. Open in VSCode
2. Reopen in Container (F1 > "Remote-Containers: Reopen in Container")
3. The environment will automatically configure

### Dependencies
Listed in `requirements.txt`:
### Using the Dev Container (VSCode)

1. Open the project folder in VSCode
2. Press `F1` → select **"Remote-Containers: Reopen in Container"**
3. The environment configures automatically — no manual setup needed

### Dependencies (`requirements.txt`)

```
streamlit>=1.32.0
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Streamlit version specified in the README (>=1.32.0) is inconsistent with the version required in requirements.txt (>=1.33.0). These should be synchronized to ensure a consistent environment for all users.

Suggested change
streamlit>=1.32.0
streamlit>=1.33.0

google-generativeai>=0.3.0
python-dotenv>=1.0.0
```

---

## 🤝 Contributing
Pull requests are welcome! For major changes, please open an issue first.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/your-feature`)
3. Commit your changes (`git commit -m 'Add some feature'`)
4. Push to the branch (`git push origin feature/your-feature`)
5. Open a pull request
Contributions are welcome and appreciated! Here's how to get started:

1. **Fork** this repository
2. **Create** a feature branch: `git checkout -b feature/your-feature-name`
3. **Commit** your changes: `git commit -m 'feat: add your feature'`
4. **Push** to your branch: `git push origin feature/your-feature-name`
5. **Open** a Pull Request

> For major changes, please [open an issue](https://github.com/RobinaMirbahar/Python-Learning-Assistant/issues) first to discuss what you'd like to change.

---

## 📜 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Distributed under the **MIT License**. See [`LICENSE`](LICENSE) for details.

---

## 🙏 About the Author

## 🙏 Credits
✨ Created and maintained by Robina Mirbahar
🏆 Google Cloud Innovator Champion | 👩‍💻 Women Techmakers Ambassador | 🚀 Google Developer Expert
<div align="center">

🔗 **Connect with me:**
**Robina Mirbahar**
🏆 Google Cloud Innovator Champion &nbsp;|&nbsp; 👩‍💻 Women Techmakers Ambassador &nbsp;|&nbsp; 🚀 Google Developer Expert

<p align="left">
<a href="https://www.linkedin.com/in/robinamirbahar/" target="_blank">
<img src="https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white" alt="LinkedIn"/>
</a>
<a href="https://twitter.com/robinamirbahar" target="_blank">
<img src="https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white" alt="Twitter"/>
</a>
<a href="https://github.com/robinamirbahar" target="_blank">
<img src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white" alt="GitHub"/>
</a>

</p>
[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/robinamirbahar/)
[![Twitter](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://twitter.com/robinamirbahar)
[![GitHub](https://img.shields.io/badge/GitHub-181717?style=for-the-badge&logo=github&logoColor=white)](https://github.com/robinamirbahar)

*If you find this project useful, consider giving it a ⭐ — it helps others discover it too!*

</div>
Loading