Skip to content

Latest commit

 

History

History
166 lines (111 loc) · 5.26 KB

File metadata and controls

166 lines (111 loc) · 5.26 KB

🐍 Python Learning Assistant

Streamlit App License: MIT Python Gemini API PRs Welcome

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

🌐 Live Demo · 🐛 Report Bug · ✨ Request Feature

App Screenshot


✨ 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

Installation

# 1. Clone the repository
git clone https://github.com/yourusername/python-learning-assistant.git
cd python-learning-assistant

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

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

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

# 5. Launch the app
streamlit run python-assistant.py

Then open 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

📚 Sample Questions

🟢 Beginner
  • "Explain variables and data types in Python"
  • "How do if-else statements work?"
  • "What are lists and how do I use them?"
🟡 Intermediate
  • "Explain OOP concepts with a class example"
  • "How do I handle file I/O operations?"
  • "What are decorators and when should I use them?"
🔴 Advanced
  • "Explain metaclasses with real-world use cases"
  • "How can I optimize Python code performance?"
  • "Implement a custom context manager"

🛠️ Development

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
google-generativeai>=0.3.0
python-dotenv>=1.0.0

🤝 Contributing

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 first to discuss what you'd like to change.


📜 License

Distributed under the MIT License. See LICENSE for details.


🙏 About the Author

Robina Mirbahar
🏆 Google Cloud Innovator Champion  |  👩‍💻 Women Techmakers Ambassador  |  🚀 Google Developer Expert

LinkedIn Twitter GitHub

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