Title:
AI Coding Mentor Web Application
As a Field work for Course
ARTIFICIAL INTELLIGENCE ESSENTIALS (INT428)
By
Submitted To Indu Bala
Ma’am Lovely Professional
University Jalandhar,
Punjab, India.
Received by:
Name of the faculty: Indu Bala
Ma’am UID: 31742
Delivered by:
Name of the student: Putta Meher
Prakash Reg. No.: 12312840
Section: K23GX, Roll No: 59
Name of the student: Diya
Upreti Reg. No.: 12310667
Section: K23GX, Roll No: 60
Name of the student: Priyanka
Bisht Reg. No.: 12310565
Section: K23GX, Roll No: 44
AI CODING MENTOR
AI Coding Mentor Web Application:
• Technologies Used:
PYTHON
Render
FLASK-CORS
HTML
CSS
JAVASCRIPT
OpenAI GPT-3.5 API
• Structure Overview:
Index.html
Style.css
Script.js
App.py
Render.yaml
Requirements.txt
• HTML Components:
<!DOCTYPE html>
<head>
<body>:
1.) Navbar
2.) Chatbot interface
3.) Expertise level buttons
4.) Language selector
5.) Code explanation box
6.) Output and PDF download
7.) Quiz section
<script>
Core Features & Functionalities:
Chatbot Interface:
o User can ask programming-related questions.
o AI mentor provides contextual, beginner to advanced-level replies.
Expertise Selection:
o Buttons to select user's expertise level (Beginner, Intermediate, Advanced).
o Influences explanation simplicity or complexity.
Language Selector:
o Choose from Python, JavaScript, or Java.
Code Explanation:
o Code input from user.
o AI explains the code based on selected language and expertise.
Quiz Practice Section:
o AI generates language-specific quiz questions.
o User selects answers and submits to see results.
Dark Mode Toggle:
o Enables light/dark mode switch for UI.
PDF Download:
o Download AI explanation as a PDF using jsPDF
Backend Overview (Flask API):
Uses OpenAI GPT-3.5 to explain code.
/ endpoint handles POST requests.
Accepts code, language, and expertise.
Returns AI-generated explanation.
Error handling included.
OpenAI Integration:
Prompt: "Explain the following [language] code in simple terms for a [expertise]
developer..."
Model: GPT-3.5-turbo
Parameters: max_tokens=1000, temperature=0.3
YAML Deployment (render.yaml):
services:
- type: web
name: ai-coding-mentor
env: python
buildCommand: "pip install -r requirements.txt"
startCommand: "python app.py"
envVars:
- key: OPENAI_API_KEY
value: your_actual_api_key_here
Sample Use Cases:
The beginner asks: "What does this Python loop do?"
Intermediate asks: "Explain this JavaScript closure."
Advanced asks: "Break down this Java multithreading code."
Quiz for Python basics
Download explanations for future reference
GITHUB LINK:
Frontend: https://github.com/Puttameher/Ai-coding-mentor
Backend: https://github.com/Puttameher/ai-backend
Screenshots of the Project:
HTML:
2.) CSS
3.) Java script:
4.) Python (app.py)
5.) Render.yaml:
6.) Requirements.txt:
INTERFACE
Conclusion:
AI Coding Mentor is an intuitive and accessible platform designed to help
users of all levels understand and practice programming through interactive
chat and quiz modules. With dynamic features and GPT-powered
explanations, it fosters real-time learning and boosts coding confidence