Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level1_14

Share your experience Add your viva experience here
168 Questions
18 Sets
0 Topics
10 Reviews
Tips for this examiner: Explain all features in details while doing demo.

Student reviews

Sheet response MAD1

considerate examiner as long as you are moderately aware of your project

Questions remembered
  1. - first demo your app
  2. - update to show phone number on student dashboard with name
  3. - how would you let students reapply to jobs they have been rejected from
  4. - say your app scales to 1B users, would you do horizontal or vertical scaling
  5. - what security improvements would you do
Sheet response MAD1

Nice proctor , follow his instructions and try to know your code as much as possible

Questions remembered
  1. download the zip from the portal and proceed to demonstrate the application workflow from student registration , company registration , drive creation till student selection
  2. modify the student dashboard to display the student name also along with recent updates(displayed already)
saanjhi MAD1

be confident and try all to express your logic proctor was real sweet and kind .all the veryy best

Questions remembered
  1. difference between backref and back populated.
  2. what is cascade, in cascade how parent and child are defined.
  3. what is venv and what are its advantages 4.checked my model.py
  4. all demonstration.
  5. i have some issue with search bar so resolved it there.
Pavan MAD1

Proctor is very chill and guides you through the demo step by step
Know your code well — he asks you to explain logic before modifying.
Practice the code change — adding a count variable in route and displaying it in template
For theory the sheet is enough

Questions remembered
  1. Show GitHub repo and collaborator
  2. Run the project from portal download
  3. Full demo — register company, register student, approve company, create drive, approve drive, apply for drive, select student, view from admin, blacklist/unblock student
  4. Code modification — show total number of drives a student has applied to (count in route + display in template)
  5. Difference between frontend and backend validation with examples
  6. What is ORM, are you using it, why, advantages
  7. What is venv and why do we use it
Sachiv MAD1

Be ready to code ,
For theory questions this sheet is enough
In depth knowledge about models and routes helps

Questions remembered
  1. 1.Asked to demo the project no interruptions 2.Asked to add a feature in student dashboard to display no of applications approved for the student 3.Then generic questions like http request, use of venv, frontend backend validation with example
  2. Very chill guy no interrupts
  3. I explained all pages and routes deeply so the total viva took 35 mins
Sheet response MAD1

He is very chill, answer confidently. If you don't know completely, finish what you know and tell what you dont know.

Questions remembered
  1. THIS IS FOR LEVEL 1
  2. - asked for github collaborators
  3. - ID card
  4. - Schema diagram
  5. - checksum validation and pasting
  6. - What is ORM
  7. - Can you show if only approved drives are seen by the student?
  8. - How do you ensure that a student can apply only once
  9. - How is ORM being implemented and what is the name of the library that does it
  10. - Backend validation and frontend validation with examples
  11. - Code change -> asked how to add a column that gets the number of applications put by a student for different drives
M.K. MAD1

Know your code.
He asks almost same theory to everyone( Check other entries).
But he will give coding task.

Questions remembered
  1. Show collaborator on GitHub.
  2. Show your app.
  3. Show functionalities of all users( Admin, 1 Doctor, 1 patient)-- this will be checked in depth: -- register patient, --register a new doctor, --book an appointment, --cancel+ reschedule an appointment, --check if you can do multiple appointments at the same time. --check if a patient can access their prescription. --check if doctor can access their treatments. --check if doctor can change their availability.
  4. What is the primary key of each model(in the code).
  5. Write a code to show the list of all doctors, their departments, their experience in years on the landing page(this list was not on my landing page).
  6. Show how your changes are getting updated dynamically. Theory:
  7. Explain all HTTP methods
  8. Explain cascade.
  9. Explain how you are doing backend validation.
omen MAD1

honestly very cool person gave time to think helped to implement stuff and help understand clearly what he is asking and if any functionality is missing would say to you to implement that on spot make sure everything is implemented if not then just learn how to do them so you can during the viva

Questions remembered
  1. Show your code and start demonstration.
  2. Differentiate between frontend and backend validation.
  3. what is jinja
  4. how relations are implemented
  5. He asked examples for everything. 6.cascading in database 7.security implemented if not how will u implement it 8.if any core functionality is missing then implement it
Sheet response MAD1

Proctor is friendly. Prepare all the questions asked by him present in this sheet .

Questions remembered
  1. Demo
  2. Explain Models
  3. About security functionality
  4. Jinja-2
  5. Put & Post
  6. Cascade
Anonymus MAD1

Shared viva questions from response sheet: Show your code and start demonstration.; Differentiate between frontend and backend validation.; PUT vs PATCH

Questions remembered
  1. Show your code and start demonstration.
  2. Differentiate between frontend and backend validation.
  3. PUT vs PATCH
  4. Which Database you are Using
  5. He asked examples for everything.

Approved viva sets

  1. 1
    Chill proctor
    Times asked 2
  2. 2
    - Show GitHub id
    Times asked 1
  3. 3
    - Run project and give a demo
    Times asked 2
  4. 4
    - Login as admin
    Times asked 2
  5. 5
    - Create 2 doctors and log in each account to provide availability
    Times asked 2
  6. 6
    - Try to book the same slot from one doctor (edge case)
    Times asked 2
  7. 7
    - Some more edge cases were tested like deleting a doctor, update patient profile, treatment, etc.
    Times asked 1
  8. 8
    - Show celery tasks working.
    Times asked 2
  9. 9
    Duration ~15min
    Times asked 2
Advice: Chill proctor, just make sure to understand your code and check if redis and celery are working or not.
  1. 1
    Axios kya hota hh
    Times asked 2
  2. 2
    Authentication and authorisation diff
    Times asked 2
  3. 3
    Cache ka implement Kiya haii
    Times asked 2
  4. 4
    Bss
    Times asked 2
  5. 5
    No code changes
    Times asked 2
  6. 6
    Direct he started with checking edge in last he case these ques which I have mention above
    Times asked 2
  7. 7
    Aur edge me saari functionality test ki thi agar patient block kar de toh login kar skta haii ki nhi
    Times asked 2
  8. 8
    Can admin Search doc pat
    Times asked 2
  9. 9
    2 Patient can book same doc at same
    Times asked 2
  10. 10
    CSV export fucntionaly
    Times asked 2
  11. 11
    Email bejo
    Times asked 2
  12. 12
    He was chill aram se ho gyaa
    Times asked 2
Advice: Just beware of code you have written he will ask from code you have written
  1. 1
    *Viva level1_14* (level 1 viva)
    Times asked 2
  2. 2
    Duration - 11:55 pm - 12:49 pm (54 mins)
    Times asked 2
  3. 3
    Collaborator id check
    Times asked 2
  4. 4
    Id card
    Times asked 8
  5. 5
    App Demo - 35+ minutes (checks each & every feature)
    Times asked 2
  6. 6
    Asking show me this code that code
    Times asked 2
  7. 7
    Asked about authentications, JWT, API, backend ops, caching, and Redis implementation in the code.
    Times asked 2
  8. 8
    4 questions -
    Times asked 2
  9. 9
    Restful api
    Times asked 3
  10. 10
    Https headers
    Times asked 2
  11. 11
    Life cycle hooks show where it is implemented
    Times asked 2
  12. 12
    Very calm & patient proctor and gives advice as well. Technically, the best proctor I found. No coding. Gave advice at the end.
    Times asked 2
Advice: Explain all features in details while doing demo.
  1. 1
    - first demo your 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.

  2. 2
    - update to show phone number on student dashboard with name
    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
    - how would you let students reapply to jobs they have been rejected from
    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.

  4. 4
    - say your app scales to 1B users, would you do horizontal or vertical scaling
    Times asked 1
    Official solution

    SimpleVertical badi machine. Horizontal aur boxes + load balancer. JWT stateless horizontal friendly.

    10k users: Postgres, Redis, gunicorn, CDN, pagination, indexes.
    Millions: replicas, queue partition, more workers.

    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: Course app vertical enough. Design answer scale-out.

  5. 5
    - what security improvements would you do
    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.

Advice: considerate examiner as long as you are moderately aware of your project
  1. 1
    download the zip from the portal and proceed to demonstrate the application workflow from student registration , company registration , drive creation till student selection
    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
    modify the student dashboard to display the student name also along with recent updates(displayed already)
    Times asked 1
    Official solution

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

Advice: Nice proctor , follow his instructions and try to know your code as much as possible
  1. 1
    difference between backref and back populated.
    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')
  2. 2
    what is venv and what are its advantages 4.checked my model.py
    Times asked 1
    Official solution

    SimpleVirtualenv isolated Python env — project deps system Python ko nahi bigaadte.

    Example

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
  3. 3
    all demonstration.
    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
    i have some issue with search bar so resolved it there.
    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: be confident and try all to express your logic proctor was real sweet and kind .all the veryy best
  1. 1
    Full demo — register company, register student, approve company, create drive, approve drive, apply for drive, select student, view from admin, blacklist/unblock student
    Times asked 1
    Official solution

    SimpleBlacklist/block: user.status='blocked' check login/booking pe. Temporary flag vs hard delete permanent.

  2. 2
    Code modification — show total number of drives a student has applied to (count in route + display in template)
    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 is venv and why do we use it
    Times asked 1
    Official solution

    SimpleVirtualenv isolated Python env — project deps system Python ko nahi bigaadte.

    Example

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
Advice: Proctor is very chill and guides you through the demo step by step Know your code well — he asks you to explain logic before modifying. Practice the code change — adding a count variable in route and displaying it in template For theory the sheet is enough
  1. 1
    Very chill guy no interrupts
    Times asked 1
    Official solution

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

  2. 2
    I explained all pages and routes deeply so the total viva took 35 mins
    Times asked 1
    Official solution

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

Advice: Be ready to code , For theory questions this sheet is enough In depth knowledge about models and routes helps
  1. 1
    THIS IS FOR LEVEL 1
    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
    - Schema diagram
    Times asked 1
    Official solution

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

  3. 3
    - checksum validation and pasting
    Times asked 1
    Official solution

    SimpleValidation = input rules: required, email format, length, unique. Frontend UX, backend security — dono.

    Example

    if not email or '@' not in email:
        flash('Invalid email')
        return redirect(request.url)
    if User.query.filter_by(email=email).first():
        flash('Email taken')
  4. 4
    - What is ORM
    Times asked 2
    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
    - Can you show if only approved drives are seen by the student?
    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.

  6. 6
    - How do you ensure that a student can apply only once
    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.

  7. 7
    - Backend validation and frontend validation with examples
    Times asked 1
    Official solution

    SimpleValidation = input rules: required, email format, length, unique. Frontend UX, backend security — dono.

    Example

    if not email or '@' not in email:
        flash('Invalid email')
        return redirect(request.url)
    if User.query.filter_by(email=email).first():
        flash('Email taken')
  8. 8
    - Code change -> asked how to add a column that gets the number of applications put by a student for different drives
    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.

Advice: He is very chill, answer confidently. If you don't know completely, finish what you know and tell what you dont know.
  1. 1
    Show your 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.

  2. 2
    Show functionalities of all users( Admin, 1 Doctor, 1 patient)-- this will be checked in depth: -- register patient, --register a new doctor, --book an appointment, --cancel+ reschedule an appointment, --check if you can do multiple appointments at the same time. --check if a patient can access their prescription. --check if doctor can access their treatments. --check if doctor can change their availability.
    Times asked 1
    Official solution

    SimpleEdge cases: duplicate booking, full capacity, wrong role URL, empty search, invalid id.

    Example

    if Spot.query.get_or_404(spot_id).status != 'available':
        flash('Already taken')
        return redirect(...)
  3. 3
    What is the primary key of each model(in the code).
    Times asked 1
    Official solution

    SimplePrimary key row ka unique identity — usually id Integer autoincrement.

    Example

    id = db.Column(db.Integer, primary_key=True)
  4. 4
    Write a code to show the list of all doctors, their departments, their experience in years on the landing page(this list was not on my landing page).
    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
    Show how your changes are getting updated dynamically. Theory:
    Times asked 1
    Official solution

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

  6. 6
    Explain all HTTP methods
    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.

  7. 7
    Explain how you are doing backend validation.
    Times asked 1
    Official solution

    SimpleValidation = input rules: required, email format, length, unique. Frontend UX, backend security — dono.

    Example

    if not email or '@' not in email:
        flash('Invalid email')
        return redirect(request.url)
    if User.query.filter_by(email=email).first():
        flash('Email taken')
Advice: Know your code. He asks almost same theory to everyone( Check other entries). But he will give coding task.
  1. 1
    what is jinja
    Times asked 2
    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 %}
  2. 2
    how relations are implemented
    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.

Advice: honestly very cool person gave time to think helped to implement stuff and help understand clearly what he is asking and if any functionality is missing would say to you to implement that on spot make sure everything is implemented if not then just learn how to do them so you can during the viva
  1. 1
    Explain Models
    Times asked 1
    Official solution

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

    Suggested flow1) Classes list karo
    2) Har table ka kaam 1 line
    3) Relationships (1-M / M-M)
    4) Constraints (unique, nullable)

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  2. 2
    About security functionality
    Times asked 1
    Official solution

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

  3. 3
    Jinja-2
    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 %}
  4. 4
    Put & Post
    Times asked 1
    Official solution

    SimplePOST naya janam (har baar naya id). PUT poori photo replace. PATCH sticker chipkao.

    POST create, not idempotent. PUT full update, idempotent. PATCH partial.

    POST ki jagah PUT se REST semantics toot. GET typically no body.

    CRUD map: POST create, GET read, PUT/PATCH update, DELETE delete.

    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.

    Example

    POST /api/venues
    PUT  /api/venues/1   {all fields}
    PATCH /api/venues/1 {only name}

    Project example: POST /api/venues create. PUT /venues/1 saari fields. PATCH sirf name.

  5. 5
    Cascade
    Times asked 1
    Official solution

    SimpleCascade parent delete pe children pe kya ho: delete-orphan related rows hata deta hai.

    Example

    db.relationship('Spot', cascade='all, delete-orphan')

    Viva tipParking lot delete → uske spots/bookings policy clear bolo.

Advice: Proctor is friendly. Prepare all the questions asked by him present in this sheet .
  1. 1
    Show your code and start demonstration.
    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
    Differentiate between frontend and backend validation.
    Times asked 1
    Official solution

    SimpleValidation = input rules: required, email format, length, unique. Frontend UX, backend security — dono.

    Example

    if not email or '@' not in email:
        flash('Invalid email')
        return redirect(request.url)
    if User.query.filter_by(email=email).first():
        flash('Email taken')
  3. 3
    PUT vs PATCH
    Times asked 2
    Official solution

    SimplePOST naya janam (har baar naya id). PUT poori photo replace. PATCH sticker chipkao.

    POST create, not idempotent. PUT full update, idempotent. PATCH partial.

    POST ki jagah PUT se REST semantics toot. GET typically no body.

    CRUD map: POST create, GET read, PUT/PATCH update, DELETE delete.

    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.

    Example

    POST /api/venues
    PUT  /api/venues/1   {all fields}
    PATCH /api/venues/1 {only name}

    Project example: POST /api/venues create. PUT /venues/1 saari fields. PATCH sirf name.

  4. 4
    Which Database you are Using
    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'
  5. 5
    He asked examples for everything.
    Times asked 1
    Official solution

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

  1. 1
    Chill proctor
    Times asked 2
    Official solution

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

  2. 2
    - Run project and give a demo
    Times asked 2
    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
    - Login as admin
    Times asked 2
    Official solution

    Yeh feature demo hai. Account ready rakho, steps bol ke dikhao.

    Role ke hisaab login → action (create/approve/book) → DB/UI pe result → edge case (fail when slots=0 / blacklisted).
    Do browser windows: admin + user. Search/filter alag se dikhao.
    Agar feature nahi hai to sach bolo aur 2 minute mein kaise add karoge (query + template) explain karo.

  4. 4
    - Create 2 doctors and log in each account to provide availability
    Times asked 2
    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
    - Log in as patient
    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.

  6. 6
    - Try to book the same slot from one doctor (edge case)
    Times asked 2
    Official solution

    SimpleEdge cases: duplicate booking, full capacity, wrong role URL, empty search, invalid id.

    Example

    if Spot.query.get_or_404(spot_id).status != 'available':
        flash('Already taken')
        return redirect(...)
  7. 7
    - Demonstrate Search functionality
    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.

  8. 8
    - Show celery tasks working.
    Times asked 2
    Official solution

    SimpleCelery = background naukri. HTTP request ko 10 second email bhejne ke liye mat rokna.

    Distributed task queue: aap function ko abhi nahi, worker process mein later/retry/schedule pe chalaate ho.

    MAD2 typical jobs: daily reminder mail, monthly HTML report, user-triggered CSV export.

    Web request 200ms hona chahiye. 10,000 emails request thread mein = timeout. Worker alag CPU pe kaam kare.

    Redis broker chahiye. Beat alag process schedule ke liye.

    Example

    @celery.task
    def daily_reminder():
        for u in User.query.filter_by(active=True):
            send_mail(u.email, 'Book something today!')

    Project example: User Export click → 202 Accepted. Worker CSV + email. Daily 6pm Beat reminder.

    Viva tipWorker + Redis bina Beat ke user-triggered chalega. Scheduled jobs ke liye Beat bhi chahiye.

  9. 9
    - Explain code for caching and where you have used it
    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.

  10. 10
    - Explain code for login handling in Vue.
    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.

  11. 11
    Duration ~15min
    Times asked 2
    Official solution

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

Advice: Chill proctor, just make sure to understand your code and check if redis and celery are working or not.
  1. 1
    Axios kya hota hh
    Times asked 2
    Official solution

    SimpleAxios JS HTTP client — fetch ka convenient wrapper. Promises, JSON auto, interceptors.

    Example

    axios.get('/api/lots', { headers: { Authorization: 'Bearer ' + token } })
      .then(res => console.log(res.data))
  2. 2
    Local storage
    Times asked 1
    Official solution

    Simplewindow.localStorage key-value strings origin persist. Advantages: persist 5MB simple. Nuksaan XSS no expiry strings.

    What is Local Storage. Advantages.

    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: setItem token.

  3. 3
    Authentication and authorisation diff
    Times asked 2
    Official solution

    SimpleAuthentication: tu kaun hai? (login). Authorization: tujhe permission hai? (role check).

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
  4. 4
    Cache ka implement Kiya haii
    Times asked 2
    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.

  5. 5
    Bss
    Times asked 2
    Official solution

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

  6. 6
    No code changes
    Times asked 2
    Official solution

    Yeh MAD-1 viva question tumhare project ke context se linked hai. Short answer is structure se do:

    Pehle 1 line definition/purpose, phir tumhare project ka example, phir chhota code/flow.

    Typical Flask flowBrowser request → @app.route controller → SQLAlchemy model/DB → Jinja template response.

    Auth: session['user_id'] + role check. CRUD: add/commit, query.all, field update, delete.
    Live change maange to: related model → route → template, phir browser refresh karke dikhao.

    Example (generic create):
    obj = Model(name=request.form.get('name'))

    db.session.add(obj); db.session.commit()
    return redirect(url_for('list_view'))
  7. 7
    Direct he started with checking edge in last he case these ques which I have mention above
    Times asked 2
    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.

  8. 8
    Aur edge me saari functionality test ki thi agar patient block kar de toh login kar skta haii ki nhi
    Times asked 2
    Official solution

    SimpleBlacklist/block: user.status='blocked' check login/booking pe. Temporary flag vs hard delete permanent.

  9. 9
    Can admin Search doc pat
    Times asked 2
    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()
  10. 10
    2 Patient can book same doc at same
    Times asked 2
    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.

  11. 11
    CSV export fucntionaly
    Times asked 2
    Official solution

    SimpleClick → Celery → worker CSV → email/download. Columns verify.

    csv module. Auth required. Don't freeze UI — 202 + poll.

    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.

    Example

    @celery.task
    def export_venues_csv(user_id):
        rows = Venue.query.all()
        # csv.writer, mail.send
        return 'ok'

    Project example: Admin export venues. MailHog attach ya file open.

    Viva tipNetwork tab mein job trigger API dikhao, phir MailHog/file open karke columns verify karo.

  12. 12
    Email bejo
    Times asked 2
    Official solution

    SimpleSMTP = Simple Mail Transfer Protocol — email bhejne ka standard. Flask-Mail / smtplib se reminders/reports.

    Example

    from flask_mail import Message
    msg = Message('Subject', recipients=[user.email])
    msg.body = 'Hello'
    mail.send(msg)

    Viva tipViva mein MailHog/inbox dikhao. Port 587 TLS common; local pe MailHog 1025.

  13. 13
    Profile update
    Times asked 1
    Official solution

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

  14. 14
    He was chill aram se ho gyaa
    Times asked 2
    Official solution

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

Advice: Just beware of code you have written he will ask from code you have written
  1. 1
    *Viva level1_14* (level 1 viva)
    Times asked 2
    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
    Duration - 11:55 pm - 12:49 pm (54 mins)
    Times asked 2
    Official solution

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

  3. 3
    Github
    Times asked 2
    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.

  4. 4
    Collaborator id check
    Times asked 2
    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
    Id card
    Times asked 8
    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.

  6. 6
    App Demo - 35+ minutes (checks each & every feature)
    Times asked 2
    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
    Asking show me this code that code
    Times asked 2
    Official solution

    SimpleCode dikhao to pehle related file: models → route → template. Flow explain karte hue lines padho.

  8. 8
    Asked about authentications, JWT, API, backend ops, caching, and Redis implementation in the code.
    Times asked 2
    Official solution

    SimpleAuthentication: tu kaun hai? (login). Authorization: tujhe permission hai? (role check).

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
  9. 9
    4 questions -
    Times asked 2
    Official solution

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

  10. 10
    Restful api
    Times asked 3
    Official solution

    SimpleREST: resources + HTTP verbs. GET read, POST create, PUT/PATCH update, DELETE remove. Stateless ideal.

  11. 11
    Https headers
    Times asked 2
    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.

  12. 12
    Why caching is used
    Times asked 1
    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.

  13. 13
    Life cycle hooks show where it is implemented
    Times asked 2
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  14. 14
    Very calm & patient proctor and gives advice as well. Technically, the best proctor I found. No coding. Gave advice at the end.
    Times asked 2
    Official solution

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

Advice: Explain all features in details while doing demo.
  1. 1
    Explain your notebook/project.
    Times asked 21
  2. 2
    Explain each section of your notebook.
    Times asked 1
  3. 3
    How did you use Pipeline?
    Times asked 1
  4. 4
    What is Cross Validation (CV)?
    Times asked 2
  5. 5
    How does Cross Validation work?
    Times asked 2
  6. 6
    What resources did you use?
    Times asked 2
  7. 7
    Which is your best model?
    Times asked 1
  8. 8
    Why is it your best model?
    Times asked 2
  9. 9
    What is Hyperparameter Tuning?
    Times asked 4
  10. 10
    Which Hyperparameter Tuning technique did you use?
    Times asked 1
  11. 11
    Explain Bagging.
    Times asked 6
  12. 12
    Explain Boosting.
    Times asked 6
  13. 13
    Explain the Hyperparameter Tuning section.
    Times asked 1
  14. 14
    What is the learning rate?
    Times asked 3
  15. 15
    Where and why is the learning rate used?
    Times asked 1
  16. 16
    Coding: Load the dataset.
    Times asked 1
  17. 17
    Coding: Filter rows where ManufactureYear > 2005.
    Times asked 1
  18. 18
    Coding: For the filtered dataset, find the distribution of the UtilizationTier column.
    Times asked 1
  19. 19
    Suggestion: Add insights for each model using graphs or tables.
    Times asked 1
  20. 20
    Suggestion: Revise MLT theory and practice live coding for Level 2.
    Times asked 1
  1. 1
    Show your GitHub repository and collaborator.
    Times asked 16
    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.

  2. 2
    Show your Student ID.
    Times asked 2
    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.

  3. 3
    Run the project.
    Times asked 1
    Official solution

    SimpleMAD2 orchestra: Redis, Flask, Vue, worker, beat — 5 terminals.

    Ports: Flask 5000, Vite 8080/5173, Redis 6379. CORS isliye.

    Order: Redis first. Worker bina Redis fail. Beat bina worker queue bharti.

    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.

    Example

    redis-server
    flask run --port 5000
    npm run serve
    celery -A app.celery worker -l info
    celery -A app.celery beat -l info

    Project example: README local_run. Dikhao 5 processes + browser two roles.

    Viva tipPorts batao: Flask 5000, Vite 8080/5173, Redis 6379. CORS isi liye chahiye.

  4. 4
    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.

  5. 5
    Explain the code for the features the examiner asks about.
    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.

  6. 6
    Demonstrate backend jobs (Celery).
    Times asked 1
    Official solution

    SimpleLive jobs: Redis, worker, beat, crontab abhi, logs + email/CSV.

    Scheduled vs user-triggered dono dikhao. Missing feature honestly.

    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.

    Suggested flow1) redis
    2) worker
    3) beat
    4) crontab now
    5) logs + MailHog

    Example

    CELERY_BEAT_SCHEDULE = {
      'daily-reminder': {
        'task': 'jobs.daily_reminder',
        'schedule': crontab(hour=18, minute=0),
      },
    }

    Project example: Change schedule current time. MailHog. Export button 202.

  7. 7
    Demonstrate CSV export.
    Times asked 2
    Official solution

    SimpleClick → Celery → worker CSV → email/download. Columns verify.

    csv module. Auth required. Don't freeze UI — 202 + poll.

    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.

    Example

    @celery.task
    def export_venues_csv(user_id):
        rows = Venue.query.all()
        # csv.writer, mail.send
        return 'ok'

    Project example: Admin export venues. MailHog attach ya file open.

    Viva tipNetwork tab mein job trigger API dikhao, phir MailHog/file open karke columns verify karo.

  8. 8
    Send an email from the application.
    Times asked 2
    Official solution

    SimpleSMTP + template + Celery. MailHog inbox dikhao, Gmail nahi chahiye.

    Dynamic HTML user name. Live: schedule now.

    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.

    Example

    msg = Message(subject='Daily reminder', recipients=[user.email])
    msg.html = render_template('reminder.html', user=user)
    mail.send(msg)

    Project example: reminder.html Jinja. tasks send_mail.

    Viva tipLive demo ke liye Celery beat crontab current time pe set karo, worker + beat dono chalu rakho.

  9. 9
    Demonstrate the search functionality.
    Times asked 4
    Official solution

    SimpleSearch demo cases.

    See earlier essay.

    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.

    Example

    q = request.args.get('q', '').strip()
    items = Venue.query.filter(Venue.name.ilike(f'%{q}%')).all()
    return jsonify([v.serialize() for v in items])

    Project example: UI + API.

    Viva tipEmpty search, no-match, case-insensitive (ilike) teen cases dikhao.

  10. 10
    Explain the login flow in the Vue frontend.
    Times asked 1
    Official solution

    SimpleLogin flow pehle poochta hai "tu kaun hai?", token milne ke baad har API pe wohi proof dikhate ho.

    Authentication step: Vue form email + password JSON POST karta hai. Flask user dhoondhta hai, check_password_hash se prove karta hai ki tum genuine ho. Galat 401. Sahi pe JWT + role milta hai — yeh session/token hai.

    Vue localStorage (ya cookie) mein token rakhta hai, dashboard pe router.push. Aage ki har fetch header: Authorization: Bearer <token>. @jwt_required identity check (authentication). @roles_required('admin') permission check (authorization) — logged in ho, lekin allowed nahi to 403.

    Validation alag cheez hai: empty email, password 8+ — form sahi bhara hai ya nahi. Woh identity prove nahi karta.

    Logout = client token delete + login page. Server blacklist optional. Password response JSON mein kabhi mat bhejo.

    Example

    # Authentication
    @app.route('/api/login', methods=['POST'])
    def login():
        u = User.query.filter_by(email=data['email']).first()
        if not u or not check_password_hash(u.password, data['password']):
            return jsonify(msg='bad'), 401
        return jsonify(token=create_access_token(u.id), role=u.role)
    
    # baad ki APIs
    # Authorization: Bearer <token>
    if current_user.role != 'admin':
        abort(403)

    Project example: Login.vue POST /api/login → token LS → interceptor. Student token se admin route = 403. Empty form = validation, galat password = 401.

    Viva tipNetwork tab mein password body dikhega localhost pe — prod HTTPS. Response mein hash/password echo mat karo.

  11. 11
    Can two patients book the same doctor at the same time?
    Times asked 1
    Official solution

    SimpleShould not if unique slot PK. Two patients same doctor time prevented.

    Can two patients same time.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Project example: Demo second 400.

  12. 12
    Can a blocked patient still log in?
    Times asked 1
    Official solution

    SimpleAgar flag login pe check hai to nahi. Demo set flag 403.

    Can blocked patient still log in? Should not.

    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: Postman login after blacklist.

    Project example: Postman login after blacklist.

  13. 13
    Can the admin search for doctors and patients?
    Times asked 1
    Official solution

    SimpleAdmin API ilike name doctor/patient role check. Can admin search doctors patients?

    If built demo. Else would add q=.

    MAD2 architecture: Vue SPA (client) → HTTP JSON → Flask API (server) → SQLAlchemy DB. Side path: Flask → Redis broker → Celery worker → MailHog/CSV.

    Client-server alag ports. State: Vue memory + LS token. Persistent: SQLite. Cache: Redis. MVC-ish: models.py, API views, Vue templates.

    Scale: more workers, Postgres, cache, not 'bigger SQLite file'.

    Project example: Admin search component.

  14. 14
    What happens if a doctor is deleted?
    Times asked 1
    Official solution

    SimpleAppointments cascade or block. Show ondelete. Patients reassign.

    What happens if doctor deleted.

    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: Domain-specific same FK idea.

    Project example: Domain-specific same FK idea.

  15. 15
    Demonstrate profile update functionality.
    Times asked 1
    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.

  16. 16
    Demonstrate treatment-related functionality.
    Times asked 1
    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.

  17. 17
    Verify that duplicate booking is prevented logically and technically.
    Times asked 1
    Official solution

    SimpleDoosri booking same slot: unique constraint + query.exists + 400 message.

    Frontend disable UX. Backend source of truth. Race: two users unique(slot).

    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.

    Example

    if Booking.query.filter_by(user_id=uid, slot_id=sid).first():
        return jsonify(message='Already booked'), 400

    Project example: Click book twice. Second 400 Already booked. DB unique.

  18. 18
    What type of authentication have you implemented?
    Times asked 1
    Official solution

    SimpleToken JWT / Security token + RBAC. Session if used clearly. What type authentication.

    What authentication mechanism. Token type JWT. Which library requirements.txt.

    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: flask-jwt-extended or flask-security-too.

  19. 19
    Difference between Authentication and Authorization.
    Times asked 20
    Official solution

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

    Authentication: login. Username + password check karke prove karte ho ki tum genuine user ho. Success pe session/token milta hai.
    Authorization: uske baad role check. Admin hi parking lot / venue / drive delete kar sakta hai, normal user nahi.

    MAD2 mein yeh alag layers hain: login API = authentication (JWT milta hai). @roles_required('admin') ya Vue v-if="isAdmin" = authorization.

    Validation alag cheez hai (form sahi bhara hai ya nahi, jaise age 18+). Authentication identity hai, authorization permission, validation input quality.

    Example

    # Authentication
    if user and check_password_hash(user.password, form_password):
        token = create_access_token(identity=user.id)
    
    # Authorization
    if current_user.role != 'admin':
        abort(403)  # logged in ho, lekin allowed nahi

    Project example: Student login = authentication. Student admin dashboard nahi khol sakta = authorization. Frontend button hide sirf UX hai — asli check backend pe hona chahiye.

    Viva tip401 = not logged in / bad token. 403 = logged in, role galat. Examiner yeh difference bahut poochta hai.

  20. 20
    What type of token are you using (e.g., JWT)?
    Times asked 1
    Official solution

    SimpleJWT HS256 flask-jwt-extended / security token. Named library.

    Which library token generation / token-based.

    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: requirements.txt line.

  21. 21
    Show where JWT/authentication is implemented.
    Times asked 1
    Official solution

    Simplecreate_access_token, @jwt_required, frontend header. Show where JWT/Flask-Security.

    Open three places.

    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 resources login.vue.

  22. 22
    What are RESTful APIs?
    Times asked 2
    Official solution

    SimpleREST: resource URLs, HTTP verbs, stateless, JSON. /venues/1 not /getVenue?id=1.

    Stateless: har request token. Meaningful status. HATEOAS optional course.

    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

    @app.route('/api/venues/<int:id>', methods=['GET', 'PUT', 'DELETE'])
    def venue(id):
        v = Venue.query.get_or_404(id)

    Project example: MethodView/Resource GET POST PUT DELETE.

  23. 23
    What are HTTP headers?
    Times asked 2
    Official solution

    SimpleHeaders metadata chitthi ke upar: kaun bhej raha, kaisa data, token.

    Content-Type JSON, Authorization Bearer, Accept, CORS Origin.

    GET usually no body. POST JSON body + header.

    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.

    Example

    fetch(url, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': 'Bearer ' + token
      },
      body: JSON.stringify({ name: 'A' })
    })

    Project example: Network tab login POST headers. Later GET list Authorization.

  24. 24
    What are Vue Lifecycle Hooks?
    Times asked 5
    Official solution

    SimpleLifecycle = component ki zindagi ke stages. API call tab jab DOM ready ho — mounted.

    created: instance bani, this data, DOM nahi. mounted/onMounted: page pe aa gaya — fetch, Chart.js, setInterval.
    updated: data change ke baad. unmounted: cleanup (clearInterval) warna memory leak.

    Dashboards onMounted isliye: canvas/API tab valid. created mein $el nahi.

    Composition: onMounted(() => {}) setup ke andar.

    Example

    export default {
      async mounted() {
        const r = await fetch('/api/venues')
        this.venues = await r.json()
      }
    }

    Project example: Venues.vue mounted fetch list. Clock component unmounted pe interval clear.

    Viva tipcreated: data setup, DOM nahi. mounted/onMounted: $el mil gaya — fetch yahi. Dashboards isliye onMounted use karti hain.

  25. 25
    Show where lifecycle hooks are implemented.
    Times asked 1
    Official solution

    Simplemounted/onMounted block. Why not created. Show where implemented.

    Show frontend async await mounted.

    Lifecycle = component ki zindagi: created (instance, DOM nahi) → mounted/onMounted (DOM ready — fetch, Chart.js yahi) → updated → unmounted (clearInterval).

    Dashboard API created mein isliye nahi ki $el/canvas missing ho sakta. Composition API: onMounted(() => {}) setup ke andar. Options: mounted() method. Mix mat.

    Examiner 'konsa hook use kiya' — related .vue kholo, line padh ke bolo.

    Project example: Dashboard.vue.

  26. 26
    What is Axios?
    Times asked 2
    Official solution

    SimpleAxios HTTP library: JSON auto, interceptors, timeout. fetch built-in alternative.

    Na use kiya: 'fetch native, extra lib nahi' valid.
    Use kiya: interceptor mein token. Why didn't: deps kam.

    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.

    Example

    axios.get('/api/venues', { headers: { Authorization: 'Bearer ' + token } })

    Project example: axios.defaults.headers.common.Authorization. baseURL :5000.

    Viva tipNa use kiya to bolo: fetch native hai, extra lib nahi. Use kiya to interceptor mein token set karna dikhao.

  27. 27
    Explain the login handling code in Vue.
    Times asked 1
    Official solution

    SimpleLogin flow pehle poochta hai "tu kaun hai?", token milne ke baad har API pe wohi proof dikhate ho.

    Authentication step: Vue form email + password JSON POST karta hai. Flask user dhoondhta hai, check_password_hash se prove karta hai ki tum genuine ho. Galat 401. Sahi pe JWT + role milta hai — yeh session/token hai.

    Vue localStorage (ya cookie) mein token rakhta hai, dashboard pe router.push. Aage ki har fetch header: Authorization: Bearer <token>. @jwt_required identity check (authentication). @roles_required('admin') permission check (authorization) — logged in ho, lekin allowed nahi to 403.

    Validation alag cheez hai: empty email, password 8+ — form sahi bhara hai ya nahi. Woh identity prove nahi karta.

    Logout = client token delete + login page. Server blacklist optional. Password response JSON mein kabhi mat bhejo.

    Example

    # Authentication
    @app.route('/api/login', methods=['POST'])
    def login():
        u = User.query.filter_by(email=data['email']).first()
        if not u or not check_password_hash(u.password, data['password']):
            return jsonify(msg='bad'), 401
        return jsonify(token=create_access_token(u.id), role=u.role)
    
    # baad ki APIs
    # Authorization: Bearer <token>
    if current_user.role != 'admin':
        abort(403)

    Project example: Login.vue POST /api/login → token LS → interceptor. Student token se admin route = 403. Empty form = validation, galat password = 401.

    Viva tipNetwork tab mein password body dikhega localhost pe — prod HTTPS. Response mein hash/password echo mat karo.

  28. 28
    Why is caching used?
    Times asked 2
    Official solution

    SimpleCache isliye taaki 100 users same dashboard pe DB ko 100 baar na maror dein.

    Problem: repeated reads, slow page, extra load. Cache seconds ke liye snapshot deta hai.

    Nahi use karna: har second badalne wala live stock, user-private secret data bina soch ke (key mein user_id hona chahiye).

    Memoization caching ka subset hai (function args). HTTP 304 / browser cache alag layer.

    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: Shows list har user dekhta hai — perfect cache. Booking POST cache nahi — har baar write.

  29. 29
    Show where caching is implemented.
    Times asked 6
    Official solution

    SimpleDecorator + Redis ping + invalidation line + miss/hit demo idea.

    Kaunsi routes, timeout, key_prefix, query_string. POST pe nahi.

    print after set sirf miss. Timeout chhota karke expiry.

    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: resources list GET cached. create_venue delete key.

  30. 30
    Explain the caching code.
    Times asked 1
    Official solution

    SimpleKaunsi routes, timeout, key, invalidation, hit/miss demo.

    Stale story. print miss only.

    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: Open cached view + write delete.

  31. 31
    Explain how Redis is used.
    Times asked 1
    Official solution

    Simpledb indexes cache vs broker, ping, which keys, why used.

    Physical RAM. Vue nahi. Hit miss. Celery alag.

    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: config URLs + decorator + celery broker.

  32. 32
    What is Local Storage?
    Times asked 4
    Official solution

    Simplewindow.localStorage key-value strings origin persist. Advantages: persist 5MB simple. Nuksaan XSS no expiry strings.

    What is Local Storage. Advantages.

    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: setItem token.

  33. 33
    Which libraries have you used in your project?
    Times asked 1
    Official solution

    Simplerequirements.txt + package.json top ones. Which libraries used in project.

    6 names why.

    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 recite 40.

    Project example: Don't recite 40.

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