Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level1_133

Share your experience Add your viva experience here
155 Questions
12 Sets
0 Topics
8 Reviews
Tips for this examiner: Know your code

Student reviews

Neha Gawande MAD1

At last he ask if you have any questions for him. He is a good Procter.

Questions remembered
  1. What is greenlet in requirements.txt
  2. Show demo
  3. Asked ques in between
  4. Then said stop demo I understand all
  5. What is MVC explain through code
  6. Explain models.py and relationships, what is backref ,lazy=True, foreignkey, cascade
  7. What is Jinja templating
  8. What is orm
  9. What is render_template ?
  10. Explain login template flow?
  11. What is assigned_trek doing in staff dashboard it was a orm query data.
  12. Coding part ask to show current date and time on staff dashboard He was so kind and humble Procter, I was having network issue due to bad weather but he didn't say anything. He said it's fine no worries
Level 2 MAD1

Very sharp, yet chill. He has his cam on, and does small talks to calm the situation. Very responsive. Refer to sheet PYQs, he repeats most of the questions. Know jinja template and the the variables used to save values in the db (you'll get stuck if you dk)

Questions remembered
  1. Show ID
  2. Download from Portal
  3. Show demo
  4. Quickly noticed a flaw in my logout system
  5. Explain MVC and demonstrate its implementation in your code
  6. Routing Questions (explain entire routes)
  7. Explain Models (what is backref, lazy loading etc)
  8. How do you know 1-1 and 1-Many. Explain the basic relationships.
  9. What is foreign key
  10. Authentication vs Authorization
  11. What is Jinja
  12. What is Template inheritance
  13. Do you know Cascading? (No)
  14. How would you delete one job application without affecting others?
  15. Implementation :
  16. In the student dashboard, instead of heading being "Student Dashboard", make it "{{Name}}'s Dashboard"
  17. In the student dashboard, add current date and time. (He helped with the exact syntax of datetime library)
RK MAD1

He is very Nice, patient, encouraging and smart.
Know your code routing and html-jinja code.
All the theory concept. he repeats his question so if you do his previously asked question you will be able to crack the viva.

Questions remembered
  1. VIVA 2
  2. Checked ID - Downloaded the code directly from portal and ran it.
  3. Complete demo of the platform.
  4. Models- Their relationship.
  5. Explain routing in your code what is happening - Student Dashboard, Company/drive/delete.
  6. He had multiple followup questions while we were going through routing codes.
  7. Jinja, template inheritance, Hashing, Cascade, 1-1 and 1-many relationship and how do you know that. He is very encouraging and supportive when you answer.
  8. Code - Show the date on student dashboard, require changes frontend and backend.
Sheet response MAD1

Shared viva questions from response sheet: LEVEL 2 viva; 1.Id; 2.Git hub

Questions remembered
  1. LEVEL 2 viva
  2. 1.Id
  3. 2.Git hub
  4. 3.then he asked me to demostrate the project (i had already set up the environment by downloading the submitted file )
  5. 4.next he asked me to run the checksum file then i explained my application he asked few explanations like if had other functionalitites and all then we moved to code file
  6. 5.and asked me about MVC and that structure in my folder if i have implemented it
  7. 6.then asked to explain the database schema of few tables
  8. 7.Http request methods
  9. 8.difference between GET,PUT,POST
  10. 9.authentication vs authorization
  11. 10.if i had any idea about mysqlalchemy
  12. 11.template inheritance (i couldn't recollect but he guided me to tell it)
  13. 12.what is jinja template?
  14. 13.How asked about how my page worked like what is the process going on in the background
  15. 14.He asked for few modifications ( I couldn't get it properly but he waited patiently and guided when i struggled)
  16. 15.He gave a situation and asked what i could like "If a db error has occured how will you manage the situation" ans:exception handling can be implemented
Mayukh MAD1

Sir was so chill,,Idk if he will have same name or not,,If u get him,,dont be nervous..Study your Codes,,know every function,,and focus on app routing,,how to do what and all..at the end he even joked that why I was so nervous thinking Level2 is hard,although he went easy on me..

Questions remembered
  1. Joined before me and I joined 2 minutes before time.. Opened his facecam and had few conversation. then it starts:
  2. Download the course and do checksum
  3. Open the app,,During demonstration he addressed what he wants to see,,Plus you need to explain what is happening/what you are doing.
  4. asked me to make student and company,,asked to upload cv,,and create drive
  5. My frontend was bad,,so he moved to Backend,
  6. Asked what MVC is,,explain,show MVC in code..
  7. asked how models are connected, how relationship is created, what foreign key is
  8. What is lazy loading, what is backref and why we use it
  9. what is ORM,advantages
  10. Authentication vs Authorization
  11. Asked what Http methods are,,difference btw GET,POST and PUT
  12. asked me to explain Student Dashboard
  13. Asked me to explain Company CRUD methods(Apply,delete,update and all)
  14. asked what is Template Inheritance and how I used it?
  15. Asked what Jinja2 is,why and how we use
  16. What exactly Cascading Rules is,,expalin with example..
  17. If i used Rest API or not,(I didnt,so changed the topic)
  18. now Coding question- Fetch all student details In Company Dashboard using For loop by Jinja2 (applied+not-applied) and only print the name of the student..(basically he want me to print a student list registered in Portal,which I fumbled,even though he was spoonfeeding me and helping me throughout the process,,even asked me to check other routes to see how i did it,,but i failed in templates, so it wasnt showing) 18.What was password hashing,,how I implemented end. after viva,had few conversation,,gave feedback,,made jokes..Chillest proctor ever imo..
Level 2 viva MAD1

overall chill proctor no need to be nervous, just know your code and which part of code connects to which functionality. he gave me good feedback.

Questions remembered
  1. show demo
  2. explain models
  3. show MVC in code
  4. what is ORM
  5. explain different http requests
  6. explain one full route (student applying for drive route)
  7. explain relationships between drives table and applications table
  8. authentication vs authorization
  9. code change: display student roll number and current date and time on student dashboard
  10. explain how controller and view are working during registration
No need MAD1

The proctor was friendly. Just be chill and answer..

Questions remembered
  1. Demo(stopped me in between)
  2. What is MVC and show in code
  3. What is ORM and show in code
  4. authentication vs authorization
  5. asked me to change the code to show date and student name on dashboard
  6. asked about cascade delete and cascade update
  7. what is horizontal scaling? (i didn't know this)
  8. asked me about different parts of code
  9. asked to explain all http method
  10. jinja for loop
  11. my viva got over in 25mins...
N MAD1

Know your code

Questions remembered
  1. .Demo, stoped in between
  2. . Show MVC in code.
  3. . Show models, what thas cascade delete do, other forms of cascade( that I didn't know)
  4. . explain full flow of students dashboard, i.e, what happens after login ( brouser -> controler -> database query -> so on)
  5. .asked about some parts of code what they do.
  6. . Code change, in student dashboard display student name and today date.
  7. . Some ui questions

Approved viva sets

  1. 1
    Level 2 Viva
    Times asked 2
  2. 2
    ID check, then download from portal.
    Times asked 2
  3. 3
    Setup the project. (I have used shell scipts for setup, he was asking how do you know shell scripts? Show me all scripts ....)
    Times asked 2
  4. 4
    Show me how and where you are using celery?
    Times asked 2
  5. 5
    In answers, I said I have exposed 2 different endpoints which are triggered by 2 buttons in frontend, he directly asked show me the endpoints.
    Times asked 2
  6. 6
    Show the implementation(demo) of async tasks by clicking on those button.
    Times asked 2
  7. 7
    Now start the demo ....
    Times asked 2
  8. 8
    I was showing quiz, he asked *What happend when i refreshed the page in between of quiz?*
    Times asked 2
  9. 9
    In admin search i have diplayed both deleted and non deleted chapters/subjects/questions. He asked create a checkbox named "deleted", if it is marked show all deleted if not then only not deleted items.
    Times asked 2
  10. 10
    (Backend jobs) How mails data is dynamically genrated?
    Times asked 2
  11. 11
    How you are sending auth token each time? (In headers from vuex state.store)
    Times asked 1
  12. 12
    Show me where you have delcared all routes?
    Times asked 2
  13. 13
    How vue.js know these routes?
    Times asked 2
  14. 14
    Entry point of frontend? (He taught i didn't run frontend seprately) (my frontend and backend were running on same port so i was explained that ...)
    Times asked 2
Advice: Amazing Proctor, If you are saying anything just be confident and do very very go basics basics. Hard Procter!, for my case he was more to frontend.
  1. 1
    What is greenlet in requirements.txt
    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.

  2. 2
    Asked ques in between
    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.

  3. 3
    Then said stop demo I understand all
    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
    What is MVC explain through code
    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.

  5. 5
    What is render_template ?
    Times asked 1
    Official solution

    Simplerender_template Jinja HTML file ko data deke final HTML banata hai.

    Example

    return render_template('dashboard.html', user=user, lots=lots)
  6. 6
    Explain login template flow?
    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
    What is assigned_trek doing in staff dashboard it was a orm query data.
    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
  8. 8
    Coding part ask to show current date and time on staff dashboard He was so kind and humble Procter, I was having network issue due to bad weather but he didn't say anything. He said it's fine no worries
    Times asked 1
    Official solution

    SimpleLive coding: notepad/editor mein chhota Flask route / Jinja loop / model field. Calm raho, run karke dikhao.

Advice: At last he ask if you have any questions for him. He is a good Procter.
  1. 1
    Quickly noticed a flaw in my logout system
    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.

  2. 2
    Explain MVC and demonstrate its implementation in your code
    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
    Routing Questions (explain entire routes)
    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
    How do you know 1-1 and 1-Many. Explain the basic relationships.
    Times asked 1
    Official solution

    Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  5. 5
    Do you know Cascading? (No)
    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.

  6. 6
    In the student dashboard, instead of heading being "Student Dashboard", make it "{{Name}}'s Dashboard"
    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.

  7. 7
    In the student dashboard, add current date and time. (He helped with the exact syntax of datetime library)
    Times asked 1
    Official solution

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

Advice: Very sharp, yet chill. He has his cam on, and does small talks to calm the situation. Very responsive. Refer to sheet PYQs, he repeats most of the questions. Know jinja template and the the variables used to save values in the db (you'll get stuck if you dk)
  1. 1
    Checked ID - Downloaded the code directly from portal and ran it.
    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
    Complete demo of the platform.
    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
  3. 3
    Models- Their relationship.
    Times asked 1
    Official solution

    Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  4. 4
    Explain routing in your code what is happening - Student Dashboard, Company/drive/delete.
    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.

  5. 5
    He had multiple followup questions while we were going through routing codes.
    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.

  6. 6
    Code - Show the date on student dashboard, require changes frontend and backend.
    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: He is very Nice, patient, encouraging and smart. Know your code routing and html-jinja code. All the theory concept. he repeats his question so if you do his previously asked question you will be able to crack the viva.
  1. 1
    1.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.

  2. 2
    2.Git hub
    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.

  3. 3
    5.and asked me about MVC and that structure in my folder if i have implemented it
    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.

  4. 4
    10.if i had any idea about mysqlalchemy
    Times asked 1
    Official solution

    SimpleSQLAlchemy MAD1 ka common ORM. Flask-SQLAlchemy wrapper se db.Model, db.session.

    Example

    user = User(email='a@b.com')
    db.session.add(user)
    db.session.commit()
    users = User.query.filter_by(role='admin').all()
  5. 5
    11.template inheritance (i couldn't recollect but he guided me to tell it)
    Times asked 1
    Official solution

    SimpleBase template pe navbar/footer, child pages {% extends %} + {% block %} se content bharte hain. DRY.

    Example

    {# base.html #}
    {% block content %}{% endblock %}
    
    {# home.html #}
    {% extends 'base.html' %}
    {% block content %}
      <h1>Home</h1>
    {% endblock %}
  6. 6
    13.How asked about how my page worked like what is the process going on in the background
    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.

  7. 7
    14.He asked for few modifications ( I couldn't get it properly but he waited patiently and guided when i struggled)
    Times asked 1
    Official solution

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

  8. 8
    15.He gave a situation and asked what i could like "If a db error has occured how will you manage the situation" ans:exception handling can be implemented
    Times asked 1
    Official solution

    Simpletry/except. Catch Exception not BaseException (SystemExit). IntegrityError 404 abort.

    Exception handling. Types ValueError TypeError KeyError IntegrityError HTTPException.

    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

    try:
        db.session.commit()
    except IntegrityError:
        db.session.rollback()
        return jsonify(msg='duplicate'), 400

    Project example: commit except rollback 400.

  1. 1
    Joined before me and I joined 2 minutes before time.. Opened his facecam and had few conversation. then it starts:
    Times asked 1
    Official solution

    SimpleJOIN related tables ek result mein. Inner = match only; left = left side sab + match.

    Example

    db.session.query(Booking, User).join(User).filter(User.id == uid).all()
  2. 2
    Download the course and do checksum
    Times asked 1
    Official solution

    SimpleExaminer wohi ZIP chahta hai jo tumne submit kiya, local extra magic nahi.

    Portal download → extract → redis, venv, pip, npm, flask, worker, beat.

    Checksum maange to hash. Uncommitted files mat dikhana.

    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) ZIP
    2) Extract
    3) Redis + venv + pip
    4) npm/vite
    5) flask + celery worker + beat

    Project example: Submitted zip run. README commands copy.

    Viva tipChecksum maange to hash match karke dikhao. Extra uncommitted files mat dikhana.

  3. 3
    Open the app,,During demonstration he addressed what he wants to see,,Plus you need to explain what is happening/what you are doing.
    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
    asked me to make student and company,,asked to upload cv,,and create drive
    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
    My frontend was bad,,so he moved to Backend,
    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.

  6. 6
    Asked what MVC is,,explain,show MVC in code..
    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.

  7. 7
    asked how models are connected, how relationship is created, what foreign key is
    Times asked 1
    Official solution

    Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  8. 8
    what is ORM,advantages
    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
  9. 9
    Asked what Http methods are,,difference btw GET,POST and PUT
    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
    asked me to explain Student Dashboard
    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
    Asked me to explain Company CRUD methods(Apply,delete,update and all)
    Times asked 1
    Official solution

    SimpleCRUD = Create Read Update Delete. Admin pe ek resource ke 4 ops dikhao.

  12. 12
    Asked what Jinja2 is,why and how we use
    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 %}
  13. 13
    What exactly Cascading Rules is,,expalin with example..
    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.

  14. 14
    If i used Rest API or not,(I didnt,so changed the topic)
    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: Sir was so chill,,Idk if he will have same name or not,,If u get him,,dont be nervous..Study your Codes,,know every function,,and focus on app routing,,how to do what and all..at the end he even joked that why I was so nervous thinking Level2 is hard,although he went easy on me..
  1. 1
    explain different http requests
    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
    explain relationships between drives table and applications table
    Times asked 1
    Official solution

    Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  3. 3
    explain how controller and view are working during registration
    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: overall chill proctor no need to be nervous, just know your code and which part of code connects to which functionality. he gave me good feedback.
  1. 1
    What is ORM and show in code
    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
  2. 2
    asked me to change the code to show date and student name on dashboard
    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 cascade delete and cascade update
    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.

  4. 4
    what is horizontal scaling? (i didn't know this)
    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
    asked me about different parts of code
    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
    asked to explain all http method
    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
    my viva got over in 25mins...
    Times asked 1
    Official solution

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

Advice: The proctor was friendly. Just be chill and answer..
  1. 1
    .Demo, stoped in between
    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
    . explain full flow of students dashboard, i.e, what happens after login ( brouser -> controler -> database query -> so on)
    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.

  3. 3
    .asked about some parts of code what they do.
    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'
  4. 4
    . Code change, in student dashboard display student name and today date.
    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.

  5. 5
    . Some ui questions
    Times asked 1
    Official solution

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

Advice: Know your code
  1. 1
    Level 2 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
    ID check, then download from portal.
    Times asked 2
    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
    Setup the project. (I have used shell scipts for setup, he was asking how do you know shell scripts? Show me all scripts ....)
    Times asked 2
    Official solution

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

  4. 4
    What is celery?
    Times asked 6
    Official solution

    SimpleCelery background tasks (email, CSV, reports) async chalaata hai. Redis broker/queue + cache.

    User 'Export' click → Celery task queue → Redis message → worker CSV banaata hai → user baad mein download.
    Saath isliye: Celery ko broker chahiye, Redis tez in-memory. MAD2 topic zyada, MAD1 mein optional.
    Priority: task queues/routing. Caching: Redis mein key-value, DB hits kam.
    Pub/Sub: publisher channel pe message, subscribers sunte hain — Redis yeh bhi karta hai.

  5. 5
    Show me how and where you are using celery?
    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.

  6. 6
    Which tasks are handled by celery?
    Times asked 1
    Official solution

    SimpleReminder emails, monthly report, CSV export — jo code mein hai.

    User vs scheduled label.

    Celery Python ka distributed task queue — HTTP request ko 10s email/CSV ke liye mat rokna.

    Flow: Flask .delay() → Redis broker → Worker execute. Beat alag process hai (clock): crontab padhke due time pe queue mein daalta hai. Beat khud mail nahi bhejta; Worker haath hai.

    MAD2 typical: daily reminder (Beat), monthly report (Beat), user Export CSV (button, Beat nahi). JS async/await browser event loop hai, Celery server-side process — mix mat karo.

    Demo: tin terminals — redis-server, celery worker, celery beat — plus Flask. MailHog :8025 inbox. Result backend se task SUCCESS poll optional.

    Project example: tasks.py function names.

  7. 7
    In answers, I said I have exposed 2 different endpoints which are triggered by 2 buttons in frontend, he directly asked show me the endpoints.
    Times asked 2
    Official solution

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

  8. 8
    Show the implementation(demo) of async tasks by clicking on those button.
    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.

  9. 9
    Now start the 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.

  10. 10
    I was showing quiz, he asked *What happend when i refreshed the page in between of quiz?*
    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
    Vuex Store?
    Times asked 1
    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.

  12. 12
    Session storage?
    Times asked 1
    Official solution

    SimpleMAD1 mein usually session-based auth: login pe session['user_id'], har request pe verify.

    Example

    session['user_id'] = user.id
    uid = session.get('user_id')
    user = User.query.get(uid)

    Viva tipSECRET_KEY set karo warna session insecure. logout pe session.clear().

  13. 13
    In admin search i have diplayed both deleted and non deleted chapters/subjects/questions. He asked create a checkbox named "deleted", if it is marked show all deleted if not then only not deleted items.
    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()
  14. 14
    (Backend jobs) How mails data is dynamically genrated?
    Times asked 2
    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.

  15. 15
    What you have used for authentication?
    Times asked 1
    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)
  16. 16
    Show me where you have delcared all routes?
    Times asked 2
    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
    How vue.js know these routes?
    Times asked 2
    Official solution

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

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

  18. 18
    Entry point of frontend? (He taught i didn't run frontend seprately) (my frontend and backend were running on same port so i was explained that ...)
    Times asked 2
    Official solution

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

Advice: Amazing Proctor, If you are saying anything just be confident and do very very go basics basics. Hard Procter!, for my case he was more to frontend.
  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
    Download the project from the portal.
    Times asked 4
    Official solution

    SimpleExaminer wohi ZIP chahta hai jo tumne submit kiya, local extra magic nahi.

    Portal download → extract → redis, venv, pip, npm, flask, worker, beat.

    Checksum maange to hash. Uncommitted files mat dikhana.

    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) ZIP
    2) Extract
    3) Redis + venv + pip
    4) npm/vite
    5) flask + celery worker + beat

    Project example: Submitted zip run. README commands copy.

    Viva tipChecksum maange to hash match karke dikhao. Extra uncommitted files mat dikhana.

  3. 3
    Set up the project.
    Times asked 1
    Official solution

    SimpleREADME Python Node Redis .env. Set up the project. Setup scripts line-by-line.

    local_setup.sh venv pip npm redis flask db.

    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: Open sh explain.

  4. 4
    Explain your setup scripts (Shell scripts) and how they work.
    Times asked 1
    Official solution

    Simplelocal_setup.sh venv pip npm. local_run.sh processes. Explain setup scripts how they work.

    Fail points python version redis missing.

    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: Open file.

  5. 5
    What is Celery?
    Times asked 19
    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.

  6. 6
    Which tasks are handled by Celery?
    Times asked 1
    Official solution

    SimpleReminder emails, monthly report, CSV export — jo code mein hai.

    User vs scheduled label.

    Celery Python ka distributed task queue — HTTP request ko 10s email/CSV ke liye mat rokna.

    Flow: Flask .delay() → Redis broker → Worker execute. Beat alag process hai (clock): crontab padhke due time pe queue mein daalta hai. Beat khud mail nahi bhejta; Worker haath hai.

    MAD2 typical: daily reminder (Beat), monthly report (Beat), user Export CSV (button, Beat nahi). JS async/await browser event loop hai, Celery server-side process — mix mat karo.

    Demo: tin terminals — redis-server, celery worker, celery beat — plus Flask. MailHog :8025 inbox. Result backend se task SUCCESS poll optional.

    Project example: tasks.py function names.

  7. 7
    Show where and how you have implemented Celery.
    Times asked 1
    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.

  8. 8
    Show the backend endpoints that trigger Celery tasks.
    Times asked 1
    Official solution

    SimpleButton POST .delay() 202. Poll status. Beat nahi, worker haan.

    Export vs daily reminder difference.

    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: Export CSV button. Network 202.

    Project example: Export CSV button. Network 202.

  9. 9
    Demonstrate the asynchronous tasks from the frontend.
    Times asked 1
    Official solution

    SimpleSync line pe ruk jao (2+2). Async I/O pe wait karte hue baaki kaam chalte (fetch, Celery).

    JS async ≠ Celery async jobs. Context se bolo.

    Why async jobs: slow/scheduled/bulk off request thread.

    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: Login sync hash check fast. Email Celery async. Vue fetch async.

  10. 10
    How is the email content generated dynamically for backend jobs?
    Times asked 1
    Official solution

    Simple

    render_template('report.html', user=u, stats=stats) har user alag.

    Loop users in task. Don't send same body.

    Flask-Mail / SMTP se mail. Local MailHog fake server: SMTP 1025, UI 8025 — internet nahi, viva safe.

    Asli send Celery task mein, request thread mein nahi. Beat 6pm reminder, export ke baad CSV attach optional.

    MAIL_SERVER localhost demo. Gmail SMTP student account pe block common. Body mein user name personalization examiner dekhta hai.

    Project example: monthly report HTML table their bookings.

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

  12. 12
    What happens if the user refreshes the page in the middle of a quiz?
    Times asked 1
    Official solution

    SimpleSPA refresh JS state gayab. Persist LS/session or backend save. Warn beforeunload. Refresh middle of quiz.

    What happens.

    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: If quiz in project. Else theory + how would save progress.

  13. 13
    What is Vuex Store?
    Times asked 1
    Official solution

    SimpleVuex/Pinia ghar ka notice board. Har room (component) same user/token dekhe.

    State data, mutations sync change, actions async API phir commit.

    Local data() sirf us component. Token/user global.

    Pinia Vue 3 official, kam boilerplate. Vuex older MAD2 still common.

    Example

    state: { user: null }
    mutations: { setUser(s, u) { s.user = u } }
    actions: { async login({ commit }, form) {
      const u = await api.login(form); commit('setUser', u)
    }}

    Project example: store user + token login action. Navbar getters isAdmin. Logout clear LS+state.

    Viva tipLocal/Session storage persist ke liye, reactive share ke liye store. Pinia Vue 3 official, Vuex older.

  14. 14
    Where have you declared all the frontend routes?
    Times asked 1
    Official solution

    SimpleVue router.js. Flask @app.route / resources.py.

    Both if asked frontend vs backend.

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

    Project example: Don't mix.

  15. 15
    How does Vue know which component to render for each route?
    Times asked 1
    Official solution

    Simplepath-to-regexp match array. meta extra. Guard before render.

    Unknown path catch-all NotFound.

    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: routes.js last path: '/:pathMatch(.*)*'.

  16. 16
    What is the entry point of your frontend application?
    Times asked 1
    Official solution

    Simpleindex.html + main.js/index.js createApp use router store mount #app.

    CDN: scripts in index. CLI: bundler inject.

    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

    createApp(App).use(router).use(store).mount('#app')

    Project example: main.js 10 lines.

  17. 17
    What authentication mechanism have you used?
    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.

  18. 18
    How is the authentication token sent with every request?
    Times asked 1
    Official solution

    SimpleLogin ke baad header. Axios interceptor ya fetch wrapper. Backend verify.

    Har protected API. Public login/register nahi.

    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.

    Example

    headers: { 'Authorization': 'Bearer ' + localStorage.getItem('token') }

    Project example: Network list request Headers Bearer.

  19. 19
    What is Session Storage?
    Times asked 2
    Official solution

    SimplesessionStorage tab close clear. Same API as LS.

    What is Session Storage.

    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: If unused, theory vs LS.

    Project example: If unused, theory vs LS.

  20. 20
    Add a "Deleted" checkbox to the admin search: If checked, display only deleted records. Otherwise, display only non-deleted records.
    Times asked 1
    Official solution

    SimpleAdmin search extra query is_deleted if checkbox. Soft-delete flag. Add Deleted checkbox admin search.

    Default active only.

    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

    q = Venue.query
    if request.args.get('deleted') == '1':
        q = q.filter_by(is_deleted=True)
    else:
        q = q.filter_by(is_deleted=False)

    Project example: query param deleted=1.

  1. 1
    Show your College ID.
    Times asked 16
    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
    Download the project from the Viva Portal.
    Times asked 7
    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.

  4. 4
    Run checksum.
    Times asked 3
    Official solution

    SimpleChecksum file ka hash (jaise SHA256) — file change hui ya nahi verify.

    Portal pe submitted ZIP ka checksum diya hota hai. Local file ka hash nikaalo, match hona chahiye.
    Linux: sha256sum project.zip
    Mismatch = galat file / corrupt download. Examiner integrity check karta hai ki tumhari submitted copy hi run ho rahi hai.

  5. 5
    Demonstrate the application (the proctor may stop you midway and ask specific scenarios).
    Times asked 1
    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.

  6. 6
    Create sample entities (e.g., student, company, drive, upload CV).
    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 }}
  7. 7
    Explain the Student Dashboard 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 Company CRUD workflow.
    Times asked 1
    Official solution

    SimpleCRUD = Create, Read, Update, Delete — kisi bhi resource ke 4 basic operations.

    Create: POST, db.session.add(new_user); commit() — register, add trek.
    Read: GET, User.query.all() — dashboard list.
    Update: POST/PUT, user.name = 'Ram'; commit() — edit profile.

    DeletePOST/DELETE, db.session.delete(obj); commit().

    REST mapping: POST create, GET read, PUT/PATCH update, DELETE delete.
    Admin panel mein yeh 4 dikhana viva demo ka common task hai.

  9. 9
    Explain additional features beyond the basic requirements.
    Times asked 1
    Official solution

    Simple2-3 honest improvements + 1 security + 1 UX.

    Example

    password hashing/CSRF tighter, Redis cache, tests, pagination, email verify, rate limit login, better mobile CSS.

    Challenges: relationships/cascade, concurrent booking, Jinja inheritance.
    Rate: 7-8/10 with reason — 10/10 arrogant, 3/10 confidence khatam.
    Security extra: HTTPS, hashed passwords, CSRF, SQL injection (ORM), login attempts, file type check.

  10. 10
    Identify and explain any flaw noticed by the proctor (e.g., logout functionality).
    Times asked 1
    Official solution

    SimpleLogin GET form dikhata hai, POST credentials check karke session set karta hai.

    @app.route('/login', methods=['GET','POST'])
    def login():
        if request.method == 'POST':
            u = User.query.filter_by(email=request.form.get('email')).first()
            if u and check_password_hash(u.password, request.form.get('password')):
                if getattr(u, 'blacklisted', False):
                    flash('Blocked'); return redirect(url_for('login'))
                session['user_id'] = u.id
                session['role'] = u.role
                return redirect(url_for('dashboard'))
            flash('Invalid')
        return render_template('login.html')

    Logout: session.clear(); redirect login. Incognito alag cookie jar — logged out dikhega.
    Single login page: role se redirect alag dashboards.

  11. 11
    Explain MVC and show where it is implemented in your code.
    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.

  12. 12
    Explain the complete request flow after login (Browser → Controller/Route → Database → Response → View).
    Times asked 1
    Official solution

    SimpleRoutes/controllers URLs handle karte hain. app.py app banata hai, models.py data, templates/ views, static/ CSS-JS.

    Typical structure:
    app.py / __init__.py → Flask app, db.init, register blueprints
    models.py → tables
    routes.py / views → @app.route functions
    templates/ → Jinja HTML
    static/ → css, images
    instance/*.db → SQLite

    Ek route explain karne ka template:
    1) URL + methods 2) Auth/role check 3) Form/query se data 4) Business rule (duplicate, slots) 5) db.session 6) render ya redirect

    Example GET+POST same route: GET form, POST save.
    Data HTML se: form name= → request.form. Data HTML ko: render_template(..., items=query).
    Nayi .py file: import karke use karo, warna Flask ko pata nahi. Folder rename: imports/paths/templates check.

  13. 13
    Explain how Controller and View interact during operations such as registration.
    Times asked 1
    Official solution

    SimpleRoutes/controllers URLs handle karte hain. app.py app banata hai, models.py data, templates/ views, static/ CSS-JS.

    Typical structure:
    app.py / __init__.py → Flask app, db.init, register blueprints
    models.py → tables
    routes.py / views → @app.route functions
    templates/ → Jinja HTML
    static/ → css, images
    instance/*.db → SQLite

    Ek route explain karne ka template:
    1) URL + methods 2) Auth/role check 3) Form/query se data 4) Business rule (duplicate, slots) 5) db.session 6) render ya redirect

    Example GET+POST same route: GET form, POST save.
    Data HTML se: form name= → request.form. Data HTML ko: render_template(..., items=query).
    Nayi .py file: import karke use karo, warna Flask ko pata nahi. Folder rename: imports/paths/templates check.


    Simple flow: Browser → Route (controller) → Model/DB → phir template (view) → Browser.

    Submit example:
    1) HTML form POST /register, name='email'
    2) register() request.form.get('email')
    3) User(email=...) ; db.session.add; commit
    4) redirect dashboard
    5) dashboard query + render_template
    6) Jinja {{ user.email }} / {% for %}

    GET search: /search?q=flask → request.args.get('q') → filter ilike → template list.
    JSON API: jsonify, frontend fetch().

  14. 14
    Explain one complete route from your project (e.g., student applying for a drive).
    Times asked 1
    Official solution

    SimpleRoutes/controllers URLs handle karte hain. app.py app banata hai, models.py data, templates/ views, static/ CSS-JS.

    Typical structure:
    app.py / __init__.py → Flask app, db.init, register blueprints
    models.py → tables
    routes.py / views → @app.route functions
    templates/ → Jinja HTML
    static/ → css, images
    instance/*.db → SQLite

    Ek route explain karne ka template:
    1) URL + methods 2) Auth/role check 3) Form/query se data 4) Business rule (duplicate, slots) 5) db.session 6) render ya redirect

    Example GET+POST same route: GET form, POST save.
    Data HTML se: form name= → request.form. Data HTML ko: render_template(..., items=query).
    Nayi .py file: import karke use karo, warna Flask ko pata nahi. Folder rename: imports/paths/templates check.

  15. 15
    Explain routing and the purpose of different route handlers.
    Times asked 1
    Official solution

    SimpleRoutes/controllers URLs handle karte hain. app.py app banata hai, models.py data, templates/ views, static/ CSS-JS.

    Typical structure:
    app.py / __init__.py → Flask app, db.init, register blueprints
    models.py → tables
    routes.py / views → @app.route functions
    templates/ → Jinja HTML
    static/ → css, images
    instance/*.db → SQLite

    Ek route explain karne ka template:
    1) URL + methods 2) Auth/role check 3) Form/query se data 4) Business rule (duplicate, slots) 5) db.session 6) render ya redirect

    Example GET+POST same route: GET form, POST save.
    Data HTML se: form name= → request.form. Data HTML ko: render_template(..., items=query).
    Nayi .py file: import karke use karo, warna Flask ko pata nahi. Folder rename: imports/paths/templates check.

  16. 16
    Explain different parts of your code when the proctor points to them.
    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.

  17. 17
    Explain models.py.
    Times asked 21
    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.

  18. 18
    Explain the database schema.
    Times asked 2
    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.

  19. 19
    Explain relationships between tables.
    Times asked 3
    Official solution

    SimpleRelationships tables ko jodti hain taaki related data object se mil jaaye.

    One-to-Many: User → kai Posts. posts = relationship('Post', backref='author'). FK post.user_id.
    One-to-One: User → Profile. uselist=False + unique FK. Profile.user_id unique.
    Many-to-Many: Student ↔ Drive. Junction/secondary table (student_id, drive_id).

    Example 1-1:

    class Profile(db.Model):
        user_id = db.Column(db.Integer, db.ForeignKey('user.id'), unique=True)
        user = db.relationship('User', back_populates='profile', uselist=False)

    1-M ko 1-1: child FK pe unique=True + uselist=False.
    Parent-child: parent PK, child FK. Junction table extra columns bhi rakh sakti hai (applied_on).

  20. 20
    Explain Primary/Foreign Keys.
    Times asked 1
    Official solution

    SimpleForeign Key doosri table ki PK ko refer karti hai, relationship + referential integrity.

    user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)

    Invalid user_id insert nahi hoga. FK unique nahi hona zaroori — One-to-Many mein same user_id kai rows.
    FK + PK same column: 1-1 sharing, jaise AdminProfile.id = FK to user.id.
    Should FK always unique? Nahi. Tab One-to-One chahiye ho tab unique.

  21. 21
    Explain One-to-One and One-to-Many relationships and how they are identified.
    Times asked 1
    Official solution

    SimpleRelationships tables ko jodti hain taaki related data object se mil jaaye.

    One-to-Many: User → kai Posts. posts = relationship('Post', backref='author'). FK post.user_id.
    One-to-One: User → Profile. uselist=False + unique FK. Profile.user_id unique.
    Many-to-Many: Student ↔ Drive. Junction/secondary table (student_id, drive_id).

    Example 1-1:

    class Profile(db.Model):
        user_id = db.Column(db.Integer, db.ForeignKey('user.id'), unique=True)
        user = db.relationship('User', back_populates='profile', uselist=False)

    1-M ko 1-1: child FK pe unique=True + uselist=False.
    Parent-child: parent PK, child FK. Junction table extra columns bhi rakh sakti hai (applied_on).

  22. 22
    What is ORM? Why is it used?
    Times asked 2
    Official solution

    SimpleORM = Object Relational Mapping. Database tables ko Python classes/objects se map karta hai, raw SQL kam likhni padti hai.

    Bina ORM: cursor.execute('SELECT * FROM user WHERE id=?', [5])
    ORM se: User.query.get(5) ya db.session.get(User, 5)

    Example model

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)

    FaydePython mein soch sakte ho, SQL injection se protection (parameterized), relationships easy, DB switch thoda aasan.

    Nuksaancomplex queries slow/abstract, seekhne ki layer extra, kabhi raw SQL phir bhi chahiye.

    MAD1: SQLAlchemy (Flask-SQLAlchemy). Tables db.create_all() ya migrations se banti hain.

  23. 23
    Have you heard of MySQLAlchemy?
    Times asked 1
    Official solution

    SimpleSQLAlchemy Python ka sabse popular ORM hai. MAD1 mein Flask-SQLAlchemy wrapper use hota hai.

    db = SQLAlchemy(app)

    class Book(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        title = db.Column(db.String(80), nullable=False)
    
    Operations: db.session.add(obj), .commit(), .delete(obj), Model.query.all(), .filter_by(), .get_or_404(id).
    db.Model ek class hai (function nahi). db object engine + session + metadata hold karta hai.

    SQLALCHEMY_TRACK_MODIFICATIONS=False extra signals band karta hai, performance warning hatati hai.

  24. 24
    What is Lazy Loading?
    Times asked 3
    Official solution

    Simplelazy loading related objects tab load karta hai jab attribute access karte ho, pehle nahi.

    user = User.query.get(1)  # posts query nahi

    user.posts # ab query

    lazy=True / 'select' default. lazy='joined' eager join. lazy='dynamic' query object.
    uselist=False One-to-One (single object, list nahi). Hataoge to list mil sakti hai.
    Frontend lazy loading images alag cheez hai (viewport mein aaye tab load).

  25. 25
    What is backref?
    Times asked 12
    Official solution

    Simplebackref relationship ki reverse side automatically bana deta hai.

    class Post(db.Model):
        user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
        user = db.relationship('User', backref='posts')

    Ab post.user milta hai, aur user.posts bhi — Post model pe sirf ek line.
    secondary Many-to-Many junction table ke liye: relationship(..., secondary=likes_table, backref='liked_by').
    Explicit chahiye to back_populates use karo.

  26. 26
    What is Cascade Delete?
    Times asked 2
    Official solution

    SimpleCascade parent ke saath child pe automatic action (generally delete).

    Company delete → uski drives bhi delete, warna orphan rows / FK error.
    SQLAlchemy: db.relationship('Drive', cascade='all, delete-orphan', backref='company')
    SQL: ForeignKey(..., ondelete='CASCADE')

    Cascade sirf delete nahi: save-update, merge, refresh-expire, expunge, delete-orphan.
    Cascade Update: parent PK change to child FK update (rare, PK mat badlo).
    Parent delete jab children active hon: constraint error, ya cascade se children gayab, ya pehle children handle karo — design choice examiner poochta hai.
    CSS cascading alag topic hai (styles inherit/override).

  27. 27
    What is Cascade Update?
    Times asked 1
    Official solution

    SimpleCascade parent ke saath child pe automatic action (generally delete).

    Company delete → uski drives bhi delete, warna orphan rows / FK error.
    SQLAlchemy: db.relationship('Drive', cascade='all, delete-orphan', backref='company')
    SQL: ForeignKey(..., ondelete='CASCADE')

    Cascade sirf delete nahi: save-update, merge, refresh-expire, expunge, delete-orphan.
    Cascade Update: parent PK change to child FK update (rare, PK mat badlo).
    Parent delete jab children active hon: constraint error, ya cascade se children gayab, ya pehle children handle karo — design choice examiner poochta hai.
    CSS cascading alag topic hai (styles inherit/override).

  28. 28
    What are other Cascade operations/rules?
    Times asked 1
    Official solution

    SimpleCascade parent ke saath child pe automatic action (generally delete).

    Company delete → uski drives bhi delete, warna orphan rows / FK error.
    SQLAlchemy: db.relationship('Drive', cascade='all, delete-orphan', backref='company')
    SQL: ForeignKey(..., ondelete='CASCADE')

    Cascade sirf delete nahi: save-update, merge, refresh-expire, expunge, delete-orphan.
    Cascade Update: parent PK change to child FK update (rare, PK mat badlo).
    Parent delete jab children active hon: constraint error, ya cascade se children gayab, ya pehle children handle karo — design choice examiner poochta hai.
    CSS cascading alag topic hai (styles inherit/override).

  29. 29
    How would you delete one application without affecting other related records?
    Times asked 1
    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.

  30. 30
    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 delete kar sakta hai, normal user nahi.

    Example (Flask):
    # Authentication

    if user and check_password_hash(user.password, form_password):
        session['user_id'] = user.id
    
    # Authorization
    if session.get('role') != 'admin':
        abort(403)  # logged in ho, lekin allowed nahi

    Project example: student login = authentication. Student admin dashboard nahi khol sakta = authorization.
    Validation alag cheez hai (form sahi bhara hai ya nahi, jaise age 18+).

  31. 31
    What is Password Hashing?
    Times asked 1
    Official solution

    SimplePassword DB mein plain text mat rakho — hash store karo jo reverse nahi hota.

    from werkzeug.security import generate_password_hash, check_password_hash
    user.password = generate_password_hash(request.form['password'])
    check_password_hash(user.password, form_password)

    Hashing ≠ encryption. Leak pe bhi original password nahi milta (easy passwords rainbow table se — isliye salt + strong hash).
    Column String(200) kyunki hash lamba hota hai. unique=True password pe mat lagao.

  32. 32
    How did you implement Password Hashing?
    Times asked 1
    Official solution

    SimplePassword DB mein plain text mat rakho — hash store karo jo reverse nahi hota.

    from werkzeug.security import generate_password_hash, check_password_hash
    user.password = generate_password_hash(request.form['password'])
    check_password_hash(user.password, form_password)

    Hashing ≠ encryption. Leak pe bhi original password nahi milta (easy passwords rainbow table se — isliye salt + strong hash).
    Column String(200) kyunki hash lamba hota hai. unique=True password pe mat lagao.

  33. 33
    Explain all HTTP request methods.
    Times asked 3
    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.

  34. 34
    Difference between GET, POST, and PUT.
    Times asked 1
    Official solution

    SimpleGET read karta hai, PUT existing resource replace/update karta hai.

    GET /users/1 → data lao, side-effect nahi. PUT /users/1 → poora user update, idempotent.
    PUT vs FETCH: FETCH HTTP method nahi, JS fetch() function hai jo GET/PUT/POST kuch bhi bhej sakta hai.
    Search GET, edit-save PUT/POST. GET se create mat karo.

  35. 35
    What is Jinja?
    Times asked 4
    Official solution

    SimpleJinja2 Flask ka template engine hai. HTML ke andar Python-jaisa data print/loop/if kar sakte ho.

    Bina Jinja har user ke liye alag HTML file. Jinja se ek template + data.

    {{ user.name }} print, {% for x in items %} loop, {% if %} condition, {% extends %} layout.

    Example routereturn render_template('dash.html', treks=treks)

    dash.html: {% for t in treks %}<li>{{ t.name }}</li>{% endfor %}

    HTML files templates/ folder mein isliye kyunki Flask default wahan dhundhta hai. render_template Jinja ko run karta hai.
    Boolean Jinja handle karta hai: {% if user.is_admin %}.

  36. 36
    What is Template Inheritance?
    Times asked 10
    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.

  37. 37
    Have you used a REST API?
    Times asked 1
    Official solution

    SimpleAPI = Application Programming Interface — do systems predefined rules se baat karti hain. REST API HTTP + JSON use karti hai.

    Controller/route HTML bhi return kar sakta hai. REST API generally JSON return karti hai, frontend alag ho (Vue/Postman).

    Example

    @app.route('/api/users/<int:id>')
    def get_user(id):
        u = User.query.get_or_404(id)
        return jsonify(id=u.id, name=u.name)

    MAD1 HTML apps mein 'API' kabhi-kabhi routes ko hi keh dete hain. Agar Vue nahi to bolo: server-rendered Flask, JSON APIs optional.
    Boolean return: technically jsonify(True) ho sakta hai, lekin meaningful JSON object better. Flask view None return kare to error.
    Test: Postman se GET/POST.
    Parsing: request.get_json() body se, request.args query se.

  38. 38
    If a database error occurs, how would you handle it? (Exception Handling)
    Times asked 1
    Official solution

    SimpleException error object. try-except se app crash ki jagah friendly message.

    try:
        age = int(request.form['age'])
        db.session.commit()
    except ValueError:
        flash('Age number hona chahiye')
    except SQLAlchemyError:
        db.session.rollback()
        flash('Database error')

    ArithmeticError/ZeroDivisionError, KeyError, TypeError common. SQLAlchemy type errors: sahi Column type, form ko int() se convert.
    User ko 500 ka traceback mat dikhao production mein.

  39. 39
    Display the student's name on the Student Dashboard.
    Times asked 1
    Official solution

    Simplecurrent user object template ko do, Jinja se naam print.

    @app.route('/staff/dashboard')
    def staff_dash():
        staff = Staff.query.get(session['user_id'])
        return render_template('staff_dash.html', staff=staff)
    
    <h2>Welcome, {{ staff.name }}</h2>

    Flask-Login: {{ current_user.name }} — context_processor se har template mein user inject ho sakta hai.
    Roll/dept extra fields same tarah pass karo.

  40. 40
    Display the student's roll number on the Student Dashboard.
    Times asked 1
    Official solution

    Simplecurrent user object template ko do, Jinja se naam print.

    @app.route('/staff/dashboard')
    def staff_dash():
        staff = Staff.query.get(session['user_id'])
        return render_template('staff_dash.html', staff=staff)
    
    <h2>Welcome, {{ staff.name }}</h2>

    Flask-Login: {{ current_user.name }} — context_processor se har template mein user inject ho sakta hai.
    Roll/dept extra fields same tarah pass karo.

  41. 41
    Display the current date.
    Times asked 1
    Official solution

    Simplecurrent user object template ko do, Jinja se naam print.

    @app.route('/staff/dashboard')
    def staff_dash():
        staff = Staff.query.get(session['user_id'])
        return render_template('staff_dash.html', staff=staff)
    
    <h2>Welcome, {{ staff.name }}</h2>

    Flask-Login: {{ current_user.name }} — context_processor se har template mein user inject ho sakta hai.
    Roll/dept extra fields same tarah pass karo.

  42. 42
    Display the current date and time.
    Times asked 1
    Official solution

    Simplecurrent user object template ko do, Jinja se naam print.

    @app.route('/staff/dashboard')
    def staff_dash():
        staff = Staff.query.get(session['user_id'])
        return render_template('staff_dash.html', staff=staff)
    
    <h2>Welcome, {{ staff.name }}</h2>

    Flask-Login: {{ current_user.name }} — context_processor se har template mein user inject ho sakta hai.
    Roll/dept extra fields same tarah pass karo.

  43. 43
    Change the dashboard heading to "{{ Name }}'s Dashboard".
    Times asked 1
    Official solution

    Yeh live UI/CSS change hai. Examiner jo element bole uski CSS turant badlo.

    Bootstrap class badlo (btn-primary → btn-success, bg-dark → bg-warning) ya inline style='color:red; background:#eee'.
    Center: d-flex justify-content-center text-center. Navbar neeche: navbar fixed-bottom.

    Example

    <button class='btn btn-success' style='background:#16a34a'>Book</button>

    Pehle browser inspect karke class dhundo, phir template mein change karke refresh.

  44. 44
    Fetch and display all student names on the Company Dashboard using a Jinja for loop (including both applied and non-applied students).
    Times asked 1
    Official solution

    Simple Jinja loop + if — examiner notepad mein likhwaata hai:

    {% for t in treks %}
      <p>{{ t.name }} — {{ t.location }}</p>
    {% else %}
      <p>No treks</p>
    {% endfor %}
    
    {% if user.role == 'admin' %}
      <button>Delete</button>
    {% endif %}

    List filter: {% if x > 10 %}{{ x }}{% endif %}
    Length: {{ items|length }} Upper: {{ name|upper }}
    Table: loop ke andar <tr><td>

  45. 45
    Answer UI-related questions or explain your frontend implementation.
    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.

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