Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level1_106

Share your experience Add your viva experience here
144 Questions
19 Sets
0 Topics
14 Reviews
Tips for this examiner: i used HTML for UI and all it shouldve been Vue , .vue files , even when i implemented inline Vue in the HTML , she said it was wrong , so 0 for me in frontend
and basically giving demo and she liked that backend jobs are working well
this was 1st viva

Student reviews

Atanu MAD1

Shared viva questions from response sheet: Level1_106 Viva MAD1:-; Show ID card; Project Demo

Questions remembered
  1. Level1_106 Viva MAD1:-
  2. Show ID card
  3. Project Demo
  4. Asked to change button color
  5. Asked about Admin Functionalities and work flow
  6. Write code in notepad - write a function to registration of a student
  7. Architecture of the application
  8. jinja2
  9. Done in 20 minutes.
Sheet response MAD1

Just prepare the questions in the sheet

Questions remembered
  1. 1)show id
  2. 2)download the file from the portal ,extrat and run
  3. 3)explain the functionalities of the app
  4. 4)asked to write a code in notepad - search details of a company with name
  5. 5)change the color of a button
  6. 6)difference between render_template and redirect
  7. 7)git collaborators
dreamer MAD1

mam was chill and completed in 20 minutes , prepare the questions in this sheet that is more than enough.

Questions remembered
  1. -show id
  2. -github collaborator and commit history
  3. -project demonstration with all features and funtionalities
  4. -change the button colour
  5. -http methods and what are methods used in flask
  6. -what is MVC and show in your project
  7. -flask route code for the registering the user
Hritik MAD1

Prepare well, questions are in depth, and coding questions and code changes are not easy. Require practice. Proctor was chill though.

Questions remembered
  1. Level1_106 Viva MAD1:-
  2. Show ID card
  3. Project Demo
  4. Asked to change button color
  5. Asked about Admin Functionalities and work flow
  6. Write code in notepad - write a function to search name in a POST request form response
  7. Architecture of the application
  8. Done in 20 minutes.
Harnoor Singh MAD1

Proctor came late by like 15 min but all went well

Questions remembered
  1. Run the app by downloading from portal(no checksum asked for me) show functionality
  2. Change color of button
  3. what is jinja?
  4. Write search toute to find student (might have a few bugs but wrote on notepad and it was like 90 percent correct)
Anonymous MAD1

Shared viva questions from response sheet: Change button color; Write route for searching student by name; type of http methods

Questions remembered
  1. Change button color
  2. Write route for searching student by name
  3. type of http methods
  4. what http methods used in the project?
Rise of Devil MAD1

Was really chill.

Questions remembered
  1. LEVEL 1_106 (MAD 2 LEVEL 1 VIVA)
  2. download project from portal and show ID card
  3. run project
  4. have u implemented RBAC? Show where you have implemented RBAC.
  5. Have you used JWT tokens? Tell me how JWT tokens work.
  6. open notepad and create an endpoint to send all past appointments.
  7. Have you used celery and Redis.
  8. Show me where you have used Redis.
  9. Why do we use Redis? (it is fast)
  10. Show me your admin dashboard and features.
  11. Show me your doctor dashboard and features.
  12. Change colour of a button in doctor dashboard from green to blue.
  13. Show me Doctors' Availability setting feature.
  14. Show to updated availability in patient dashboard.
  15. Book an appointment.
  16. Show email being sent (i had to update the code a bit for this).
  17. Show GitHub repo and collaborator.
Sheet response MAD1

basically keep explaining your thought process and details and tell the proctor everything that you know about the topic they ask

Questions remembered
  1. Level 1 Viva
  2. proctor level1_106
  3. - show student id, github code and collaborator
  4. - download zip file of code
  5. - ⁠unzip and run and explain project. show all functionalities
  6. - ⁠open text editor or blank file
  7. - ⁠write flask code for a simple hello world
  8. - ⁠what port is project running on
  9. - ⁠what is app context and request context
  10. finished in 15 minutes.
  11. tip - i guess if you explain everything and all functionalities work properly, they wont ask much. and be confident.
  12. i had a small mess up where i couldnt remember patient login so i had to register new patient and show patient dashboard in that way, which from my knowledge only showed 85% of the patient functionalities. so make sure you have small details like this remembered.
xyz MAD1

very chill examiner. just be clear and to the point in explanation.

Questions remembered
  1. Level 1 Viva:
  2. Asked me to show ID, Github repo
  3. download code from portal and run
  4. explain all core functionalities in detail
  5. frontend and backend logic of doctor search functionality when logged in as patient (expected to link to MVC)
  6. open notepad and code patient registration flask route
Someone Else MAD1

bhai level 2 ultra pro max vla prep ho tb jana viva mein...they can literally ask anything
baki tumhari kismat rhi ab..is Sheet k bhrose mt rho !!!
GOOD LUCK!!

Questions remembered
  1. LEVEL - 1 VIVA
  2. show your student ID
  3. show GitHub repo collaborator
  4. Download project, unzip and run.
  5. Demonstrate whole Project
  6. No theory question asked
  7. Open your patient routes and delete book_appointment route and rewrite whole in google docs.(this was the longest function of my project :) 121 lines) I was literally unable bcoz I have seen level 1 viva questions from previous students..my bad :(
  8. Then asked me to write register route full function.
  9. In docs make full registration page using only HTML with custom form fields given by proctor. Then viva ended !! and mujhe pta lg chuka th ki mera toh game baj chuka h :)
- MAD1

Shared viva questions from response sheet: 1]Write a Flask code to return Hello world; 2]Jinja functionality; 3]Template inheritance

Questions remembered
  1. 1]Write a Flask code to return Hello world
  2. 2]Jinja functionality
  3. 3]Template inheritance
  4. 4]Default Flask port
  5. 5]Can the port for flask be changed
Sheet response MAD1

This mam is very chill, she asked no complicated stuff. Just be prepared to show what you have implemented and how you did that, that's all.

Questions remembered
  1. Level 1:
  2. Show id card
  3. Download project from portal, no need checksum
  4. Show core functionalities
  5. What framework i used for building app
  6. Summary page, what i used (chart.js) and how i implemented it
  7. Render template vs redirect
  8. Ai llm % usage in project report
  9. Show git hub collaborator
M.R.Hikmathun Nisha MAD1

Shared viva questions from response sheet: Core functionalities

Questions remembered
  1. Core functionalities
Prince MAD1

Be clear with theory. Practice sheet questions over and over especially theory ones. He'll grind you. Be calm and answer to the best of your knowledge.

Questions remembered
  1. L1 questions: Project demonstration and asked to explain the DB tables in 1-2 lines. L2 questions:
  2. MVC & DOM?
  3. How to access element by id in JS?(document.getElementbyID)
  4. Which language is used to manipulate DOM?
  5. What's ORM? Which orm we've used?
  6. How we're actually connecting the DB to flask, which cmnd? (with app.app_context: db.init(app))
  7. Difference between id and class in HTML?
  8. Diff between id and name in HTML?
  9. What's GIT? Centralised or decentralised? What's decentralised?
  10. HTTP v/s HTTPS? Which is more secure and why?
  11. Backref v/s backpopulates
  12. Get v/s Post. Which is more secure?
  13. How we send data to backend? (form action)
  14. Can we send data through GET? How?
  15. How we access id and class in css? (# for id, . for class) Code changes:
  16. Manipulate frontend to only allow username to be 10 letters.
  17. Manipulate backend to store services name in uppercase.

Approved viva sets

  1. 1
    LEVEL 1
    Times asked 6
  2. 2
    demo
    Times asked 12
  3. 3
    in navbar asked to change the profile first then dashboard
    Times asked 2
  1. 1
    Write code in notepad - write a function to registration of a student
    Times asked 1
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

  1. 1
    2)download the file from the portal ,extrat and run
    Times asked 1
    Official solution

    SimpleExaminer portal wala submitted ZIP chahta hai. Local extra changes mat dikhana.

    Suggested flow1) Portal ZIP download
    2) Extract
    3) venv + pip install -r requirements.txt
    4) flask run / python app.py

  2. 2
    3)explain the functionalities of the app
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  3. 3
    4)asked to write a code in notepad - search details of a company with name
    Times asked 1
    Official solution

    SimpleSearch: form/query param → ilike filter → results template.

    Example

    q = request.args.get('q', '').strip()
    lots = Lot.query.filter(Lot.name.ilike(f'%{q}%')).all()
  4. 4
    7)git collaborators
    Times asked 1
    Official solution

    SimpleGitHub repo open karo: commits, collaborators, README. Examiner check karta hai tumne khud kaam kiya.

    Example

    Settings → Collaborators
    Commits: regular messages, last-day dump nahi.

    Viva tipPrivate repo access pehle de do. Main branch submitted ZIP se match honi chahiye.

Advice: Just prepare the questions in the sheet
  1. 1
    -project demonstration with all features and funtionalities
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  2. 2
    -what is MVC and show in your project
    Times asked 1
    Official solution

    SimpleMVC: Model=data (SQLAlchemy), View=Jinja HTML, Controller=Flask routes/business logic.

    Flask loosely MVC follow karta hai — routes controllers, templates views, models.py models.

  3. 3
    -flask route code for the registering the user
    Times asked 1
    Official solution

    SimpleLive Flask coding: chhota route likho, save, browser/curl se test. Syntax error terminal mein padho.

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: mam was chill and completed in 20 minutes , prepare the questions in this sheet that is more than enough.
  1. 1
    Level1_106 Viva MAD1:-
    Times asked 1
    Official solution

    SimpleLevel = viva difficulty band. Level 1 usually demo + basics; higher pe live coding + deeper theory.

    Viva tipJo level assign hai uske hisaab se demo + theory ready rakho.

  2. 2
    Asked to change button color
    Times asked 1
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  3. 3
    Asked about Admin Functionalities and work flow
    Times asked 1
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  4. 4
    Write code in notepad - write a function to search name in a POST request form response
    Times asked 1
    Official solution

    SimpleSearch: form/query param → ilike filter → results template.

    Example

    q = request.args.get('q', '').strip()
    lots = Lot.query.filter(Lot.name.ilike(f'%{q}%')).all()
  5. 5
    Done in 20 minutes.
    Times asked 1
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

Advice: Prepare well, questions are in depth, and coding questions and code changes are not easy. Require practice. Proctor was chill though.
  1. 1
    Run the app by downloading from portal(no checksum asked for me) show functionality
    Times asked 1
    Official solution

    SimpleExaminer portal wala submitted ZIP chahta hai. Local extra changes mat dikhana.

    Suggested flow1) Portal ZIP download
    2) Extract
    3) venv + pip install -r requirements.txt
    4) flask run / python app.py

  2. 2
    what is jinja?
    Times asked 1
    Official solution

    SimpleJinja2 Flask ka template engine — HTML ke andar {{ }} variables, {% %} logic.

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
  3. 3
    Write search toute to find student (might have a few bugs but wrote on notepad and it was like 90 percent correct)
    Times asked 1
    Official solution

    SimpleSearch: form/query param → ilike filter → results template.

    Example

    q = request.args.get('q', '').strip()
    lots = Lot.query.filter(Lot.name.ilike(f'%{q}%')).all()
Advice: Proctor came late by like 15 min but all went well
  1. 1
    Write route for searching student by name
    Times asked 1
    Official solution

    SimpleLive Flask coding: chhota route likho, save, browser/curl se test. Syntax error terminal mein padho.

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  2. 2
    type of http methods
    Times asked 1
    Official solution

    SimpleHTTP verbs REST ke tools. Methods HTTP ke hain, REST unhe convention se use karta hai.

    GET read cacheable. POST create payload. PUT replace. PATCH patch. DELETE remove.

    GET exists bina REST ke bhi — browser address bar.

    HTTP verbs + status REST ki zabaan. GET read, POST create, PUT replace, PATCH partial, DELETE remove. GET typically no body.

    Status: 200 OK, 201 created, 202 accepted (Celery task), 400 bad input, 401 no/bad token, 403 role nahi, 404 missing, 409 conflict (double book), 500 server.

    AJAX/fetch page reload nahi. SPA poori isi pe. Postman se bina Vue ke API prove karo — examiner pasand.

    Example

    GET /api/venues
    POST /api/venues
    PUT /api/venues/1
    DELETE /api/venues/1

    Project example: resources.py methods list. Postman 4-5 calls.

    Viva tipGET typically no body (cacheable). POST/PUT/PATCH haan payload. PUT idempotent, POST nahi.

  3. 3
    what http methods used in the project?
    Times asked 1
    Official solution

    SimpleHTTP verbs REST ke tools. Methods HTTP ke hain, REST unhe convention se use karta hai.

    GET read cacheable. POST create payload. PUT replace. PATCH patch. DELETE remove.

    GET exists bina REST ke bhi — browser address bar.

    HTTP verbs + status REST ki zabaan. GET read, POST create, PUT replace, PATCH partial, DELETE remove. GET typically no body.

    Status: 200 OK, 201 created, 202 accepted (Celery task), 400 bad input, 401 no/bad token, 403 role nahi, 404 missing, 409 conflict (double book), 500 server.

    AJAX/fetch page reload nahi. SPA poori isi pe. Postman se bina Vue ke API prove karo — examiner pasand.

    Example

    GET /api/venues
    POST /api/venues
    PUT /api/venues/1
    DELETE /api/venues/1

    Project example: resources.py methods list. Postman 4-5 calls.

    Viva tipGET typically no body (cacheable). POST/PUT/PATCH haan payload. PUT idempotent, POST nahi.

  1. 1
    Have you used JWT tokens? Tell me how JWT tokens work.
    Times asked 1
    Official solution

    SimpleJWT teen tukde ki signed chitthi: header.payload.signature. Padhi ja sakti hai, badli nahi ja sakti.

    Encoded (Base64) + signed, encrypted nahi (JWE alag). Payload mein password mat daalo — koi jwt.io pe dekh lega.

    Login pe server secret se HMAC (HS256). Har API Authorization: Bearer <token>.
    Expiry exp. Change payload → signature fail → 401.

    Session MAD1 server yaad rakhta. JWT MAD2 client rakhta, server stateless-ish.

    Example

    eyJhbGciOiJIUzI1NiJ9.{"sub":1,"role":"admin"}.signature
    # Authorization: Bearer <token>

    Project example: POST /login → token LS. fetch interceptor header. @jwt_required APIs.

    Viva tipAlgo HS256. Secret env var. jwt.io pe payload dikhao, secret public site pe mat paste.

  2. 2
    open notepad and create an endpoint to send all past appointments.
    Times asked 1
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

  3. 3
    Have you used celery and Redis.
    Times asked 1
    Official solution

    SimpleRedis box hai, Celery us box se kaam uthane wala worker hai — same cheez nahi.

    Redis: store (cache keys) + queue (broker lists).
    Celery: Python library jo tasks define karti hai, .delay() se queue mein daalti hai, worker execute karta hai.

    Dono localhost pe ho sakte hain. Alag Redis DB index use karo. Redis band = cache miss + Celery stuck.

    Example

    Celery: broker_url='redis://localhost:6379/0'
    Cache:  CACHE_REDIS_URL='redis://localhost:6379/1'

    Project example: export_csv.delay(user_id) Flask se. Worker Redis se task uthata hai, CSV+email. Cache alag keys venues.

    Viva tipAgar possible ho to cache db=1, broker db=0 — keys mix nahi hoti.

  4. 4
    Show me where you have used Redis.
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  5. 5
    Why do we use Redis? (it is fast)
    Times asked 1
    Official solution

    SimpleMAD2 course Redis isliye: ek tool mein cache + Celery broker.

    Memcached sirf cache. RabbitMQ sirf queue. Redis dono + easy install.

    Student project size pe SQLite + Redis kaafi. Production mein hosted Redis, persistence optional.

    Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.

    MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.

    Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.

    Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.

    Alag: Redis ≠ Memcached (Celery broker nahi). Redis ≠ localStorage (woh browser). redis-cli ping → PONG viva proof.

    Project example: requirements.txt: redis, Flask-Caching, celery. README: redis-server pehle chalao.

  6. 6
    Show me your admin dashboard and features.
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  7. 7
    Change colour of a button in doctor dashboard from green to blue.
    Times asked 1
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  8. 8
    Show me Doctors' Availability setting feature.
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  9. 9
    Show to updated availability in patient dashboard.
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  10. 10
    Book an appointment.
    Times asked 2
    Official solution

    SimpleSame slot twice 400. Two users race. Approval workflow. Book appointment verify edges.

    Demo fail then success.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: book route checks.

    Project example: book route checks.

  11. 11
    Show email being sent (i had to update the code a bit for this).
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

Advice: Was really chill.
  1. 1
    proctor level1_106
    Times asked 1
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

  2. 2
    - download zip file of code
    Times asked 1
    Official solution

    SimpleExaminer portal wala submitted ZIP chahta hai. Local extra changes mat dikhana.

    Suggested flow1) Portal ZIP download
    2) Extract
    3) venv + pip install -r requirements.txt
    4) flask run / python app.py

  3. 3
    - ⁠unzip and run and explain project. show all functionalities
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  4. 4
    - ⁠open text editor or blank file
    Times asked 1
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  5. 5
    - ⁠write flask code for a simple hello world
    Times asked 1
    Official solution

    SimpleLive Flask coding: chhota route likho, save, browser/curl se test. Syntax error terminal mein padho.

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  6. 6
    - ⁠what port is project running on
    Times asked 1
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  7. 7
    finished in 15 minutes.
    Times asked 1
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

  8. 8
    tip - i guess if you explain everything and all functionalities work properly, they wont ask much. and be confident.
    Times asked 1
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  9. 9
    i had a small mess up where i couldnt remember patient login so i had to register new patient and show patient dashboard in that way, which from my knowledge only showed 85% of the patient functionalities. so make sure you have small details like this remembered.
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

Advice: basically keep explaining your thought process and details and tell the proctor everything that you know about the topic they ask
  1. 1
    explain all core functionalities in detail
    Times asked 1
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  2. 2
    frontend and backend logic of doctor search functionality when logged in as patient (expected to link to MVC)
    Times asked 1
    Official solution

    SimpleSearch: form/query param → ilike filter → results template.

    Example

    q = request.args.get('q', '').strip()
    lots = Lot.query.filter(Lot.name.ilike(f'%{q}%')).all()
  3. 3
    open notepad and code patient registration flask route
    Times asked 1
    Official solution

    SimpleLive Flask coding: chhota route likho, save, browser/curl se test. Syntax error terminal mein padho.

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: very chill examiner. just be clear and to the point in explanation.
  1. 1
    Download project, unzip and run.
    Times asked 1
    Official solution

    SimpleExaminer portal wala submitted ZIP chahta hai. Local extra changes mat dikhana.

    Suggested flow1) Portal ZIP download
    2) Extract
    3) venv + pip install -r requirements.txt
    4) flask run / python app.py

  2. 2
    Demonstrate whole Project
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  3. 3
    No theory question asked
    Times asked 1
    Official solution

    SimpleTheory = concepts: ORM, MVC, auth vs authz, Jinja inheritance, sessions. 1-line def + project example.

  4. 4
    Then asked me to write register route full function.
    Times asked 1
    Official solution

    SimpleLive Flask coding: chhota route likho, save, browser/curl se test. Syntax error terminal mein padho.

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  5. 5
    In docs make full registration page using only HTML with custom form fields given by proctor. Then viva ended !! and mujhe pta lg chuka th ki mera toh game baj chuka h :)
    Times asked 1
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

Advice: bhai level 2 ultra pro max vla prep ho tb jana viva mein...they can literally ask anything baki tumhari kismat rhi ab..is Sheet k bhrose mt rho !!! GOOD LUCK!!
  1. 1
    1]Write a Flask code to return Hello world
    Times asked 1
    Official solution

    SimpleLive Flask coding: chhota route likho, save, browser/curl se test. Syntax error terminal mein padho.

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  2. 2
    2]Jinja functionality
    Times asked 1
    Official solution

    SimpleJinja2 Flask ka template engine — HTML ke andar {{ }} variables, {% %} logic.

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
  1. 1
    Download project from portal, no need checksum
    Times asked 1
    Official solution

    SimpleExaminer portal wala submitted ZIP chahta hai. Local extra changes mat dikhana.

    Suggested flow1) Portal ZIP download
    2) Extract
    3) venv + pip install -r requirements.txt
    4) flask run / python app.py

  2. 2
    Show core functionalities
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  3. 3
    What framework i used for building app
    Times asked 1
    Official solution

    SimpleStack bolo: Python, Flask, Jinja2, SQLAlchemy, SQLite, HTML/CSS/Bootstrap, maybe Chart.js.

  4. 4
    Summary page, what i used (chart.js) and how i implemented it
    Times asked 1
    Official solution

    SimpleAPI summary → Chart.js canvas mounted. Colors array.

    Booking karke update — cache invalidate stats.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: GET /api/admin/summary. new Chart(ctx, ...).

Advice: This mam is very chill, she asked no complicated stuff. Just be prepared to show what you have implemented and how you did that, that's all.
  1. 1
    L1 questions: Project demonstration and asked to explain the DB tables in 1-2 lines. L2 questions:
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  2. 2
    MVC & DOM?
    Times asked 1
    Official solution

    SimpleMVC: Model=data (SQLAlchemy), View=Jinja HTML, Controller=Flask routes/business logic.

    Flask loosely MVC follow karta hai — routes controllers, templates views, models.py models.

  3. 3
    Which language is used to manipulate DOM?
    Times asked 1
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  4. 4
    What's ORM? Which orm we've used?
    Times asked 1
    Official solution

    SimpleORM = Object Relational Mapping. Tables → Python classes. Raw SQL kam likhte ho.

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  5. 5
    How we're actually connecting the DB to flask, which cmnd? (with app.app_context: db.init(app))
    Times asked 1
    Official solution

    SimpleFlask lightweight Python web framework — routes, request/response, templates. MAD1 ka backend yahi hai.

    Example

    from flask import Flask
    app = Flask(__name__)
    
    @app.route('/')
    def home():
        return 'Hello'

    Viva tipFlask micro hai: jo chahiye (DB, login, forms) khud jodte ho.

  6. 6
    What's GIT? Centralised or decentralised? What's decentralised?
    Times asked 1
    Official solution

    SimplePehle 1-line definition, phir apne MAD1 project mein file dikhao, phir chhota example.

    Suggested flow1) Concept kya hai?
    2) Mere code mein kahan?
    3) Example / demo
    4) Edge case

    Example

    # related file: models.py / routes / template
    # formula: request → check/auth → DB → render/redirect

    Viva tipExact line yaad nahi to honestly related part dikhao. Bluff mat karo.

  7. 7
    HTTP v/s HTTPS? Which is more secure and why?
    Times asked 1
    Official solution

    SimpleHTTP postcard (koi padh le). HTTPS envelope (TLS lock).

    Same headers, encrypted channel. MITM se password/token bachao. Local viva HTTP OK.

    HTTP/1.1 version keep-alive. TCP neeche, TLS security layer, SMTP mail alag.

    Browser + API ke beech extra darwaze: CORS origin allow, HTTPS encrypt transit, CSRF cookie-auto-send attack, XSS HTML inject, SQL injection raw query.

    MAD2 SPA: Vue :8080 Flask :5000 → Flask-CORS. JWT localStorage XSS se chori ho sakta — v-html user input pe avoid. Password Network tab localhost pe dikhega; prod HTTPS, response mein password echo nahi.

    401 unauthenticated, 403 unauthorized, 400 validation. Hash one-way — SHA decrypt nahi hota. Secret key .env, GitHub pe nahi.

    Project example: Dev localhost http. Production https:// + cert.

    Viva tipProtocols: HTTP/HTTPS app, TCP transport, TLS security, SMTP mail. HTTP/1.1 version — persistent connections.

  8. 8
    Backref v/s backpopulates
    Times asked 1
    Official solution

    Simplebackref reverse attribute auto banata hai. back_populates dono sides explicitly naam dete ho — clearer.

    Example

    # backref
    spots = db.relationship('Spot', backref='lot')
    # spot.lot available
    
    # back_populates
    spots = db.relationship('Spot', back_populates='lot')
    # Spot.lot = db.relationship('Lot', back_populates='spots')
  9. 9
    Get v/s Post. Which is more secure?
    Times asked 1
    Official solution

    SimpleGET data read/show karta hai (idempotent). POST create/submit karta hai (form).

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  10. 10
    How we send data to backend? (form action)
    Times asked 1
    Official solution

    SimpleORM = Object Relational Mapping. Tables → Python classes. Raw SQL kam likhte ho.

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  11. 11
    Can we send data through GET? How?
    Times asked 1
    Official solution

    SimpleGET data mangta hai (read), POST data bhejta hai (create/submit).

    GETURL mein dikhta hai, bookmark ho sakta hai, browser back/refresh safe hai, data URL query mein jaata hai. Search, page open, login form dikhana.

    POSTbody mein data jaata hai, URL mein password nahi dikhta, refresh pe dubara submit ho sakta hai. Login, register, form save.

    Example

    # page dikhana

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'GET':
            return render_template('login.html')
        # POST: form submit
        email = request.form.get('email')
        ...

    GET se theoretically data bhej sakte ho (?q=flask), lekin create/update ke liye nahi use karna — data log/history mein save ho jaata hai, length limit hoti hai.
    HTML form default GET hota hai; method='POST' likhna zaroori hai login/register pe.

  12. 12
    Manipulate frontend to only allow username to be 10 letters.
    Times asked 1
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

  13. 13
    Manipulate backend to store services name in uppercase.
    Times asked 1
    Official solution

    SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.

Advice: Be clear with theory. Practice sheet questions over and over especially theory ones. He'll grind you. Be calm and answer to the best of your knowledge.
  1. 1
    LEVEL 1
    Times asked 6
    Official solution

    SimpleLevel = viva difficulty band. Level 1 usually demo + basics; higher pe live coding + deeper theory.

    Viva tipJo level assign hai uske hisaab se demo + theory ready rakho.

  2. 2
    id
    Times asked 1
    Official solution

    SimpleCamera pe clearly college/IITM ID dikhao — naam aur photo match hone chahiye.

    Viva tipPehle se ID haath mein rakho, glare mat aane do. Iske baad GitHub + project run.

  3. 3
    demo
    Times asked 12
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  4. 4
    GitHub
    Times asked 1
    Official solution

    SimpleGitHub repo open karo: commits, collaborators, README. Examiner check karta hai tumne khud kaam kiya.

    Example

    Settings → Collaborators
    Commits: regular messages, last-day dump nahi.

    Viva tipPrivate repo access pehle de do. Main branch submitted ZIP se match honi chahiye.

  5. 5
    in navbar asked to change the profile first then dashboard
    Times asked 2
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  6. 6
    then asked to write a rest api that fetches all company details in notepad
    Times asked 1
    Official solution

    SimpleGET all companies serialize. REST API fetch all company details. Notepad or VS Code.

    Admin maybe.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Company.query.all()

    Project example: Company.query.all()

  7. 7
    where is jwt_token it implemented
    Times asked 1
    Official solution

    SimpleLogin token create. Decorators protected APIs. JWT/Security init factory.

    Where JWT authentication implemented backend. Show auth code.

    Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"

    Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
    Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).

    MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX — asli deny backend pe.

    Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.

    Project example: auth.py + decorators.

  8. 8
    where role-based access control is implemented
    Times asked 1
    Official solution

    SimpleRBAC = role ka badge. Admin badge se delete, user badge se sirf book.

    Role-Based Access Control. Har user pe alag permission list nahi — roles.

    Models: User M-M Role association. Decorators @roles_required. Vue v-if + router meta.

    Frontend hide UX. Backend 403 real security.

    Example

    if current_user.roles[0].name != 'admin':
        return jsonify(msg='Forbidden'), 403

    Project example: roles_users table. admin stats API roles_required. User booking POST user role.

    Viva tipCode mein roles_required, Vue meta.role, models User↔Role many-to-many (roles_users table).

  9. 9
    what is used for frontend
    Times asked 1
    Official solution

    SimpleMAD1 frontend usually Jinja templates + HTML/CSS/Bootstrap (+ thoda JS). MAD2 pe Vue ho to clearly bolo.

  1. 1
    What is redis , where caching has been implemented
    Times asked 1
    Official solution

    SimpleRedis fridge pe sticky note hai — poori kitchen (database) kholne ki zarurat nahi.

    Redis in-memory key-value store hai. Data RAM mein rehta hai, isliye disk wale SQLite/Postgres se kai guna tez.

    MAD2 mein Redis do kaam karta hai:
    1) Cache — same venue/show/dashboard JSON baar-baar DB se mat nikaalo.
    2) Celery message broker — Flask task queue mein daalta hai, worker uthata hai.

    Source of truth database hi hai. Redis band ho to cache miss ho jaata hai aur Celery queue ruk sakti hai. Crash pe cache gayab ho sakta hai — isliye important data sirf Redis mein mat rakho.

    Example

    import redis
    r = redis.Redis(host='localhost', port=6379, db=0)
    r.set('venues', json.dumps(data), ex=30)
    print(r.get('venues'))

    Project example: GET /api/venues pehle Redis dekho. Miss pe SQLAlchemy query, phir SET with timeout. Celery worker Redis list se daily reminder uthata hai.

    Viva tipCache ke liye db=1, broker ke liye db=0 rakhna smart hai taaki keys mix na hon. Viva mein redis-cli ping → PONG dikhana strong hai.

  2. 2
    Where have you used APIs
    Times asked 1
    Official solution

    SimpleUngli rakhe to 4-line formula — panic ki jagah structure.

    1) File ka role: model / Flask route / Vue SFC / celery task / config
    2) Input kahan: JSON, params, token, props, $route
    3) Kya kaam: query, cache, validation, .delay()
    4) Output: jsonify, this.items, email, redirect

    Unknown keyword: import, decorator, if, commit — har ka reason. Bluff mat.

    Suggested flow1) Kaunsi layer?
    2) Input?
    3) DB/cache/task?
    4) Response/UI?

    Project example: Booking POST: jwt, seats check, commit, 201, Vue list push.

    Viva tipUnknown keyword: import, decorator, if, commit — har ka reason. Panic mat.

  3. 3
    What are the major Frameworks used
    Times asked 1
    Official solution

    SimpleHar lib ek line why — list 40 mat.

    Flask, SQLAlchemy, JWT/Security, CORS, Caching+Redis, Celery, Vue+Router, Vuex/Pinia, Axios/fetch, Chart.js, Bootstrap.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: requirements.txt + package.json top 6 open karke bolo.

    Viva tipHar lib ek line why: CORS alag origin, Redis tez, Celery async, Chart.js dashboard.

  4. 4
    Which database, Which ORM you are using etc
    Times asked 1
    Official solution

    SimpleSQLite file-based DB — setup easy, MAD1 ke liye perfect. Production heavy traffic pe Postgres better.

    Example

    SQLALCHEMY_DATABASE_URI = 'sqlite:///app.db'
Advice: i used HTML for UI and all it shouldve been Vue , .vue files , even when i implemented inline Vue in the HTML , she said it was wrong , so 0 for me in frontend and basically giving demo and she liked that backend jobs are working well this was 1st viva
  1. 1
    Show Student ID.
    Times asked 3
    Official solution

    SimpleCamera pe college ID — naam photo match. Identity viva ki pehli gate.

    Pehle se haath mein, glare nahi. Examiner screenshot. Phir GitHub + portal ZIP run.

    Name GitHub/portal se mismatch red flag.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Project example: ID dikhao, bolo roll/name, phir screen share repo.

    Viva tipPehle se ID haath mein rakho, glare mat aane do. Examiner screenshot/verify karta hai. Iske baad GitHub + project run.

  2. 2
    Show GitHub repository and collaborator.
    Times asked 5
    Official solution

    SimpleRepo = evidence tumne kaam kiya: commits, collaborators, README.

    Regular messages, last-day dump nahi. Private access pehle de do. Main branch submitted ZIP se match.

    Collaborator settings. Commit dates.

    Example

    Settings → Collaborators: apna + teammate (agar allowed).
    Commits: regular messages, last-day dump nahi.

    Project example: Settings → Collaborators. git log --oneline. README run steps.

    Viva tipPrivate repo access de do pehle. Main branch latest submitted ZIP se match honi chahiye.

  3. 3
    Demonstrate the complete application.
    Times asked 33
    Official solution

    SimpleDemo 5–7 min ki kahani: saari roles, koi milestone skip nahi, bolte-bolte dikhao.

    Examiner list tick karta hai. Crash ho to panic nahi — terminal error padho.

    Code tab kholna jab poochhein. Extra uncommitted features mat dikhana agar portal ZIP mein nahi.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search + charts
    6) CSV export / email job
    7) Logout

    Project example: Jo statement/parking/jobs/tickets hai uske user+admin journeys.

    Viva tipBol: 'Yahan overbooking rokta hoon'. Mandatory features pehle, polish baad.

  4. 4
    Where have you used APIs in your project?
    Times asked 1
    Official solution

    SimpleUngli rakhe to 4-line formula — panic ki jagah structure.

    1) File ka role: model / Flask route / Vue SFC / celery task / config
    2) Input kahan: JSON, params, token, props, $route
    3) Kya kaam: query, cache, validation, .delay()
    4) Output: jsonify, this.items, email, redirect

    Unknown keyword: import, decorator, if, commit — har ka reason. Bluff mat.

    Suggested flow1) Kaunsi layer?
    2) Input?
    3) DB/cache/task?
    4) Response/UI?

    Project example: Booking POST: jwt, seats check, commit, 201, Vue list push.

    Viva tipUnknown keyword: import, decorator, if, commit — har ka reason. Panic mat.

  5. 5
    Where is Vue implemented?
    Times asked 1
    Official solution

    Simplefrontend/src or templates/index.html CDN + app.js. Entry main.js #app.

    Where Vue implemented.

    SPA = ek HTML, Vue Router se views, full reload nahi. MPA = MAD1 Jinja har URL naya HTML.

    Vue Router: routes array, router-view, router-link, meta.auth + beforeEach guard. Dynamic /venues/:id$route.params.id.

    Vite/CLI SFC + npm build dist/. CDN script tag, no SFC. Jo tumne use kiya wahi justify. Flask send_from_directory('dist') production pattern.

    Project example: Open folder.

    Project example: Open folder.

  6. 6
    Where is JWT token authentication implemented?
    Times asked 1
    Official solution

    SimpleLogin token create. Decorators protected APIs. JWT/Security init factory.

    Where JWT authentication implemented backend. Show auth code.

    Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"

    Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
    Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).

    MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX — asli deny backend pe.

    Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.

    Project example: auth.py + decorators.

  7. 7
    Where is Role-Based Access Control (RBAC) implemented?
    Times asked 2
    Official solution

    SimpleRBAC = role ka badge. Admin badge se delete, user badge se sirf book.

    Role-Based Access Control. Har user pe alag permission list nahi — roles.

    Models: User M-M Role association. Decorators @roles_required. Vue v-if + router meta.

    Frontend hide UX. Backend 403 real security.

    Example

    if current_user.roles[0].name != 'admin':
        return jsonify(msg='Forbidden'), 403

    Project example: roles_users table. admin stats API roles_required. User booking POST user role.

    Viva tipCode mein roles_required, Vue meta.role, models User↔Role many-to-many (roles_users table).

  8. 8
    Explain the frontend technology used in your project.
    Times asked 1
    Official solution

    SimpleVue SPA, Bootstrap/CSS, Chart.js, fetch/Axios, Vue Router, maybe Vuex.

    What used for frontend. Which framework.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Don't forget router.

    Project example: Don't forget router.

  9. 9
    What is Redis?
    Times asked 21
    Official solution

    SimpleRedis fridge pe sticky note hai — poori kitchen (database) kholne ki zarurat nahi.

    Redis in-memory key-value store hai. Data RAM mein rehta hai, isliye disk wale SQLite/Postgres se kai guna tez.

    MAD2 mein Redis do kaam karta hai:
    1) Cache — same venue/show/dashboard JSON baar-baar DB se mat nikaalo.
    2) Celery message broker — Flask task queue mein daalta hai, worker uthata hai.

    Source of truth database hi hai. Redis band ho to cache miss ho jaata hai aur Celery queue ruk sakti hai. Crash pe cache gayab ho sakta hai — isliye important data sirf Redis mein mat rakho.

    Example

    import redis
    r = redis.Redis(host='localhost', port=6379, db=0)
    r.set('venues', json.dumps(data), ex=30)
    print(r.get('venues'))

    Project example: GET /api/venues pehle Redis dekho. Miss pe SQLAlchemy query, phir SET with timeout. Celery worker Redis list se daily reminder uthata hai.

    Viva tipCache ke liye db=1, broker ke liye db=0 rakhna smart hai taaki keys mix na hon. Viva mein redis-cli ping → PONG dikhana strong hai.

  10. 10
    Where have you implemented caching?
    Times asked 7
    Official solution

    SimpleGET lists/stats @cache.cached. Mutations pe delete. CACHE_TYPE Redis.

    Why each route: public repeated reads. User-private careful.

    Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.

    MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.

    Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.

    Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.

    Alag: Redis ≠ Memcached (Celery broker nahi). Redis ≠ localStorage (woh browser). redis-cli ping → PONG viva proof.

    Project example: File+line decorator. redis-cli get key optional.

  11. 11
    What is caching?
    Times asked 23
    Official solution

    SimpleCache = pehli baar hisaab karke copy rakh lo, doosri baar copy dikha do.

    Baar-baar same expensive kaam (DB query, counting bookings) mat karo. Result Redis jaise store mein timeout ke saath rakh do.

    Cache hit: key mil gayi, DB skip. Cache miss: DB se lao, SET karo, return karo.

    Tradeoff: speed vs stale data. Admin naya venue add kare aur cache 50s ka ho to user purani list dekh sakta hai — isliye write pe invalidation zaroori hai.

    Browser cache, Flask-Caching, Redis alag layers hain. MAD2 examiner Redis + @cache.cached code dekhta hai.

    Example

    @cache.cached(timeout=50, query_string=True)
    @app.route('/api/shows')
    def shows():
        return jsonify([s.serialize() for s in Show.query.all()])

    Project example: Admin dashboard counts / venues list cache. Create/update/delete ke baad cache.delete('venues').

    Viva tipprint('DB queried') function ke andar laga ke miss/hit demo karo — hit pe print nahi chalega.

  12. 12
    What are the major frameworks used in your project?
    Times asked 1
    Official solution

    SimpleHar lib ek line why — list 40 mat.

    Flask, SQLAlchemy, JWT/Security, CORS, Caching+Redis, Celery, Vue+Router, Vuex/Pinia, Axios/fetch, Chart.js, Bootstrap.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: requirements.txt + package.json top 6 open karke bolo.

    Viva tipHar lib ek line why: CORS alag origin, Redis tez, Celery async, Chart.js dashboard.

  13. 13
    Which database are you using?
    Times asked 3
    Official solution

    SimpleSQLite file, zero setup, relational tables/FK. Redis NoSQL cache not primary.

    NoSQL examples Mongo, Redis-as-DB. MAD2 models relational.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: sqlite:///app.db. Redis 6379 alag.

  14. 14
    Which ORM are you using?
    Times asked 2
    Official solution

    SimpleORM = translator. Python object bolo, woh SQL mein baat kare.

    Object Relational Mapper. Class User ↔ table user. Raw SQL kam.

    SQLAlchemy MAD1/MAD2. Fayde: portable SQLite→Postgres, relationships, parameterized queries (injection kam).
    Nuksaan: N+1, hidden SQL, complex reports pe raw better.

    Direct sqlite3 se SQLAlchemy isliye: models, switch DB, safer queries.

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(128), unique=True)
    User.query.filter_by(email='a@b.com').first()

    Project example: models.py db.Model. resources User.query.filter_by. Koi f-string SQL nahi.

    Viva tipFayde: safe-ish, portable (SQLite→Postgres). Nuksaan: complex queries, N+1, leaky abstractions. Direct SQLite se SQLAlchemy isliye: models + injection protection + switch DB.

  15. 15
    Change the navbar order so that Profile appears before Dashboard.
    Times asked 1
    Official solution

    Simplerouter-link order swap Profile before Dashboard.

    That's it. Don't rebuild router.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Navbar.vue template order.

    Project example: Navbar.vue template order.

  16. 16
    Write a REST API that fetches all company details (in Notepad or VS Code).
    Times asked 1
    Official solution

    SimpleGET all companies serialize. REST API fetch all company details. Notepad or VS Code.

    Admin maybe.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Company.query.all()

    Project example: Company.query.all()

  1. 1
    Show your ID card.
    Times asked 23
    Official solution

    SimpleCamera pe college ID — naam photo match. Identity viva ki pehli gate.

    Pehle se haath mein, glare nahi. Examiner screenshot. Phir GitHub + portal ZIP run.

    Name GitHub/portal se mismatch red flag.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Project example: ID dikhao, bolo roll/name, phir screen share repo.

    Viva tipPehle se ID haath mein rakho, glare mat aane do. Examiner screenshot/verify karta hai. Iske baad GitHub + project run.

  2. 2
    Show your GitHub repository.
    Times asked 9
    Official solution

    SimpleRepo = evidence tumne kaam kiya: commits, collaborators, README.

    Regular messages, last-day dump nahi. Private access pehle de do. Main branch submitted ZIP se match.

    Collaborator settings. Commit dates.

    Example

    Settings → Collaborators: apna + teammate (agar allowed).
    Commits: regular messages, last-day dump nahi.

    Project example: Settings → Collaborators. git log --oneline. README run steps.

    Viva tipPrivate repo access de do pehle. Main branch latest submitted ZIP se match honi chahiye.

  3. 3
    Demonstrate your application.
    Times asked 8
    Official solution

    SimpleDemo 5–7 min ki kahani: saari roles, koi milestone skip nahi, bolte-bolte dikhao.

    Examiner list tick karta hai. Crash ho to panic nahi — terminal error padho.

    Code tab kholna jab poochhein. Extra uncommitted features mat dikhana agar portal ZIP mein nahi.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search + charts
    6) CSV export / email job
    7) Logout

    Project example: Jo statement/parking/jobs/tickets hai uske user+admin journeys.

    Viva tipBol: 'Yahan overbooking rokta hoon'. Mandatory features pehle, polish baad.

  4. 4
    Where have you implemented APIs?
    Times asked 1
    Official solution

    Simpleresources.py / @app.route. Postman or comments list.

    Where implemented APIs.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Project example: url_prefix /api.

  5. 5
    Where is Vue implemented in your project?
    Times asked 1
    Official solution

    Simplefrontend/src or templates/index.html CDN + app.js. Entry main.js #app.

    Where Vue implemented.

    SPA = ek HTML, Vue Router se views, full reload nahi. MPA = MAD1 Jinja har URL naya HTML.

    Vue Router: routes array, router-view, router-link, meta.auth + beforeEach guard. Dynamic /venues/:id$route.params.id.

    Vite/CLI SFC + npm build dist/. CDN script tag, no SFC. Jo tumne use kiya wahi justify. Flask send_from_directory('dist') production pattern.

    Project example: Open folder.

    Project example: Open folder.

  6. 6
    What are the major frameworks/libraries used in your project?
    Times asked 1
    Official solution

    SimpleHar lib ek line why — list 40 mat.

    Flask, SQLAlchemy, JWT/Security, CORS, Caching+Redis, Celery, Vue+Router, Vuex/Pinia, Axios/fetch, Chart.js, Bootstrap.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: requirements.txt + package.json top 6 open karke bolo.

    Viva tipHar lib ek line why: CORS alag origin, Redis tez, Celery async, Chart.js dashboard.

  7. 7
    Which database are you using?
    Times asked 3
    Official solution

    SimpleSQLite file, zero setup, relational tables/FK. Redis NoSQL cache not primary.

    NoSQL examples Mongo, Redis-as-DB. MAD2 models relational.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: sqlite:///app.db. Redis 6379 alag.

  8. 8
    Which ORM are you using?
    Times asked 2
    Official solution

    SimpleORM = translator. Python object bolo, woh SQL mein baat kare.

    Object Relational Mapper. Class User ↔ table user. Raw SQL kam.

    SQLAlchemy MAD1/MAD2. Fayde: portable SQLite→Postgres, relationships, parameterized queries (injection kam).
    Nuksaan: N+1, hidden SQL, complex reports pe raw better.

    Direct sqlite3 se SQLAlchemy isliye: models, switch DB, safer queries.

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(128), unique=True)
    User.query.filter_by(email='a@b.com').first()

    Project example: models.py db.Model. resources User.query.filter_by. Koi f-string SQL nahi.

    Viva tipFayde: safe-ish, portable (SQLite→Postgres). Nuksaan: complex queries, N+1, leaky abstractions. Direct SQLite se SQLAlchemy isliye: models + injection protection + switch DB.

  9. 9
    Where is JWT authentication implemented?
    Times asked 1
    Official solution

    SimpleLogin token create. Decorators protected APIs. JWT/Security init factory.

    Where JWT authentication implemented backend. Show auth code.

    Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"

    Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
    Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).

    MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX — asli deny backend pe.

    Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.

    Project example: auth.py + decorators.

  10. 10
    Where is Role-Based Access Control (RBAC) implemented?
    Times asked 2
    Official solution

    SimpleRBAC = role ka badge. Admin badge se delete, user badge se sirf book.

    Role-Based Access Control. Har user pe alag permission list nahi — roles.

    Models: User M-M Role association. Decorators @roles_required. Vue v-if + router meta.

    Frontend hide UX. Backend 403 real security.

    Example

    if current_user.roles[0].name != 'admin':
        return jsonify(msg='Forbidden'), 403

    Project example: roles_users table. admin stats API roles_required. User booking POST user role.

    Viva tipCode mein roles_required, Vue meta.role, models User↔Role many-to-many (roles_users table).

  11. 11
    What is Redis?
    Times asked 21
    Official solution

    SimpleRedis fridge pe sticky note hai — poori kitchen (database) kholne ki zarurat nahi.

    Redis in-memory key-value store hai. Data RAM mein rehta hai, isliye disk wale SQLite/Postgres se kai guna tez.

    MAD2 mein Redis do kaam karta hai:
    1) Cache — same venue/show/dashboard JSON baar-baar DB se mat nikaalo.
    2) Celery message broker — Flask task queue mein daalta hai, worker uthata hai.

    Source of truth database hi hai. Redis band ho to cache miss ho jaata hai aur Celery queue ruk sakti hai. Crash pe cache gayab ho sakta hai — isliye important data sirf Redis mein mat rakho.

    Example

    import redis
    r = redis.Redis(host='localhost', port=6379, db=0)
    r.set('venues', json.dumps(data), ex=30)
    print(r.get('venues'))

    Project example: GET /api/venues pehle Redis dekho. Miss pe SQLAlchemy query, phir SET with timeout. Celery worker Redis list se daily reminder uthata hai.

    Viva tipCache ke liye db=1, broker ke liye db=0 rakhna smart hai taaki keys mix na hon. Viva mein redis-cli ping → PONG dikhana strong hai.

  12. 12
    Where have you implemented caching?
    Times asked 7
    Official solution

    SimpleGET lists/stats @cache.cached. Mutations pe delete. CACHE_TYPE Redis.

    Why each route: public repeated reads. User-private careful.

    Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.

    MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.

    Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.

    Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.

    Alag: Redis ≠ Memcached (Celery broker nahi). Redis ≠ localStorage (woh browser). redis-cli ping → PONG viva proof.

    Project example: File+line decorator. redis-cli get key optional.

  13. 13
    What is caching?
    Times asked 23
    Official solution

    SimpleCache = pehli baar hisaab karke copy rakh lo, doosri baar copy dikha do.

    Baar-baar same expensive kaam (DB query, counting bookings) mat karo. Result Redis jaise store mein timeout ke saath rakh do.

    Cache hit: key mil gayi, DB skip. Cache miss: DB se lao, SET karo, return karo.

    Tradeoff: speed vs stale data. Admin naya venue add kare aur cache 50s ka ho to user purani list dekh sakta hai — isliye write pe invalidation zaroori hai.

    Browser cache, Flask-Caching, Redis alag layers hain. MAD2 examiner Redis + @cache.cached code dekhta hai.

    Example

    @cache.cached(timeout=50, query_string=True)
    @app.route('/api/shows')
    def shows():
        return jsonify([s.serialize() for s in Show.query.all()])

    Project example: Admin dashboard counts / venues list cache. Create/update/delete ke baad cache.delete('venues').

    Viva tipprint('DB queried') function ke andar laga ke miss/hit demo karo — hit pe print nahi chalega.

  14. 14
    What have you used for the frontend?
    Times asked 1
    Official solution

    SimpleVue SPA, Bootstrap/CSS, Chart.js, fetch/Axios, Vue Router, maybe Vuex.

    What used for frontend. Which framework.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Don't forget router.

    Project example: Don't forget router.

  15. 15
    Change the Navbar order so that Profile appears before Dashboard.
    Times asked 1
    Official solution

    Simplerouter-link order swap Profile before Dashboard.

    That's it. Don't rebuild router.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Navbar.vue template order.

    Project example: Navbar.vue template order.

  16. 16
    Write a REST API to fetch all company details.
    Times asked 1
    Official solution

    SimpleGET all companies serialize. REST API fetch all company details. Notepad or VS Code.

    Admin maybe.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Project example: Company.query.all()

    Project example: Company.query.all()

  1. 1
    Show your student ID card.
    Times asked 3
    Official solution

    SimpleCamera pe clearly IITM/college ID dikhao — naam photo match.

    Pehle se ID haath mein rakho. Glare mat aane do. Examiner screenshot/verify karta hai. Iske baad GitHub + project run.

  2. 2
    Show your GitHub repository.
    Times asked 9
    Official solution

    SimpleGitHub repo public/private policy ke hisaab, MAD-1 collaborator add, commits dikhao.

    Repo → Settings → Collaborators → instructor added.
    Commits: git log / GitHub History — regular commits better, ek dum 1 commit suspicious.
    README + report mein AI usage likha hona chahiye agar use kiya.

  3. 3
    Show GitHub collaborator(s).
    Times asked 1
    Official solution

    SimpleGitHub repo public/private policy ke hisaab, MAD-1 collaborator add, commits dikhao.

    Repo → Settings → Collaborators → instructor added.
    Commits: git log / GitHub History — regular commits better, ek dum 1 commit suspicious.
    README + report mein AI usage likha hona chahiye agar use kiya.

  4. 4
    Show commit history.
    Times asked 1
    Official solution

    SimpleGitHub repo public/private policy ke hisaab, MAD-1 collaborator add, commits dikhao.

    Repo → Settings → Collaborators → instructor added.
    Commits: git log / GitHub History — regular commits better, ek dum 1 commit suspicious.
    README + report mein AI usage likha hona chahiye agar use kiya.

  5. 5
    Download the project from the portal, extract it, and run it.
    Times asked 1
    Official solution

    SimpleExaminer submitted ZIP chahta hai, local extra changes nahi.

    Portal se ZIP download → extract → venv → pip install -r requirements.txt → flask run / python app.py.
    Checksum maange to hash match karke dikhao. Camera/OPPE setup unke instructions.
    Linux/Mac: paths, gunicorn; Windows paths alag ho to relative paths use karo.
    Do browsers: admin + user parallel demo impressive lagta hai.

  6. 6
    Demonstrate all core functionalities of the application.
    Times asked 2
    Official solution

    SimpleDemo script pehle se practice karo, 5-7 minute, saari roles.

    Suggested flow

    1) Register/login user 2) Admin login — CRUD 3) Approval/blacklist 4) Booking/apply 5) Search 6) Validation edge (slots 0, duplicate) 7) Logout
    Bolte-bolte dikhao: 'Yahan overbooking rokta hoon'. Code tab kholna jab poochhein.
    Crash ho to debug calmly: terminal error, typo, DB path.
    Mandatory features skip mat karna — examiner list tick karta hai.

  7. 7
    Explain the project workflow.
    Times asked 1
    Official solution

    Examiner code pe ungli rakh ke poochta hai — panic mat karo, 4-line formula bolo.

    1) Yeh file/line kya role hai (model / route / template / config)?
    2) Input kahan se aata hai (form, URL <id>, session, JSON)?
    3) DB pe kya query/write?
    4) Output kya (render_template / redirect / jsonify)?

    Example

    @app.route('/book/<int:id>', methods=['POST']) — logged-in user session se, trek id URL se, Booking add, slots--, redirect history.

    Unknown line: imports (request, url_for, flash), decorators, if checks, commit — har keyword ka reason ready rakho.

  8. 8
    Explain the application architecture (MVC).
    Times asked 1
    Official solution

    SimpleMVC = Model-View-Controller. Code ko 3 hisson mein baant ta hai taaki mix na ho.

    Model: data + DB. models.py — User, Trek, Booking classes.
    View: jo user dekhta hai. templates/*.html + Jinja.
    Controller: beech ka logic. routes / app.py — request lo, model se data, view ko do.

    Example flow (register):
    Browser form POST → Controller register() → User model save → redirect → View dashboard.html

    Draw: Browser → Controller → Model → DB, phir Controller → View → Browser.
    ORM na ho to bhi MVC ho sakta hai — Model raw SQL functions ho sakte hain. Structure matter karta hai, library nahi.
    MVP/MVVM doosri architectures hain; MAD1 mein MVC expected hai.

  9. 9
    Explain the frontend and backend logic of a feature.
    Times asked 1
    Official solution

    SimpleFrontend user jo dekhta/click karta hai, Backend server logic + database.

    Frontend: HTML, CSS, Bootstrap, Jinja templates, thoda JS. Browser pe chalta hai.
    Backend: Flask routes, SQLAlchemy, session, validation. Python server pe.
    Data flow: form POST → Flask request.form → DB save → render_template/redirect → HTML dikha.
    MAD1 typical stack: Flask + Jinja + SQLAlchemy + SQLite + Bootstrap.

  10. 10
    Explain the database tables briefly (1–2 lines each).
    Times asked 1
    Official solution

    Simplemodels.py har table ki class hai — columns, PK/FK, relationships. Yeh Model layer hai.

    Viva mein file khol ke bolo:
    1) Kaunsi classes/tables hain (User, Role-specific, Booking...)
    2) Har table ka kaam 1 line
    3) Relationships: 1-1 / 1-M / M-M, backref, cascade, lazy
    4) Constraints: unique email, nullable, default status

    Example skeleton

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True, nullable=False)
        role = db.Column(db.String(20), default='user')
        bookings = db.relationship('Booking', backref='user', cascade='all, delete-orphan')

    ER diagram: rectangles entities, lines relationships, PK/FK mark. Schema = yahi structure.
    Tables create: db.create_all() ya migrations. SQLite file SQL viewer se dikha sakte ho.

  11. 11
    Explain Admin functionalities and workflow.
    Times asked 1
    Official solution

    Examiner code pe ungli rakh ke poochta hai — panic mat karo, 4-line formula bolo.

    1) Yeh file/line kya role hai (model / route / template / config)?
    2) Input kahan se aata hai (form, URL <id>, session, JSON)?
    3) DB pe kya query/write?
    4) Output kya (render_template / redirect / jsonify)?

    Example

    @app.route('/book/<int:id>', methods=['POST']) — logged-in user session se, trek id URL se, Booking add, slots--, redirect history.

    Unknown line: imports (request, url_for, flash), decorators, if checks, commit — har keyword ka reason ready rakho.

  12. 12
    Explain how the summary/statistics page works.
    Times asked 1
    Official solution

    Examiner code pe ungli rakh ke poochta hai — panic mat karo, 4-line formula bolo.

    1) Yeh file/line kya role hai (model / route / template / config)?
    2) Input kahan se aata hai (form, URL <id>, session, JSON)?
    3) DB pe kya query/write?
    4) Output kya (render_template / redirect / jsonify)?

    Example

    @app.route('/book/<int:id>', methods=['POST']) — logged-in user session se, trek id URL se, Booking add, slots--, redirect history.

    Unknown line: imports (request, url_for, flash), decorators, if checks, commit — har keyword ka reason ready rakho.

  13. 13
    Write a Flask route from scratch.
    Times asked 1
    Official solution

    Simple Hello World — notepad mein yeh likh ke run karke dikhao:

    from flask import Flask
    app = Flask(__name__)
    @app.route('/')
    def home():
        return 'Hello World'
    if __name__ == '__main__':
        app.run(debug=True)
    
    Jinja version: return render_template('hello.html', name='Shubham')

    hello.html: <h1>Hello {{ name }}</h1>
    POST-only: @app.route('/x', methods=['POST'])

  14. 14
    Write a simple Flask Hello World application.
    Times asked 1
    Official solution

    Simple Hello World — notepad mein yeh likh ke run karke dikhao:

    from flask import Flask
    app = Flask(__name__)
    @app.route('/')
    def home():
        return 'Hello World'
    if __name__ == '__main__':
        app.run(debug=True)
    
    Jinja version: return render_template('hello.html', name='Shubham')

    hello.html: <h1>Hello {{ name }}</h1>
    POST-only: @app.route('/x', methods=['POST'])

  15. 15
    Write the complete user registration route.
    Times asked 1
    Official solution

    Yeh live coding / notepad task hai. Chhota, correct Flask snippet likho.

    from flask import Flask, render_template, request, redirect, url_for
    @app.route('/do', methods=['GET','POST'])
    def do():
        if request.method == 'POST':
            # request.form.get('field') ya request.args.get('q')
            # db.session.add(...); commit
            return redirect(url_for('dashboard'))
        items = Model.query.all()
        return render_template('page.html', items=items)

    Jinja: {% for x in items %}<li>{{ x.name }}</li>{% endfor %}
    ID URL: @app.route('/item/<int:id>')

  16. 16
    Write a search route (search by name/company/student).
    Times asked 1
    Official solution

    Patternfilter query → template/JSON. Examiner jo entity bole us class ka naam use karo.

    @app.route('/admin/blacklisted')
    def blacklisted():
        rows = User.query.filter_by(is_blacklisted=True).all()
        return render_template('list.html', rows=rows)
    
    JSON: return jsonify([{'id': r.id, 'name': r.name} for r in rows])
    ID se: User.query.get_or_404(id)
    Do filters: .filter(Drive.approved==False, Drive.title=='Data Scientist')

    Join example: students jinhone blacklisted company ke drive pe apply kiya — join Application-Drive-Company.

    PUT@app.route('/x/<int:id>', methods=['PUT']) + request.get_json()

    url param display: @app.route('/show/<int:id>') return render_template('show.html', id=id)
    Form → next page: POST values render_template('out.html', **request.form)
    Count: return str(User.query.filter_by(is_blacklisted=True).count())

  17. 17
    What is Flask? What is Jinja2?
    Times asked 1
    Official solution

    SimpleFlask Python ka micro web framework hai — routes, templates, request/response handle karta hai.

    from flask import Flask
    app = Flask(__name__)
    @app.route('/')
    def home():
        return 'Hello'
    app.run(debug=True)  # default port 5000

    __name__ se Flask ko pata chalta hai templates/static kahan se load karni hai. Hataoge to resource paths toot sakte hain.

    Faydesimple, flexible, MAD1 syllabus. Nuksaan: bade features (admin, auth) khud jodne padte hain.

    app.run() development server start karta hai. Production mein gunicorn/waitress.
  18. 18
    Explain template inheritance.
    Times asked 1
    Official solution

    Simpleextends poora layout inherit karta hai, include chhota piece insert karta hai.

    extends: child page base.html ka structure use karti hai, blocks override karti hai. Ek hi parent.
    include: navbar.html / footer.html jahan chaho insert. Kai baar use ho sakta hai.

    base.html:

    {% block content %}{% endblock %}
    
    home.html:
    {% extends 'base.html' %}
    {% block content %}<h1>Home</h1>{% endblock %}
    
    {% include 'navbar.html' %}  → navbar har page pe

    Fayda: header/footer ek jagah, change once — saari pages update. MAD1 mein almost har project use karta hai.

  19. 19
    Difference between render_template() and redirect().
    Times asked 4
    Official solution

    Simplerender_template HTML page bana ke turant dikhata hai, redirect user ko doosre URL pe bhej deta hai.

    render_template('home.html', user=user) → server template fill karke 200 response deta hai. URL same rehta hai.
    redirect(url_for('dashboard')) → 302 response, browser naya GET karta hai. URL change ho jaata hai.

    Examplelogin POST successful hone ke baad render_template mat use karo, warna refresh pe form dubara submit ho jaayega.

    Sahi tarika: redirect(url_for('dashboard')) — yeh Post-Redirect-Get pattern hai.

    render_template tab: page dikhana hai with data.
    redirect tab: kaam ho gaya, ab doosre page pe le jaana hai (login, delete, update ke baad).

  20. 20
    What is the default Flask port?
    Times asked 1
    Official solution

    SimpleFlask default port 5000. Change: app.run(port=8000) ya env PORT, ya flask run --port 8000.

    if __name__ == '__main__':
        app.run(debug=True, host='0.0.0.0', port=8000)

    Do apps ek saath: alag ports. Occupied port: error, doosra number try.

  21. 21
    Can the Flask port be changed?
    Times asked 1
    Official solution

    SimpleFlask default port 5000. Change: app.run(port=8000) ya env PORT, ya flask run --port 8000.

    if __name__ == '__main__':
        app.run(debug=True, host='0.0.0.0', port=8000)

    Do apps ek saath: alag ports. Occupied port: error, doosra number try.

  22. 22
    What is Application Context?
    Times asked 1
    Official solution

    SimpleApplication context app-level data (config, db), Request context ek HTTP request (request, session).

    Request ke andar Flask khud context push karta hai. Scripts/shell mein db query ke liye:

    with app.app_context():
        User.query.all()

    app.app_context().push() same, lekin with better (cleanup).
    current_app proxy current Flask app ki taraf. Factory pattern mein import app cycle avoid.
    Request context ke bahar request.form error dega.

  23. 23
    What is Request Context?
    Times asked 1
    Official solution

    SimpleApplication context app-level data (config, db), Request context ek HTTP request (request, session).

    Request ke andar Flask khud context push karta hai. Scripts/shell mein db query ke liye:

    with app.app_context():
        User.query.all()

    app.app_context().push() same, lekin with better (cleanup).
    current_app proxy current Flask app ki taraf. Factory pattern mein import app cycle avoid.
    Request context ke bahar request.form error dega.

  24. 24
    What are HTTP methods?
    Times asked 5
    Official solution

    SimpleHTTP methods batate hain request kya karna chahti hai. Common: GET POST PUT PATCH DELETE.

    GETread/fetch. Safe, URL se. Page kholna, search.

    POSTcreate/submit. Form, login.

    PUTpoora replace/update. Idempotent.

    PATCHpartial update.

    DELETEhataana.

    HEAD: sirf headers. OPTIONS: CORS preflight.

    Flask: @app.route('/x', methods=['GET','POST'])
    Agar methods na likho to default sirf GET.
    HTML form native sirf GET/POST. PUT/DELETE JS/fetch ya hidden _method se.
    GET se data fetch ho sakta hai, create nahi karna chahiye. POST se theoretically fetch ho sakta hai lekin cache/semantics galat.
    DELETE fetch ke liye nahi. GET POST ka kaam officially nahi karta — side effects GET pe mat rakho.

  25. 25
    Which HTTP methods have you used in your project?
    Times asked 2
    Official solution

    SimpleHTTP methods batate hain request kya karna chahti hai. Common: GET POST PUT PATCH DELETE.

    GETread/fetch. Safe, URL se. Page kholna, search.

    POSTcreate/submit. Form, login.

    PUTpoora replace/update. Idempotent.

    PATCHpartial update.

    DELETEhataana.

    HEAD: sirf headers. OPTIONS: CORS preflight.

    Flask: @app.route('/x', methods=['GET','POST'])
    Agar methods na likho to default sirf GET.
    HTML form native sirf GET/POST. PUT/DELETE JS/fetch ya hidden _method se.
    GET se data fetch ho sakta hai, create nahi karna chahiye. POST se theoretically fetch ho sakta hai lekin cache/semantics galat.
    DELETE fetch ke liye nahi. GET POST ka kaam officially nahi karta — side effects GET pe mat rakho.

  26. 26
    Explain GET vs POST.
    Times asked 1
    Official solution

    SimpleGET data mangta hai (read), POST data bhejta hai (create/submit).

    GETURL mein dikhta hai, bookmark ho sakta hai, browser back/refresh safe hai, data URL query mein jaata hai. Search, page open, login form dikhana.

    POSTbody mein data jaata hai, URL mein password nahi dikhta, refresh pe dubara submit ho sakta hai. Login, register, form save.

    Example

    # page dikhana

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'GET':
            return render_template('login.html')
        # POST: form submit
        email = request.form.get('email')
        ...

    GET se theoretically data bhej sakte ho (?q=flask), lekin create/update ke liye nahi use karna — data log/history mein save ho jaata hai, length limit hoti hai.
    HTML form default GET hota hai; method='POST' likhna zaroori hai login/register pe.

  27. 27
    Create a complete HTML registration page using given form fields.
    Times asked 1
    Official solution

    Yeh project-specific feature add/modify hai. 4 layers touch karo: model, route, template, validation.

    1) Data chahiye to models.py mein column/relationship + DB update (ALTER / migrate / create_all).
    2) Route: GET pe form/page, POST pe request.form se save, flash + redirect.
    3) Template: input name=... Jinja se {{ obj.field }} display.
    4) Rule: duplicate, range, role check backend pe.

    Example naya field 'city':

    user.city = db.Column(db.String(50))
    user.city = request.form.get('city')
    <input name='city'>  ...  {{ user.city }}
  28. 28
    Change the color of a button.
    Times asked 5
    Official solution

    Simpleexaminer UI tweak maangta hai — CSS class ya inline, instantly dikhao.

    Button color: <button class='btn btn-success'> ya style='background:#22c55e;color:#fff'
    Navbar: navbar-dark bg-success / style='background:yellow' / fixed-bottom se neeche.
    Center: .wrap { display:flex; justify-content:center; align-items:center; min-height:100vh; }
    text-align:center heading ke liye. Bootstrap: d-flex justify-content-center, mx-auto, text-center.
    Hover: .btn:hover { opacity:0.8; transform:scale(1.02); }
    Half width: class='col-6' ya width:50%. Row→column: flex-direction:column / col-12 stack.
    Login card: card shadow p-4 mx-auto (max-width:400px).
    Table header green: th { background:green; color:white; } Bold column: td:nth-child(2){font-weight:bold}
    Box shadow: box-shadow: 4px 4px 12px rgba(0,0,0,.3);
    Background image: body { background: url('/static/bg.jpg') center/cover; }
    Reset button: <button type='reset'>Clear</button>
    Move button: ms-auto / position / flex order.
    Jinja dashboard heading: <h1>{{ user.name }}'s Dashboard</h1>

  29. 29
    What framework did you use to build your application?
    Times asked 1
    Official solution

    SimpleFlask Python ka micro web framework hai — routes, templates, request/response handle karta hai.

    from flask import Flask
    app = Flask(__name__)
    @app.route('/')
    def home():
        return 'Hello'
    app.run(debug=True)  # default port 5000

    __name__ se Flask ko pata chalta hai templates/static kahan se load karni hai. Hataoge to resource paths toot sakte hain.

    Faydesimple, flexible, MAD1 syllabus. Nuksaan: bade features (admin, auth) khud jodne padte hain.

    app.run() development server start karta hai. Production mein gunicorn/waitress.
  30. 30
    What percentage of AI/LLM usage did you mention in your project report?
    Times asked 1
    Official solution

    SimpleSach bolo. AI se boilerplate/docs theek, logic samajh ke explain karo.

    'Boilerplate aur CSS ke liye AI use kiya, models/routes khud design kiye. Report mein X% mention hai.'
    Line-by-line nahi explain kar paoge to examiner pakad lega. Documentation: official Flask/SQLAlchemy + course lectures.

Created for educational purposes only. Questions are based on students' personal experiences and may not reflect actual exam content.