|
1 | | - |
2 | 1 | # 🐍 Python Learning Assistant |
3 | 2 |
|
| 3 | +<div align="center"> |
| 4 | + |
4 | 5 | [](https://python-learning-assistant.streamlit.app/) |
5 | 6 | [](https://opensource.org/licenses/MIT) |
| 7 | +[](https://python.org) |
| 8 | +[](https://aistudio.google.com) |
| 9 | +[](https://github.com/RobinaMirbahar/Python-Learning-Assistant/pulls) |
| 10 | + |
| 11 | +**An interactive AI-powered Python tutor — built for all skill levels.** |
| 12 | +Adaptive explanations. Live code examples. Instant feedback. Powered by Google Gemini. |
6 | 13 |
|
7 | | -An interactive AI tutor powered by Google's Gemini API for learning Python at all skill levels. |
| 14 | +[🌐 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) |
8 | 15 |
|
9 | 16 |  |
10 | 17 |
|
11 | | -## 📂 Project Structure |
| 18 | +</div> |
12 | 19 |
|
13 | | -``` |
14 | | -PYTHON-LEARNING-ASSISTANT/ |
15 | | -├── .devcontainer/ # VSCode dev container configuration |
16 | | -├── .github/ # GitHub workflows and actions |
17 | | -├── venv/ # Python virtual environment |
18 | | -├── .env # Environment variables |
19 | | -├── .gitignore # Git ignore rules |
20 | | -├── LICENSE # MIT License file |
21 | | -├── python-assistant.py # Main Streamlit application |
22 | | -├── README.md # This documentation file |
23 | | -└── requirements.txt # Python dependencies |
24 | | -``` |
| 20 | +--- |
| 21 | + |
| 22 | +## ✨ Features |
| 23 | + |
| 24 | +| Feature | Description | |
| 25 | +|---|---| |
| 26 | +| 🎯 **Adaptive Learning** | Tailored explanations for beginner, intermediate, and advanced learners | |
| 27 | +| 💻 **Interactive Examples** | Run code snippets directly inside the app | |
| 28 | +| 📚 **50+ Question Bank** | Pre-loaded with curated Python questions across all skill levels | |
| 29 | +| ⚡ **Real-time Feedback** | Instant AI-driven explanations and corrections | |
| 30 | +| 🗂️ **Session History** | Progress tracking that persists throughout your learning session | |
| 31 | + |
| 32 | +--- |
25 | 33 |
|
26 | 34 | ## 🚀 Quick Start |
27 | 35 |
|
28 | 36 | ### Prerequisites |
29 | | -- Python 3.10+ |
30 | | -- Gemini API key ([get one here](https://aistudio.google.com/app/apikey)) |
| 37 | + |
| 38 | +- Python **3.10+** |
| 39 | +- A free [Gemini API key](https://aistudio.google.com/app/apikey) |
31 | 40 |
|
32 | 41 | ### Installation |
| 42 | + |
33 | 43 | ```bash |
34 | | -# Clone the repository |
| 44 | +# 1. Clone the repository |
35 | 45 | git clone https://github.com/yourusername/python-learning-assistant.git |
36 | 46 | cd python-learning-assistant |
37 | 47 |
|
38 | | -# Create and activate virtual environment |
| 48 | +# 2. Create and activate a virtual environment |
39 | 49 | python -m venv venv |
40 | | -source venv/bin/activate # Linux/Mac |
41 | | -.\venv\Scripts\activate # Windows |
| 50 | +source venv/bin/activate # macOS / Linux |
| 51 | +.\venv\Scripts\activate # Windows |
42 | 52 |
|
43 | | -# Install dependencies |
| 53 | +# 3. Install dependencies |
44 | 54 | pip install -r requirements.txt |
45 | 55 |
|
46 | | -# Configure environment |
| 56 | +# 4. Add your API key |
47 | 57 | echo "GEMINI_API_KEY=your_api_key_here" > .env |
48 | | -``` |
49 | 58 |
|
50 | | -### Running the App |
51 | | -```bash |
| 59 | +# 5. Launch the app |
52 | 60 | streamlit run python-assistant.py |
53 | 61 | ``` |
54 | 62 |
|
55 | | -## 🌐 Live Demo |
56 | | -Access the live application: |
57 | | -[https://python-learning-assistant.streamlit.app/](https://python-learning-assistant.streamlit.app/) |
| 63 | +Then open [http://localhost:8501](http://localhost:8501) in your browser. 🎉 |
| 64 | + |
| 65 | +--- |
| 66 | + |
| 67 | +## 📂 Project Structure |
| 68 | + |
| 69 | +``` |
| 70 | +PYTHON-LEARNING-ASSISTANT/ |
| 71 | +├── .devcontainer/ # VSCode dev container configuration |
| 72 | +├── .github/ # GitHub Actions workflows |
| 73 | +├── venv/ # Python virtual environment (gitignored) |
| 74 | +├── .env # Environment variables (gitignored) |
| 75 | +├── .gitignore |
| 76 | +├── LICENSE |
| 77 | +├── python-assistant.py # Main Streamlit application |
| 78 | +├── README.md |
| 79 | +└── requirements.txt # Python dependencies |
| 80 | +``` |
58 | 81 |
|
59 | | -## 💡 Features |
60 | | -- **Adaptive Learning**: Tailored explanations for beginners, intermediate, and advanced learners |
61 | | -- **Interactive Examples**: Run code snippets directly in the app |
62 | | -- **Comprehensive Question Bank**: Pre-loaded with 50+ Python questions |
63 | | -- **Real-time Feedback**: Get instant explanations and corrections |
64 | | -- **Progress Tracking**: Session history maintains your learning journey |
| 82 | +--- |
65 | 83 |
|
66 | 84 | ## 📚 Sample Questions |
67 | | -### Beginner |
| 85 | + |
| 86 | +<details> |
| 87 | +<summary><strong>🟢 Beginner</strong></summary> |
| 88 | + |
68 | 89 | - "Explain variables and data types in Python" |
69 | 90 | - "How do if-else statements work?" |
70 | | -- "What are lists and how to use them?" |
| 91 | +- "What are lists and how do I use them?" |
| 92 | + |
| 93 | +</details> |
| 94 | + |
| 95 | +<details> |
| 96 | +<summary><strong>🟡 Intermediate</strong></summary> |
71 | 97 |
|
72 | | -### Intermediate |
73 | 98 | - "Explain OOP concepts with a class example" |
74 | | -- "How to handle file I/O operations?" |
75 | | -- "What are decorators and practical uses?" |
| 99 | +- "How do I handle file I/O operations?" |
| 100 | +- "What are decorators and when should I use them?" |
| 101 | + |
| 102 | +</details> |
| 103 | + |
| 104 | +<details> |
| 105 | +<summary><strong>🔴 Advanced</strong></summary> |
76 | 106 |
|
77 | | -### Advanced |
78 | | -- "Explain metaclasses with use cases" |
79 | | -- "How to optimize Python code performance?" |
| 107 | +- "Explain metaclasses with real-world use cases" |
| 108 | +- "How can I optimize Python code performance?" |
80 | 109 | - "Implement a custom context manager" |
81 | 110 |
|
| 111 | +</details> |
| 112 | + |
| 113 | +--- |
| 114 | + |
82 | 115 | ## 🛠️ Development |
83 | | -### Using Dev Container |
84 | | -1. Open in VSCode |
85 | | -2. Reopen in Container (F1 > "Remote-Containers: Reopen in Container") |
86 | | -3. The environment will automatically configure |
87 | 116 |
|
88 | | -### Dependencies |
89 | | -Listed in `requirements.txt`: |
| 117 | +### Using the Dev Container (VSCode) |
| 118 | + |
| 119 | +1. Open the project folder in VSCode |
| 120 | +2. Press `F1` → select **"Remote-Containers: Reopen in Container"** |
| 121 | +3. The environment configures automatically — no manual setup needed |
| 122 | + |
| 123 | +### Dependencies (`requirements.txt`) |
| 124 | + |
90 | 125 | ``` |
91 | 126 | streamlit>=1.32.0 |
92 | 127 | google-generativeai>=0.3.0 |
93 | 128 | python-dotenv>=1.0.0 |
94 | 129 | ``` |
95 | 130 |
|
| 131 | +--- |
| 132 | + |
96 | 133 | ## 🤝 Contributing |
97 | | -Pull requests are welcome! For major changes, please open an issue first. |
98 | 134 |
|
99 | | -1. Fork the repository |
100 | | -2. Create your feature branch (`git checkout -b feature/your-feature`) |
101 | | -3. Commit your changes (`git commit -m 'Add some feature'`) |
102 | | -4. Push to the branch (`git push origin feature/your-feature`) |
103 | | -5. Open a pull request |
| 135 | +Contributions are welcome and appreciated! Here's how to get started: |
| 136 | + |
| 137 | +1. **Fork** this repository |
| 138 | +2. **Create** a feature branch: `git checkout -b feature/your-feature-name` |
| 139 | +3. **Commit** your changes: `git commit -m 'feat: add your feature'` |
| 140 | +4. **Push** to your branch: `git push origin feature/your-feature-name` |
| 141 | +5. **Open** a Pull Request |
| 142 | + |
| 143 | +> For major changes, please [open an issue](https://github.com/RobinaMirbahar/Python-Learning-Assistant/issues) first to discuss what you'd like to change. |
| 144 | +
|
| 145 | +--- |
104 | 146 |
|
105 | 147 | ## 📜 License |
106 | | -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
107 | 148 |
|
| 149 | +Distributed under the **MIT License**. See [`LICENSE`](LICENSE) for details. |
| 150 | + |
| 151 | +--- |
| 152 | + |
| 153 | +## 🙏 About the Author |
108 | 154 |
|
109 | | -## 🙏 Credits |
110 | | -✨ Created and maintained by Robina Mirbahar |
111 | | -🏆 Google Cloud Innovator Champion | 👩💻 Women Techmakers Ambassador | 🚀 Google Developer Expert |
| 155 | +<div align="center"> |
112 | 156 |
|
113 | | -🔗 **Connect with me:** |
| 157 | +**Robina Mirbahar** |
| 158 | +🏆 Google Cloud Innovator Champion | 👩💻 Women Techmakers Ambassador | 🚀 Google Developer Expert |
114 | 159 |
|
115 | | -<p align="left"> |
116 | | - <a href="https://www.linkedin.com/in/robinamirbahar/" target="_blank"> |
117 | | - <img src="https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white" alt="LinkedIn"/> |
118 | | - </a> |
119 | | - <a href="https://twitter.com/robinamirbahar" target="_blank"> |
120 | | - <img src="https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white" alt="Twitter"/> |
121 | | - </a> |
122 | | - <a href="https://github.com/robinamirbahar" target="_blank"> |
123 | | - <img src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white" alt="GitHub"/> |
124 | | - </a> |
125 | | - |
126 | | -</p> |
| 160 | +[](https://www.linkedin.com/in/robinamirbahar/) |
| 161 | +[](https://twitter.com/robinamirbahar) |
| 162 | +[](https://github.com/robinamirbahar) |
127 | 163 |
|
| 164 | +*If you find this project useful, consider giving it a ⭐ — it helps others discover it too!* |
128 | 165 |
|
| 166 | +</div> |
0 commit comments