Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level1_130

Share your experience Add your viva experience here
307 Questions
24 Sets
0 Topics
4 Reviews
Tips for this examiner: Moot ke aana viva me, 30 minutes lag gye total

Student reviews

AKM MAD1

One of the best proctor, my viva was around 30 min.
Just know the logic of what you've used in the project.
All The Best 👍

Questions remembered
  1. LEVEL 2 Viva - Placement Portal
  2. Show ID Card
  3. Two options : download from portal or do the checksum
  4. Brief Overview of the project (what files are there, how they are connected to each other)
  5. Briefly explain all the models
  6. Explain the logic of creating a drive (Show through the code, both frontend and backend)
  7. What is Secret key and why it is used ?
  8. What is backref ?
  9. Difference between "id" and "name" ?
  10. Difference between "PUT" and "POST" method ?
  11. Add a field Age(dropdown) with two option Less than 30 and Greater than 30, in the Create Drive page. Then retrieve the value and print it on the terminal.
  12. Difference between Authorization and Authentication
  13. Difference between Inline and Block element
  14. Difference between Inline and Internal CSS
Sheet response MAD1

He seems very chill, he explains calmly and gives you sufficient time to answer, if you dont know just say what you know and say you dont know the rest, he'll move on.
overall viva time was around 45 minutes for me.

Questions remembered
  1. LEVEL 2 VIVA - PLACEMENT PORTAL
  2. Show ID Card
  3. Download project straight from vivaflow or run checksum
  4. Give full demo
  5. Explain project structure and models
  6. Explain login route, stopped me at a random point and pointed at the code and ask me what that line means and what does it do
  7. Explain company create drive route, frontend and backend
  8. In company drive, add a new field called 'Age' as dropdown just in frontend and it should show only options >30 and <30. Then change it to normal field with any input, once you run the app, the age should show in terminal (no need to show in backend and store in database and all)
  9. what is the difference between block and inline elements?
  10. difference between inline and internal css
  11. difference between PUT and POST, can they be used interchangeably 11)what is an indempotent HTTP method.
  12. how is the frontend html template connected to the backend
Sheet response MAD1

know you every part of the code, I mean every thing from “.” to “-“ every thing and work flow.

Questions remembered
  1. * he don’t want me to show the demo, just download the project from submission and open the vscode
  2. * he asked me to explain the architecture, models and it’s relationship and whole work flow of project including app.py, .env or all python file which I created.
  3. * then point out any part of code and asked what does it do.
  4. * he asked me if patient book a appointment what's the whole work flow of it.
  5. * he ask me write a route for a page which take your first and last name as input and return the whole name as output
  6. * then he give me a list ['head', 'nails', 'toe’] and asked to write a jinja code for returning words which is greater then 3
  7. * what is argument phrasing
  8. * what is api phrasing
  9. * write syntax of git branching
  10. * write syntax of git if you no longer want to track or end track of code
  11. * 1, 2 more theory questions
Sheet response MAD1

proctor was Adarsh Madre sir himself, asked some basic questions, that test our understanding of our Code, ability to Code and basic theory Qs.

Questions remembered
  1. Level 2 viva Sat 9-10pm... 40 minutes Qs testing the understanding of your code:
  2. Tell about your project Structure
  3. Show me your models and explain
  4. explain the login and how it works in your code
  5. explain about adding the lots in your code Coding Qs:
  6. given [<Spot 1>,<Spot 2>,<Spot 3>] and a flag isOccupied, write in Jinja how to populate the spots in order
  7. given URL http://127.0.0.1:5000?name=xyz&course=appdev, write a flask endpoint that returns JSON data Theory Qs:
  8. If i remove method="post" in the HTML form, will it have any impact?
  9. If you remove url_for in redirect, what would you change to get same results?
  10. what is name and id in html?
  11. difference between Inline elements and Block elements?
  12. What is authentication vs authorization?
  13. What are markers in Pytest? and difference between markers and keywords?
  14. What is secret key used for ? how it works ?

Approved viva sets

  1. 1
    gave me a route "trek/<staffname>" and told me to write a route for this and that route fn should be able to extract staff name and return the trek assigned to that staff.
    Times asked 2
  2. 2
    then he told me to explain my profit
    Times asked 2
  3. 3
    then explain how when a admin create new trek how everything flow from frontend to backend to db
    Times asked 2
  4. 4
    then he told me to open some specific files like vue.app, models app.py config files and told me to explain some parts of it like why i am using secret key , why we used this specific function what does watcher do and all
    Times asked 1
  5. 5
    what is api composition
    Times asked 2
  6. 6
    what does script setup do
    Times asked 2
  7. 7
    what is watchers , computed. property
    Times asked 1
  8. 8
    what does reactive mean
    Times asked 2
  9. 9
    ref
    Times asked 2
  10. 10
    how axios handles data
    Times asked 2
  11. 11
    what is v bind
    Times asked 2
  12. 12
    why i have used router here
    Times asked 2
  13. 13
    what changes is the watcher code listening to here
    Times asked 2
  14. 14
    he also asked me to explain that celery config code
    Times asked 2
  15. 15
    and many more questions which i don't remember which he asked from my code
    Times asked 2
Advice: for theory questions prepare from sheet he doesn't check for demo . he said u already passed l1 that means u have an idea about how your application works and all so. he is nice and chill won't ask hard question just know your code and even for coding questions prepare from sheet only
  1. 1
    Project & System Walkthrough
    Times asked 2
  2. 2
    * Completed initial project verification (no demo was required).
    Times asked 2
  3. 3
    * Explained the user login and registration workflow.
    Times asked 2
  4. 4
    * Justified using Flask secret key instead of JWT tokens for session management.
    Times asked 1
  5. 5
    * Demonstrated how an admin creates a new trek entry.
    Times asked 2
  6. 6
    * Explained the complete database structure and schema in models.py.
    Times asked 2
  7. 7
    * Detailed the configuration, setup, and working mechanism of Celery and Redis for asynchronous tasks.
    Times asked 2
  8. 8
    Coding Tasks
    Times asked 2
  9. 9
    * Backend: Implemented a backend route allowing an admin to fetch all treks assigned to a specific staff member.
    Times asked 1
  10. 10
    * Frontend: Built the corresponding frontend view to connect with and render data from the new backend route.
    Times asked 2
  11. 11
    Theory Questions
    Times asked 2
  12. 12
    * Architecture and implementation of vue-router.
    Times asked 2
  13. 13
    * Purpose and working mechanism of Axios for HTTP requests.
    Times asked 2
Advice: Irrespective of whether you've used a technology/framework or not, make sure you're aware of all the key frameworks and technologies taught in AppDev theory courses (both 1 and 2)
  1. 1
    Joined ~20 minutes late.
    Times asked 2
  2. 2
    Opened the project code and asked to explain:
    Times asked 2
  3. 3
    Overall project structure and flow
    Times asked 2
  4. 4
    Background task (Celery) code flow
    Times asked 2
  5. 5
    What is Celery?
    Times asked 19
  6. 6
    Why is Redis used?
    Times asked 2
  7. 7
    How do background tasks work?
    Times asked 2
  8. 8
    Vue.js:
    Times asked 2
  9. 9
    Promises
    Times asked 2
  10. 10
    Walkthrough of database models
    Times asked 2
  11. 11
    Model relationships
    Times asked 2
  12. 12
    Purpose of uselist in SQLAlchemy
    Times asked 2
  13. 13
    Given a backend route:
    Times asked 2
  14. 14
    /company/<company_name>
    Times asked 2
  15. 15
    Add a Get Drives button.
    Times asked 2
  16. 16
    On button click, call the backend API.
    Times asked 2
  17. 17
    Render the returned list of drives
    Times asked 2
Advice: He is a nice proctor only. mostly asks repeated ques
  1. 1
    No demo — straight into code explanation
    Times asked 2
  2. 2
    Write template + script: two text inputs (first name, last name), button, on click concatenate and display (all in a .js file)
    Times asked 2
  3. 3
    $route vs $router
    Times asked 2
  4. 4
    Asked to show exactly where the API is called and how the admin dashboard renders that data
    Times asked 2
Advice: Explain your code in excruciating detail up front (the functionalities why you used one library over another etc) — the more thoroughly you narrate a file unprompted, the fewer follow-up questions he digs for, since he's mainly testing whether you can explain why something exists, not whether he can catch you out. Learn from other students' form responses beforehand — the question patterns repeat closely across different students with this proctor (same coding-task types, same "versus" pairs). Know the difference between backref and back_populates specifically, not just relationships in general. Be ready to trace a feature end-to-end — from the frontend button/API call through to where the data actually renders on screen — not just the backend route in isolation.
  1. 1
    watcher vs computed
    Times asked 1
  2. 2
    write template and script such that user takes 2 inputs say firstname and lastname. add a button. upon clicking, it should return firstname+lastname.
    Times asked 2
Advice: Go through your entire code. He checks if we understand which thing is written for what.
  1. 1
    How the viva started
    Times asked 1
  2. 2
    There was no project demo in my case. The examiner directly started asking questions from my codebase. He went through the project line by line and asked why I had written certain things, what they do, and whether I had actually implemented those features.
    Times asked 2
  3. 3
    Types of questions I was asked
    Times asked 1
  4. 4
    Some of the questions I remember are:
    Times asked 2
  5. 5
    Explain router.js.
    Times asked 2
  6. 6
    Write a database query to fetch all treks belonging to a particular manager.
    Times asked 2
  7. 7
    What are computed properties and watchers in Vue?
    Times asked 1
  8. 8
    Why did you use :class (colon before class)? What is its purpose?
    Times asked 1
  9. 9
    There were many more questions, but these are the ones I remember.
    Times asked 1
  10. 10
    My experience
    Times asked 2
  11. 11
    Some questions I answered well, some only partially, and a few I couldn't answer. I didn't try to bluff or make things up. Whenever I genuinely didn't know something, I told him honestly.
    Times asked 2
  12. 12
    At one point, he gave feedback saying that my answers were okay-ish, but I should understand my own code much better. He specifically said that using AI is not an excuse for not being able to explain or write the code yourself. If you've used AI to build something, you should still understand every part of it.
    Times asked 2
  13. 13
    That honestly made me feel much better.
    Times asked 2
  14. 14
    Biggest lesson
    Times asked 2
  15. 15
    Know every single line of your own code.
    Times asked 2
  16. 16
    If you've imported a library:
    Times asked 2
  17. 17
    Why did you import it?
    Times asked 1
  18. 18
    What problem does it solve?
    Times asked 2
  19. 19
    Could you have done it another way?
    Times asked 2
  20. 20
    If you've used a function:
    Times asked 2
  21. 21
    What does it return?
    Times asked 2
  22. 22
    Why is it needed?
    Times asked 2
  23. 23
    What happens if you remove it?
    Times asked 2
  24. 24
    If you've copied something from documentation or AI:
    Times asked 2
  25. 25
    Read it.
    Times asked 2
  26. 26
    Be able to write it again without looking.
    Times asked 2
  27. 27
    The examiner doesn't care whether the project works. He wants to know whether you understand what you've written.
    Times asked 2
Advice: My advice for everyone Go through your project line by line. Understand every import, configuration, and dependency. Be able to write important snippets (like router configuration or common database queries) without looking. Learn the concepts behind whatever you've used (JWT, Vue Router, computed, watch, Axios, Pinia, SQLAlchemy, etc.). If you haven't implemented a feature, be honest. Don't try to fake it. Revise common Vue concepts like props, emits, computed, watch, routing, conditional rendering, lifecycle hooks, and API calls. Revise backend concepts like JWT authentication, database relationships, SQLAlchemy queries, and why each package is used. Final takeaway The viva is less about whether your project runs and more about whether you truly understand your project. If you know your own code well, you'll do much better than someone who simply copied everything and hoped it wouldn't be asked. That's all from my side. I hope this helps. Best of luck to everyone appearing for the viva—you've got this!
  1. 1
    Viva 2
    Times asked 2
  2. 2
    explain all your code and files
    Times asked 2
  3. 3
    then he went through frontend and backend
    Times asked 2
  4. 4
    asked what is setup in scirpt
    Times asked 2
  5. 5
    methods vs mounted
    Times asked 2
  6. 6
    v-model vs v-bind
    Times asked 2
  7. 7
    and many more question from code like he found some words and asked why you have used these and what these do (i forgot)
    Times asked 2
  8. 8
    coding question:
    Times asked 3
  9. 9
    in create drive form add dropdown for age also where age can be >30 or <30 (in frontend)
    Times asked 2
  10. 10
    2) in backend you have got a json file { "app" : ">30" } write a code to print that json in terminal it self
    Times asked 2
  11. 11
    in the end how much AI you have used, what you have done by yourself
    Times asked 2
Advice: please get a grip of your code he can ask anything from it, he is strict please be ready with your code understandings
  1. 1
    Level 2 level1_130 No demo Explain code Questions based on code
    Times asked 2
  2. 2
    How is data being stored?
    Times asked 2
Advice: Just get a grip on your code in your project. Be confident if not confident you will get confused.
  1. 1
    Demonstrate your Project.
    Times asked 2
  2. 2
    Show caching code.
    Times asked 2
Advice: Moot ke aana viva me, 30 minutes lag gye total
  1. 1
    Two options : download from portal or do the checksum
    Times asked 1
    Official solution

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

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

  2. 2
    Brief Overview of the project (what files are there, how they are connected to each other)
    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
    Briefly explain all the 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)
  4. 4
    Explain the logic of creating a drive (Show through the code, both frontend and backend)
    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
    Add a field Age(dropdown) with two option Less than 30 and Greater than 30, in the Create Drive page. Then retrieve the value and print it on the terminal.
    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: One of the best proctor, my viva was around 30 min. Just know the logic of what you've used in the project. All The Best 👍
  1. 1
    Show ID Card
    Times asked 7
    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
    Download project straight from vivaflow or run checksum
    Times asked 1
    Official solution

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

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

  3. 3
    Give full demo
    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
    Explain project structure and 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)
  5. 5
    Explain login route, stopped me at a random point and pointed at the code and ask me what that line means and what does it do
    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.

  6. 6
    Explain company create drive route, frontend and backend
    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
    In company drive, add a new field called 'Age' as dropdown just in frontend and it should show only options >30 and <30. Then change it to normal field with any input, once you run the app, the age should show in terminal (no need to show in backend and store in database and all)
    Times asked 1
    Official solution

    Simplevenv activate → dependencies → DB create/migrate → flask run. Browser pe localhost dikhao.

    Example

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    flask run
  8. 8
    how is the frontend html template connected to the backend
    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: He seems very chill, he explains calmly and gives you sufficient time to answer, if you dont know just say what you know and say you dont know the rest, he'll move on. overall viva time was around 45 minutes for me.
  1. 1
    * he don’t want me to show the demo, just download the project from submission and open the vscode
    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
    * he asked me to explain the architecture, models and it’s relationship and whole work flow of project including app.py, .env or all python file which I created.
    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
    * then point out any part of code and asked what does it 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
    * he asked me if patient book a appointment what's the whole work flow of it.
    Times asked 1
    Official solution

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

  5. 5
    * he ask me write a route for a page which take your first and last name as input and return the whole name as output
    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
    * then he give me a list ['head', 'nails', 'toe’] and asked to write a jinja code for returning words which is greater then 3
    Times asked 1
    Official solution

    SimpleJinja for loop list render karta hai. loop.index, else branch empty list pe.

    Example

    {% for u in users %}
      <tr><td>{{ loop.index }}</td><td>{{ u.email }}</td></tr>
    {% endfor %}
  7. 7
    * what is argument phrasing
    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.

  8. 8
    * what is api phrasing
    Times asked 1
    Official solution

    SimpleAPI = interface jisse systems baat karein. Web API usually JSON return karti hai.

    Example

    @app.route('/api/lots')
    def api_lots():
        return jsonify([{'id': l.id, 'name': l.name} for l in Lot.query.all()])
  9. 9
    * write syntax of git branching
    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.

  10. 10
    * write syntax of git if you no longer want to track or end track 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'
Advice: know you every part of the code, I mean every thing from “.” to “-“ every thing and work flow.
  1. 1
    Tell about your project Structure
    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
    Show me your models and explain
    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)
  3. 3
    explain the login and how it works in your code
    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
    explain about adding the lots in your code Coding Qs:
    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
    given [<Spot 1>,<Spot 2>,<Spot 3>] and a flag isOccupied, write in Jinja how to populate the spots in order
    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 %}
  6. 6
    given URL http://127.0.0.1:5000?name=xyz&course=appdev, write a flask endpoint that returns JSON data Theory Qs:
    Times asked 1
    Official solution

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

  7. 7
    If i remove method="post" in the HTML form, will it have any impact?
    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
    If you remove url_for in redirect, what would you change to get same results?
    Times asked 1
    Official solution

    Simpleredirect dusre URL pe bhejta hai. flash one-time message session mein rakh ke next page pe dikhata hai.

    Example

    flash('Login successful', 'success')
    return redirect(url_for('user.dashboard'))
  9. 9
    what is name and id in html?
    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: proctor was Adarsh Madre sir himself, asked some basic questions, that test our understanding of our Code, ability to Code and basic theory Qs.
  1. 1
    gave me a route "trek/<staffname>" and told me to write a route for this and that route fn should be able to extract staff name and return the trek assigned to that staff.
    Times asked 2
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  2. 2
    then he told me to explain my profit
    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.

  3. 3
    then explain how when a admin create new trek how everything flow from frontend to backend to db
    Times asked 2
    Official solution

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

  4. 4
    what is api composition
    Times asked 2
    Official solution

    SimpleAPI = interface jisse systems baat karein. Web API usually JSON return karti hai.

    Example

    @app.route('/api/lots')
    def api_lots():
        return jsonify([{'id': l.id, 'name': l.name} for l in Lot.query.all()])
  5. 5
    what does script setup do
    Times asked 2
    Official solution

    SimpleVue <script>: data/setup state, methods, computed, lifecycle, imports. Logic yahan; template UI.

  6. 6
    what does reactive mean
    Times asked 2
    Official solution

    SimpleVirtual DOM = UI ka lightweight JS copy. Change pe diff → minimal real DOM update. Vue/React isliye tez re-render.

  7. 7
    ref
    Times asked 2
    Official solution

    Simpletemplate ref $refs OR composition ref() primitive. Two meanings — ask context.

    What is ref in Vue.

    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: If Options this.$refs.form. If composition ref(0).

  8. 8
    how axios handles data
    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.

  9. 9
    what is v bind
    Times asked 2
    Official solution

    SimpleVue directive = special attr: v-if, v-for, v-model, v-bind, v-show — DOM ko declarative control.

  10. 10
    why i have used router here
    Times asked 2
    Official solution

    Simplerouter-view = matched page component yahan render. router-link = SPA navigation without full reload.

  11. 11
    what changes is the watcher code listening to here
    Times asked 2
    Official solution

    SimpleLifecycle hooks = component stages (created/mounted/updated/unmounted). Data fetch usually mounted/onMounted.

  12. 12
    he also asked me to explain that celery config code
    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.

  13. 13
    and many more questions which i don't remember which he asked from my code
    Times asked 2
    Official solution

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

Advice: for theory questions prepare from sheet he doesn't check for demo . he said u already passed l1 that means u have an idea about how your application works and all so. he is nice and chill won't ask hard question just know your code and even for coding questions prepare from sheet only
  1. 1
    Project & System Walkthrough
    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.

  2. 2
    * Completed initial project verification (no demo was required).
    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
    * Explained the user login and registration workflow.
    Times asked 2
    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.

  4. 4
    * Demonstrated how an admin creates a new trek entry.
    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
    * Explained the complete database structure and schema in models.py.
    Times asked 2
    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)
  6. 6
    * Detailed the configuration, setup, and working mechanism of Celery and Redis for asynchronous tasks.
    Times asked 2
    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.

  7. 7
    Coding Tasks
    Times asked 2
    Official solution

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

  8. 8
    * Frontend: Built the corresponding frontend view to connect with and render data from the new backend route.
    Times asked 2
    Official solution

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

  9. 9
    Theory Questions
    Times asked 2
    Official solution

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

  10. 10
    * Difference between watch and computed properties.
    Times asked 1
    Official solution

    SimpleComputed naya value return. Watcher side effect (API, log) jab value change.

    Search debounce, route param change → watch. Display filter → computed.

    Confusion examiner favourite.

    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.

    Example

    watch: {
      query(newQ) { this.fetchSearch(newQ) }
    }

    Project example: q watch → fetchSearch. remainingSeats computed from capacity-booked.

  11. 11
    * Architecture and implementation of vue-router.
    Times asked 2
    Official solution

    SimpleMAD1 typical: Browser → Flask routes → validate/auth → SQLAlchemy → SQLite → Jinja response.

    Suggested flowRequest → Route → Auth check → DB → render_template / redirect

  12. 12
    * Purpose and working mechanism of Axios for HTTP requests.
    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))
Advice: Irrespective of whether you've used a technology/framework or not, make sure you're aware of all the key frameworks and technologies taught in AppDev theory courses (both 1 and 2)
  1. 1
    Joined ~20 minutes late.
    Times asked 2
    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
    Opened the project code and asked to explain:
    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.

  3. 3
    Overall project structure and flow
    Times asked 2
    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.

  4. 4
    Background task (Celery) code flow
    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.

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

  6. 6
    Why is Redis used?
    Times asked 2
    Official solution

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

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

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

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

    Example

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

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

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

  7. 7
    How do background tasks work?
    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.

  8. 8
    Vue.js:
    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.

  9. 9
    Promises
    Times asked 2
    Official solution

    SimplePromise IOU hai: abhi nahi, baad mein value ya error.

    States: pending, fulfilled, rejected. fetch() promise return. then/catch/finally.

    async function hamesha Promise return. await usko unwrap. Galat: await without async; missing await to Promise object milta data nahi.

    JS browser ki language. const rebind nahi, let block. Arrow () => this lexical.

    Promise: pending/fulfill/reject. async/await usko seedha padhne jaisa. try/catch await pe. Yeh Celery nahi — Celery Python worker.

    fetch native AJAX. array.filter/map computed lists. Vue data reactive; plain JS DOM querySelector se manual.

    Example

    fetch('/api/hello')
      .then(r => r.json())
      .then(d => console.log(d))
      .catch(err => console.error(err))

    Project example: fetch venues .then json. Ya async mounted await.

  10. 10
    Walkthrough of database models
    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.

  11. 11
    Model relationships
    Times asked 2
    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')
  12. 12
    Purpose of uselist in SQLAlchemy
    Times asked 2
    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()
  13. 13
    Given a backend route:
    Times asked 2
    Official solution

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

  14. 14
    /company/<company_name>
    Times asked 2
    Official solution

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

  15. 15
    Add a Get Drives button.
    Times asked 2
    Official solution

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

    Example

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

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

  16. 16
    On button click, call the backend API.
    Times asked 2
    Official solution

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

    Example

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

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

  17. 17
    Render the returned list of drives
    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.

Advice: He is a nice proctor only. mostly asks repeated ques
  1. 1
    No demo — straight into code explanation
    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.

  2. 2
    Write template + script: two text inputs (first name, last name), button, on click concatenate and display (all in a .js file)
    Times asked 2
    Official solution

    SimpleVue live: two inputs v-model, button @click se first+last concat karke dikhao.

    Example

    <input v-model="first" /><input v-model="last" />
    <button @click="full = first + ' ' + last">Go</button>
    <p>{{ full }}</p>
  3. 3
    Write a query to return all approved drives/jobs
    Times asked 1
    Official solution

    Simplefilter manager_id / company name / approved. Same Query API. Write query fetch treks/jobs/drives.

    Examiner project-specific names — same pattern.

    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: Drive.query.filter_by(approved=True)

  4. 4
    $route vs $router
    Times asked 2
    Official solution

    Simple$route current (path params query). $router methods push go replace.

    Login redirect this.$router.push. Read id this.$route.params.id.

    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.

    Example

    this.$router.push('/dashboard')
    this.$route.params.id

    Project example: login success push dashboard. Detail page params.

  5. 5
    JWT secret key vs Flask secret key
    Times asked 1
    Official solution

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

    Example

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

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

  6. 6
    backref vs back_populates
    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')
  7. 7
    Asked to show exactly where the API is called and how the admin dashboard renders that data
    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.

  8. 8
    What are asynchronous (background) jobs
    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.

Advice: Explain your code in excruciating detail up front (the functionalities why you used one library over another etc) — the more thoroughly you narrate a file unprompted, the fewer follow-up questions he digs for, since he's mainly testing whether you can explain why something exists, not whether he can catch you out. Learn from other students' form responses beforehand — the question patterns repeat closely across different students with this proctor (same coding-task types, same "versus" pairs). Know the difference between backref and back_populates specifically, not just relationships in general. Be ready to trace a feature end-to-end — from the frontend button/API call through to where the data actually renders on screen — not just the backend route in isolation.
  1. 1
    mutation vs action
    Times asked 1
    Official solution

    SimpleMutations sync diary entry. Actions async kaam phir diary.

    Direct state mutate action se Vuex 4 discouraged. Devtools time-travel mutations.

    Purpose of Actions: API, phir commit. Purpose of Mutations: state change one place.

    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: action fetchVenues → commit setVenues. Mutation sirf array replace.

  2. 2
    write a query to fetch the jobs created by the company google
    Times asked 1
    Official solution

    Simplefilter manager_id / company name / approved. Same Query API. Write query fetch treks/jobs/drives.

    Examiner project-specific names — same pattern.

    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: Drive.query.filter_by(approved=True)

  3. 3
    write template and script such that user takes 2 inputs say firstname and lastname. add a button. upon clicking, it should return firstname+lastname.
    Times asked 2
    Official solution

    SimpleVue live: two inputs v-model, button @click se first+last concat karke dikhao.

    Example

    <input v-model="first" /><input v-model="last" />
    <button @click="full = first + ' ' + last">Go</button>
    <p>{{ full }}</p>
Advice: Go through your entire code. He checks if we understand which thing is written for what.
  1. 1
    There was no project demo in my case. The examiner directly started asking questions from my codebase. He went through the project line by line and asked why I had written certain things, what they do, and whether I had actually implemented those features.
    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.

  2. 2
    Some of the questions I remember are:
    Times asked 2
    Official solution

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

  3. 3
    Explain the configuration files you have used.
    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
    What is the purpose of the JWT secret key?
    Times asked 1
    Official solution

    SimpleHMAC key. Private. Purpose: signature, not encrypt payload.

    algo none attack libraries reject.

    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: JWT_SECRET_KEY config.

  5. 5
    Explain router.js.
    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.

  6. 6
    Create a router object and write the routing 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'
  7. 7
    Why are you using arrow functions in route components? Couldn't you import the components normally?
    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
    Write a database query to fetch all treks belonging to a particular manager.
    Times asked 2
    Official solution

    SimpleSQLAlchemy filter examiner ke hisaab se. Role/status/date. .all() list, .first() one.

    ilike search. join roles. timedelta days. Empty = []. Password strip serialize.

    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

    User.query.filter_by(id=1).first()
    User.query.filter(User.roles.any(Role.name=='admin')).all()
    Booking.query.filter(Booking.created_at > datetime.utcnow() - timedelta(days=5)).all()

    Project example: flask shell ya naya route. Dikhao result JSON.

  9. 9
    My experience
    Times asked 2
    Official solution

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

  10. 10
    Some questions I answered well, some only partially, and a few I couldn't answer. I didn't try to bluff or make things up. Whenever I genuinely didn't know something, I told him honestly.
    Times asked 2
    Official solution

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

  11. 11
    At one point, he gave feedback saying that my answers were okay-ish, but I should understand my own code much better. He specifically said that using AI is not an excuse for not being able to explain or write the code yourself. If you've used AI to build something, you should still understand every part of it.
    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.

  12. 12
    That honestly made me feel much better.
    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.

  13. 13
    Biggest lesson
    Times asked 2
    Official solution

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

  14. 14
    Know every single line of your own code.
    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.

  15. 15
    If you've imported a library:
    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.

  16. 16
    What problem does it solve?
    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.

  17. 17
    Could you have done it another way?
    Times asked 2
    Official solution

    SimpleImprove ideas: caching, better validation, tests, pagination, email reminders, accessibility, mobile UI, logging.

    Viva tip1-2 concrete features bolo jo time milne pe add karte — vague 'AI' mat.

  18. 18
    If you've used a function:
    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.

  19. 19
    What does it return?
    Times asked 2
    Official solution

    Simple.all() list of rows. .first() pehli row ya None. .get(id) PK se ek row / None.

    Example

    User.query.filter_by(role='admin').all()
    User.query.filter_by(email=e).first()
  20. 20
    Why is it needed?
    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.

  21. 21
    What happens if you remove it?
    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.

  22. 22
    If you've copied something from documentation or AI:
    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.

  23. 23
    Read it.
    Times asked 2
    Official solution

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

  24. 24
    Be able to write it again without looking.
    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.

  25. 25
    The examiner doesn't care whether the project works. He wants to know whether you understand what you've written.
    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.

Advice: My advice for everyone Go through your project line by line. Understand every import, configuration, and dependency. Be able to write important snippets (like router configuration or common database queries) without looking. Learn the concepts behind whatever you've used (JWT, Vue Router, computed, watch, Axios, Pinia, SQLAlchemy, etc.). If you haven't implemented a feature, be honest. Don't try to fake it. Revise common Vue concepts like props, emits, computed, watch, routing, conditional rendering, lifecycle hooks, and API calls. Revise backend concepts like JWT authentication, database relationships, SQLAlchemy queries, and why each package is used. Final takeaway The viva is less about whether your project runs and more about whether you truly understand your project. If you know your own code well, you'll do much better than someone who simply copied everything and hoped it wouldn't be asked. That's all from my side. I hope this helps. Best of luck to everyone appearing for the viva—you've got this!
  1. 1
    Viva 2
    Times asked 2
    Official solution

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

  2. 2
    explain all your code and files
    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.

  3. 3
    then he went through frontend and backend
    Times asked 2
    Official solution

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

  4. 4
    asked what is setup in scirpt
    Times asked 2
    Official solution

    Simplesetup() Composition entry — props, context, return state.

    script setup syntactic sugar.

    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.

    Example

    export default {
      setup() {
        const n = ref(0)
        return { n }
      }
    }

    Project example: setup() { const n = ref(0); return { n } }

  5. 5
    computed vs watchers
    Times asked 1
    Official solution

    SimpleComputed naya value return. Watcher side effect (API, log) jab value change.

    Search debounce, route param change → watch. Display filter → computed.

    Confusion examiner favourite.

    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.

    Example

    watch: {
      query(newQ) { this.fetchSearch(newQ) }
    }

    Project example: q watch → fetchSearch. remainingSeats computed from capacity-booked.

  6. 6
    methods vs mounted
    Times asked 2
    Official solution

    SimpleonMounted = Composition API ka mounted. setup() ke andar call.

    Options API: mounted() method. Mix mat. Vue 3 dono chalte.

    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.

    Example

    import { onMounted, ref } from 'vue'
    const items = ref([])
    onMounted(async () => {
      items.value = await (await fetch('/api/items')).json()
    })

    Project example: script setup: onMounted(loadStats).

  7. 7
    what is use of uselist
    Times asked 1
    Official solution

    Simpleuselist=False relationship ko list nahi, single object banata hai — one-to-one / many-to-one scalar.

    Example

    profile = db.relationship('Profile', uselist=False, backref='user')
    # user.profile → Profile obj, list nahi
  8. 8
    v-model vs v-bind
    Times asked 2
    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)
  9. 9
    and many more question from code like he found some words and asked why you have used these and what these do (i forgot)
    Times asked 2
    Official solution

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

  10. 10
    coding question:
    Times asked 3
    Official solution

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

  11. 11
    in create drive form add dropdown for age also where age can be >30 or <30 (in frontend)
    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
  12. 12
    2) in backend you have got a json file { "app" : ">30" } write a code to print that json in terminal it self
    Times asked 2
    Official solution

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

  13. 13
    in the end how much AI you have used, what you have done by yourself
    Times asked 2
    Official solution

    SimpleSach % + kahan + kaise verify + kya seekha. Report se contradict mat.

    Boilerplate vs business logic. Examiner process poochta. 'Sab ChatGPT' red flag.

    Verify: docs, run, edge case. Seekha: CORS, JWT exp, beat vs worker.

    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: Jo number form/PDF mein hai wahi. Example file jo AI se start kiya, khud debug kiya.

    Viva tipExaminer 'kya seekha / kaise check kiya' pe marks. 'Sab ChatGPT' red flag. Jo khud debug kiya woh story ready rakho.

Advice: please get a grip of your code he can ask anything from it, he is strict please be ready with your code understandings
  1. 1
    Level 2 level1_130 No demo Explain code Questions based on code
    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
    Login API
    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.

  3. 3
    How is data being stored?
    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.

  4. 4
    What is name in index. Js
    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
    What is router view and router link
    Times asked 1
    Official solution

    Simplerouter-view = matched page component yahan render. router-link = SPA navigation without full reload.

  6. 6
    What is sse
    Times asked 1
    Official solution

    SimpleSSE ek tarah ka radio: server bolta rehta, client sunta. Client us pipe pe command nahi bhejta.

    text/event-stream. EventSource browser. Notifications ke liye WebSocket se simple.

    MAD2 optional. Celery complete hone pe poll bhi kaafi.

    HTTP postcard (request-response). WebSocket phone call (dono taraf live). SSE radio (server→client stream). Webhook unka server tumhe POST karta hai (payment).

    MAD2 mostly REST. Live dashboard = poll + Redis cache kaafi. Agar implement nahi kiya to design bolo, jhoot mat.

    Project example: Export status poll GET task_id. SSE nahi kiya to bolo alternative.

  7. 7
    What is state management
    Times asked 1
    Official solution

    SimpleShared state across components — Vuex/Pinia. Props hell avoid.

    How share globally.

    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: token user cart.

    Project example: token user cart.

  8. 8
    why did you use axios?
    Times asked 1
    Official solution

    SimpleDX interceptors token, errors. Optional.

    Consistency ek client.

    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: axios instance baseURL.

    Project example: axios instance baseURL.

  9. 9
    Went through celery files Code write template code and route code for selecting a course Asked to run and show.
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: Just get a grip on your code in your project. Be confident if not confident you will get confused.
  1. 1
    Show Student ID, GitHub Collaborator and share the drive link of your report.
    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.

  2. 2
    Demonstrate your Project.
    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
    Where you implemented JWT in frontend.
    Times asked 1
    Official solution

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

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

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

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

    Example

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

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

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

  4. 4
    Show caching code.
    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
    Async Await.
    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.

  6. 6
    Authentication vs Authorization.
    Times asked 10
    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+).

  7. 7
    Explain the code of Admin creation.
    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: Moot ke aana viva me, 30 minutes lag gye total
  1. 1
    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.

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

  3. 3
    Share the report/documentation link.
    Times asked 1
    Official solution

    SimpleOpen docs, AI % same, features map demo.

    Share report link.

    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: Google doc headings.

    Project example: Google doc headings.

  4. 4
    Explain your entire codebase (frontend and backend).
    Times asked 1
    Official solution

    SimpleTree + 6 file roles. Not every line.

    Same walk_code. Stay structured.

    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: Start models end Vue.

    Project example: Start models end Vue.

  5. 5
    Explain your configuration files.
    Times asked 1
    Official solution

    Simpleconfig.py / .env SECRET URI Redis MAIL CACHE celery. No secrets git. Explain configuration files.

    create_app load.

    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: .env.example.

    Project example: .env.example.

  6. 6
    Explain the Login API.
    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.

  7. 7
    Explain how data is stored in your application.
    Times asked 1
    Official solution

    Simpledata() local diary. Store school notice board.

    Search query local. Logged-in user store. Persist: store + localStorage together.

    state vs data: similar concept, scope alag.

    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

    // local
    data() { return { q: '' } }
    // global
    this.$store.state.user

    Project example: Login.vue local form fields. this.$store.state.user Navbar.

  8. 8
    Explain the Admin creation code.
    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.

  9. 9
    Show where the API is called and how data is rendered on the frontend.
    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.

  10. 10
    Explain how the Admin Dashboard receives and displays data.
    Times asked 1
    Official solution

    SimpleAdmin Vue → GET /api/admin/summary roles_required → counts + chart. How dashboard receives data.

    Cached maybe.

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

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

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

    Project example: AdminHome.vue mounted.

    Project example: AdminHome.vue mounted.

  11. 11
    Explain the Celery files.
    Times asked 1
    Official solution

    SimpleTasks list, schedule, broker, trigger, verify MailHog/logs.

    Beat vs worker. User vs scheduled. App context.

    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: Three tasks. Commands README.

  12. 12
    What are asynchronous (background) jobs?
    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.

  13. 13
    Where have you implemented JWT in the frontend?
    Times asked 1
    Official solution

    Simplelogin.vue save. interceptor. guards. LS key. Show JWT frontend.

    Where implemented JWT frontend.

    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: api.js header.

  14. 14
    What is the purpose of the JWT Secret Key?
    Times asked 1
    Official solution

    SimpleHMAC key. Private. Purpose: signature, not encrypt payload.

    algo none attack libraries reject.

    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: JWT_SECRET_KEY config.

  15. 15
    Difference between JWT Secret Key and Flask Secret Key.
    Times asked 1
    Official solution

    SimpleJWT_SECRET sign/verify. Flask SECRET_KEY sessions/CSRF. Alag rakhna better.

    Leak = forge tokens. env var. Rotate.

    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: .env not git. config.py os.environ.

  16. 16
    Authentication vs Authorization.
    Times asked 10
    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.

  17. 17
    What is setup() in Vue?
    Times asked 1
    Official solution

    Simplesetup() Composition entry — props, context, return state.

    script setup syntactic sugar.

    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.

    Example

    export default {
      setup() {
        const n = ref(0)
        return { n }
      }
    }

    Project example: setup() { const n = ref(0); return { n } }

  18. 18
    What is index.js?
    Times asked 1
    Official solution

    Simpleindex.js/main.js frontend entry createApp router store mount.

    package.json not entry of runtime, this is.

    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: src/main.js.

    Project example: src/main.js.

  19. 19
    What is router.js?
    Times asked 1
    Official solution

    Simpleroutes + createRouter history guards. Open explain 2 routes.

    What is router.js / routes.js.

    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: meta.auth on dashboard.

    Project example: meta.auth on dashboard.

  20. 20
    Create a router object and write routing code.
    Times asked 1
    Official solution

    SimplecreateRouter({ history, routes }). app.use(router).

    Create router object write routing code.

    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: main.js use(router).

    Project example: main.js use(router).

  21. 21
    Why did you use createWebHistory()?
    Times asked 1
    Official solution

    SimplePretty URLs. Server fallback needed. Hash if static constraints.

    Why createWebHistory.

    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 hash, why hash: no Flask rewrite.

    Project example: If hash, why hash: no Flask rewrite.

  22. 22
    Why are arrow functions used in route components?
    Times asked 1
    Official solution

    SimpleShort + this parent. Route lazy import.

    Not mandatory everywhere.

    JS browser ki language. const rebind nahi, let block. Arrow () => this lexical.

    Promise: pending/fulfill/reject. async/await usko seedha padhne jaisa. try/catch await pe. Yeh Celery nahi — Celery Python worker.

    fetch native AJAX. array.filter/map computed lists. Vue data reactive; plain JS DOM querySelector se manual.

    Project example: routes.js () => import('./Foo.vue')

    Project example: routes.js () => import('./Foo.vue')

  23. 23
    Difference between router-view and router-link.
    Times asked 1
    Official solution

    Simplerouter-view current page ka hole. router-link SPA <a> bina reload.

    App.vue Navbar + router-view = MAD1 extends equivalent.

    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.

    Example

    <router-link to="/login">Login</router-link>
    <router-view></router-view>

    Project example: App.vue structure.

  24. 24
    Difference between $route and $router.
    Times asked 1
    Official solution

    Simple$route current (path params query). $router methods push go replace.

    Login redirect this.$router.push. Read id this.$route.params.id.

    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.

    Example

    this.$router.push('/dashboard')
    this.$route.params.id

    Project example: login success push dashboard. Detail page params.

  25. 25
    What is State Management?
    Times asked 2
    Official solution

    SimpleShared state across components — Vuex/Pinia. Props hell avoid.

    How share globally.

    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: token user cart.

    Project example: token user cart.

  26. 26
    Difference between Mutation and Action.
    Times asked 1
    Official solution

    SimpleMutations sync diary entry. Actions async kaam phir diary.

    Direct state mutate action se Vuex 4 discouraged. Devtools time-travel mutations.

    Purpose of Actions: API, phir commit. Purpose of Mutations: state change one place.

    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: action fetchVenues → commit setVenues. Mutation sirf array replace.

  27. 27
    Difference between Computed Properties and Watchers.
    Times asked 2
    Official solution

    SimpleComputed naya value return. Watcher side effect (API, log) jab value change.

    Search debounce, route param change → watch. Display filter → computed.

    Confusion examiner favourite.

    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.

    Example

    watch: {
      query(newQ) { this.fetchSearch(newQ) }
    }

    Project example: q watch → fetchSearch. remainingSeats computed from capacity-booked.

  28. 28
    Difference between Methods and Computed.
    Times asked 1
    Official solution

    Simplemethods: click handlers, har call run. computed: cached property jaisa.

    @click save() method. {{ total }} computed. Mat computed ke andar API.

    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: book() method POST. canBook computed seats>0 && !already.

  29. 29
    Difference between v-model and v-bind.
    Times asked 4
    Official solution

    SimpleBind = ek tarfa poster lagana. Model = form jo typed text wapas data mein likhe.

    Display/image/disabled → v-bind. Input/textarea/select → v-model.
    Dono mix: <input v-bind:placeholder="hint" v-model="q">.

    Directives Vue ke special attributes hain — HTML ko superpower: v-if/v-show, v-for, v-bind (:), v-on (@), v-model.

    v-if DOM se hataata/jodta. v-show sirf CSS display. Rare/permission: v-if. Bar-bar toggle: v-show. v-model two-way form. v-bind one-way JS→attribute.

    :key v-for pe zaroori warna Vue galat reuse. v-html XSS. Secret UI ke liye sirf v-if kaafi nahi — API 403 bhi.

    MAD1 Jinja server HTML. MAD2 yeh directives browser mein reactive.

    Example

    <p>{{ price }}</p>
    <img :src="url">
    <input v-model="price">

    Project example: Search box v-model q. Result images :src.

  30. 30
    What is the purpose of :class (dynamic class binding)?
    Times asked 1
    Official solution

    Simple:class object/array/string dynamic CSS.

    Purpose dynamic class. Error red.

    Directives Vue ke special attributes hain — HTML ko superpower: v-if/v-show, v-for, v-bind (:), v-on (@), v-model.

    v-if DOM se hataata/jodta. v-show sirf CSS display. Rare/permission: v-if. Bar-bar toggle: v-show. v-model two-way form. v-bind one-way JS→attribute.

    :key v-for pe zaroori warna Vue galat reuse. v-html XSS. Secret UI ke liye sirf v-if kaafi nahi — API 403 bhi.

    MAD1 Jinja server HTML. MAD2 yeh directives browser mein reactive.

    Example

    <div :class="{ 'text-danger': error, 'fw-bold': important }">Msg</div>

    Project example: :class="{ 'text-danger': error }"

  31. 31
    What is async / await?
    Times asked 2
    Official solution

    Simpleasync/await Promise ko seedha-seedha padhne jaisa banata hai, magic nahi.

    await sirf async ke andar. try/catch reject. Parallel: Promise.all.

    Celery se confuse mat hona — yeh JS event loop, woh Python worker.

    JS browser ki language. const rebind nahi, let block. Arrow () => this lexical.

    Promise: pending/fulfill/reject. async/await usko seedha padhne jaisa. try/catch await pe. Yeh Celery nahi — Celery Python worker.

    fetch native AJAX. array.filter/map computed lists. Vue data reactive; plain JS DOM querySelector se manual.

    Example

    async function load() {
      const r = await fetch('/api/venues')
      return r.json()
    }

    Project example: async mounted() { this.rows = await api() }

  32. 32
    Why did you use Axios?
    Times asked 1
    Official solution

    SimpleDX interceptors token, errors. Optional.

    Consistency ek client.

    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: axios instance baseURL.

    Project example: axios instance baseURL.

  33. 33
    What is uselist?
    Times asked 2
    Official solution

    SimpleFalse → scalar 1-1. True default list 1-M.

    What is uselist. Any 1-1 in models? Honest.

    ORM objects ko tables se map karta hai — raw SQL kam. SQLAlchemy MAD2 default.

    class User(db.Model) + Column + relationship. query.filter_by / db.session.get. Fayda: portable SQLite→Postgres, injection se safer. Nuksaan: N+1, complex SQL.

    SQLite file, zero server — course friendly. Postgres scale. Relationships: FK, backref, lazy/joinedload, cascade on delete. Constraints unique/not null integrity.

    Bookings source of truth DB, Redis cache copy.

    Project example: Profile 1-1 or none.

  34. 34
    Difference between backref and back_populates.
    Times asked 10
    Official solution

    Simplebackref jaadu se reverse attribute. back_populates dono taraf likho — clear.

    backref='author' Post.author auto. New code back_populates preferred.

    Examiner difference almost guaranteed.

    ORM objects ko tables se map karta hai — raw SQL kam. SQLAlchemy MAD2 default.

    class User(db.Model) + Column + relationship. query.filter_by / db.session.get. Fayda: portable SQLite→Postgres, injection se safer. Nuksaan: N+1, complex SQL.

    SQLite file, zero server — course friendly. Postgres scale. Relationships: FK, backref, lazy/joinedload, cascade on delete. Constraints unique/not null integrity.

    Bookings source of truth DB, Redis cache copy.

    Example

    posts = db.relationship('Post', backref='author')
    # vs
    posts = db.relationship('Post', back_populates='author')
    Post.author = relationship('User', back_populates='posts')

    Project example: User.bookings / Booking.user dono explicit back_populates.

  35. 35
    Write a query to: Fetch all treks belonging to a manager. Fetch all jobs created by a company (e.g., Google). Fetch all approved drives/jobs.
    Times asked 1
    Official solution

    Simplefilter manager_id / company name / approved. Same Query API. Write query fetch treks/jobs/drives.

    Examiner project-specific names — same pattern.

    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: Drive.query.filter_by(approved=True)

  36. 36
    What is SSE (Server-Sent Events)?
    Times asked 1
    Official solution

    SimpleSSE ek tarah ka radio: server bolta rehta, client sunta. Client us pipe pe command nahi bhejta.

    text/event-stream. EventSource browser. Notifications ke liye WebSocket se simple.

    MAD2 optional. Celery complete hone pe poll bhi kaafi.

    HTTP postcard (request-response). WebSocket phone call (dono taraf live). SSE radio (server→client stream). Webhook unka server tumhe POST karta hai (payment).

    MAD2 mostly REST. Live dashboard = poll + Redis cache kaafi. Agar implement nahi kiya to design bolo, jhoot mat.

    Project example: Export status poll GET task_id. SSE nahi kiya to bolo alternative.

  37. 37
    Write template and route code to select a course.
    Times asked 1
    Official solution

    Simpleselect v-model course POST. Jinja: select name=course. MAD2 Vue. Write template and route select a course.

    Notepad maybe Jinja still.

    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: Vue select or Jinja if asked MAD1 leftover.

  38. 38
    Add an Age dropdown (>30 / <30) to a form.
    Times asked 1
    Official solution

    Simpleselect >30 <30 v-model filter. Add Age dropdown form.

    Filter list computed or API.

    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: form + filter.

    Project example: form + filter.

  39. 39
    Read and print a JSON object (e.g., {"app": ">30"}) in the backend.
    Times asked 1
    Official solution

    Simple

    data=request.get_json(); print(data); return jsonify(data). Read print JSON object backend.

    {"app": ">30"}.

    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: POST Postman.

    Project example: POST Postman.

  40. 40
    Create two input fields (firstname, lastname) and concatenate them on button click.
    Times asked 1
    Official solution

    Simpledata first last full. method concat this.full=first+' '+last. Two inputs concatenate click.

    Vue.

    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: tiny form.

    Project example: tiny form.

  41. 41
    Create a router and connect a new page/component.
    Times asked 1
    Official solution

    SimplecreateRouter({ history, routes }). app.use(router).

    Create router object write routing code.

    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: main.js use(router).

    Project example: main.js use(router).

  42. 42
    How much AI did you use?
    Times asked 1
    Official solution

    SimpleSach % + kahan + kaise verify + kya seekha. Report se contradict mat.

    Boilerplate vs business logic. Examiner process poochta. 'Sab ChatGPT' red flag.

    Verify: docs, run, edge case. Seekha: CORS, JWT exp, beat vs worker.

    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: Jo number form/PDF mein hai wahi. Example file jo AI se start kiya, khud debug kiya.

    Viva tipExaminer 'kya seekha / kaise check kiya' pe marks. 'Sab ChatGPT' red flag. Jo khud debug kiya woh story ready rakho.

  43. 43
    Which parts of the project did you implement yourself?
    Times asked 1
    Official solution

    SimpleModels + booking logic khud. Boilerplate AI. Specific files.

    Parts you implemented yourself.

    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: Name 2 files pride.

    Project example: Name 2 files pride.

  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
    Download the project from the Viva Portal or perform checksum.
    Times asked 5
    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.

  3. 3
    Give a project demo (if asked).
    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.

  4. 4
    Explain the project architecture/structure.
    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.

  5. 5
    Explain all project files (app.py, .env, routes, models, etc.).
    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.

  6. 6
    Explain the complete project workflow.
    Times asked 2
    Official solution

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

    Suggested flow

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

  7. 7
    Explain the models and their relationships.
    Times asked 1
    Official solution

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

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

    Example skeleton

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

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

  8. 8
    Explain a specific section/line of code selected by the proctor.
    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.

  9. 9
    Explain the login route and its workflow.
    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.

  10. 10
    Explain a feature route (e.g., Add Lot/Create Drive) from frontend to backend.
    Times asked 1
    Official solution

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

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

  11. 11
    Explain how the frontend template connects to the backend.
    Times asked 1
    Official solution

    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().

  12. 12
    Explain the complete workflow of a user action (e.g., booking an appointment).
    Times asked 1
    Official solution

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

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

    Example

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

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

  13. 13
    What is SECRET_KEY?
    Times asked 2
    Official solution

    SimpleSECRET_KEY Flask ka secret jisse session cookies sign/encrypt hoti hain.

    app.config['SECRET_KEY'] = os.getenv('SECRET_KEY', 'dev-key')

    Iske bina session/flash unreliable ya insecure. Key leak = attacker session forge kar sakta hai.
    Hardcode mat karo production mein — .env / environment variable. Flash messages bhi session use karti hain, isliye SECRET_KEY se related hain.
    Hataane pe session kaam nahi / warning. Change karne pe purane sessions invalid.

  14. 14
    Why is SECRET_KEY used and how does it work?
    Times asked 1
    Official solution

    SimpleSECRET_KEY Flask ka secret jisse session cookies sign/encrypt hoti hain.

    app.config['SECRET_KEY'] = os.getenv('SECRET_KEY', 'dev-key')

    Iske bina session/flash unreliable ya insecure. Key leak = attacker session forge kar sakta hai.
    Hardcode mat karo production mein — .env / environment variable. Flash messages bhi session use karti hain, isliye SECRET_KEY se related hain.
    Hataane pe session kaam nahi / warning. Change karne pe purane sessions invalid.

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

  16. 16
    Difference between GET and POST.
    Times asked 7
    Official solution

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

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

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

    Example

    # page dikhana

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

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

  17. 17
    Difference between PUT and POST.
    Times asked 6
    Official solution

    SimplePOST nayi cheez create karta hai, PUT existing cheez ko replace/update karta hai.

    POST /books → naya book add. Har baar naya ID banega. Idempotent nahi — 2 baar POST = 2 records.
    PUT /books/5 → id=5 wale book ko poora update. Same PUT dubara bhejo to same result (idempotent).

    PUT se create bhi ho sakta hai (agar ID client decide kare), lekin REST convention: create = POST, replace = PUT, partial = PATCH.

    Example

    @app.route('/user', methods=['POST'])          # register naya user
    @app.route('/user/<int:id>', methods=['PUT'])  # poora profile replace

    HTML <form> PUT nahi bhejta, isliye Flask apps mein edit pe bhi POST use hota hai. Examiner ko yeh reason clearly bolo.

  18. 18
    Can PUT and POST be used interchangeably?
    Times asked 1
    Official solution

    SimplePOST nayi cheez create karta hai, PUT existing cheez ko replace/update karta hai.

    POST /books → naya book add. Har baar naya ID banega. Idempotent nahi — 2 baar POST = 2 records.
    PUT /books/5 → id=5 wale book ko poora update. Same PUT dubara bhejo to same result (idempotent).

    PUT se create bhi ho sakta hai (agar ID client decide kare), lekin REST convention: create = POST, replace = PUT, partial = PATCH.

    Example

    @app.route('/user', methods=['POST'])          # register naya user
    @app.route('/user/<int:id>', methods=['PUT'])  # poora profile replace

    HTML <form> PUT nahi bhejta, isliye Flask apps mein edit pe bhi POST use hota hai. Examiner ko yeh reason clearly bolo.

  19. 19
    What is an idempotent HTTP method?
    Times asked 1
    Official solution

    SimpleIdempotent method ko kitni baar chalao, result same rehna chahiye.

    GET, PUT, DELETE theoretically idempotent. POST nahi — har POST naya record bana sakta hai.
    PUT /user/1 {name:Ram} 5 baar = same user Ram.
    POST /user {name:Ram} 5 baar = 5 users.
    DELETE pehli baar delete, doosri baar 404 — resource state same (deleted).

  20. 20
    What happens if method="POST" is removed from an HTML form?
    Times asked 1
    Official solution

    Definition style question: 1 line simple Hinglish + project example + mini code.

    Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'

    Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'

    Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.

  21. 21
    If url_for() is removed from redirect(), how would you achieve the same result?
    Times asked 1
    Official solution

    Simpleurl_for sirf URL string banata hai, redirect us URL pe browser ko bhejta hai.

    url_for('home') → '/home' (function name se URL nikalta hai)
    redirect(url_for('home')) → browser ko /home pe le jaata hai

    Example

    return redirect(url_for('dashboard'))  # sahi
    return redirect('/dashboard')         # hardcode, route change pe toot jaayega
    
    Agar redirect se url_for hata do to khud path string dena padega: redirect('/dashboard').
    Agar url_for('home') ko url_for('home_page') kar do aur home_page naam ka function nahi hai to BuildError aayega.

    url_for ko function ka naam chahiye, URL path nahi.

  22. 22
    Difference between id and name attributes.
    Times asked 1
    Official solution

    SimpleForm user input server ko bhejti hai. Table rows/columns dikhati hai.

    <form action="{{ url_for('register') }}" method='POST' enctype='multipart/form-data'>
      <input name='email' required>
      <button type='submit'>Go</button>
    </form>

    name attribute server pe key ban'ti hai: request.form['email']. id JS/CSS, value default/dikhta hua text.
    action URL. method GET/POST. enctype file upload pe multipart.
    required frontend empty submit rokta hai (backend phir bhi check).

    <table><thead><tr><th>Name</th></tr></thead><tbody><tr><td>{{ u.name }}</td></tr></tbody></table>

    th header, td data, tr row. Nested table: td ke andar table (avoid, messy).
    method hataoge to GET, password URL mein — buri baat.

  23. 23
    Difference between Block and Inline elements.
    Times asked 1
    Official solution

    SimpleBlock poori line leta hai, Inline text ke saath baithta hai.

    Block (div, p, h1, section): width 100%, next element neeche aata hai. Height/width/margin set kar sakte ho.
    Inline (span, a, strong): sirf content jitni jagah. Width/height generally nahi chalti.
    Inline-block: inline ki tarah baithta hai, lekin width/height milti hai.

    Example

    <div>Hello</div><div>World</div> do lines. <span>Hello</span> <span>World</span> ek line.
  24. 24
    Difference between Inline CSS and Internal CSS.
    Times asked 2
    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.

  25. 25
    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+).

  26. 26
    Write a Jinja for loop to display a list.
    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>

  27. 27
    Write a Flask endpoint that accepts query parameters and returns JSON data.
    Times asked 1
    Official solution

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

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

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

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

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

  28. 28
    What is API parsing/argument parsing?
    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.

  29. 29
    Write the Git command to create/switch branches.
    Times asked 1
    Official solution

    SimpleGit files ki history rakhta hai. GitHub remote + collaborator viva check.

    git status — kya change/untracked
    git checkout -b viva-fix ya git switch -c viva-fix — nayi branch
    git rm --cached notes.txt — track band, file disk pe rahe (.gitignore)
    git log — commits (examiner poochta hai)
    Collaborator: repo → Settings → Collaborators. MAD-1 instructor add karna mandatory hota hai.

  30. 30
    Write the Git command to stop tracking a file.
    Times asked 1
    Official solution

    SimpleGit files ki history rakhta hai. GitHub remote + collaborator viva check.

    git status — kya change/untracked
    git checkout -b viva-fix ya git switch -c viva-fix — nayi branch
    git rm --cached notes.txt — track band, file disk pe rahe (.gitignore)
    git log — commits (examiner poochta hai)
    Collaborator: repo → Settings → Collaborators. MAD-1 instructor add karna mandatory hota hai.

  31. 31
    What are Pytest markers?
    Times asked 1
    Official solution

    SimpleTesting code sahi hai verify. Unit = chhote functions, Integration = route+DB, System = poora flow.

    Pytest: test_*.py, assert. Markers: @pytest.mark.slow skip/select. Keywords: pytest -k login.
    Unit testing se regression kam, viva ke alawa CI mein fayda. Manual: demo scenarios (overbook, blacklist).

  32. 32
    Difference between Pytest markers and keywords.
    Times asked 1
    Official solution

    SimpleTesting code sahi hai verify. Unit = chhote functions, Integration = route+DB, System = poora flow.

    Pytest: test_*.py, assert. Markers: @pytest.mark.slow skip/select. Keywords: pytest -k login.
    Unit testing se regression kam, viva ke alawa CI mein fayda. Manual: demo scenarios (overbook, blacklist).

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