Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level2_131

Share your experience Add your viva experience here
156 Questions
21 Sets
0 Topics
10 Reviews
Tips for this examiner: Examiner is very good and patient, clearly explains his questions
No mobile joining for level 1

Student reviews

-- MAD1

1. Examiner is very nice, patient, give you enough time, doesn't rush you. Quite patient with your answer and ask followup questions on that (not very difficult, you will be able to answer)
2. Know everything about your code. specially jinja and routes.
3. Prepare the questions from this sheet.
4. Just be calm and confident.

Questions remembered
  1. Photo ID
  2. Github Collaborator.
  3. Downloaded the zip from portal and ran it. (I requested to not do checksum to save time).
  4. He asked to create a company, admin approval, create a job drive, whole admin flow, whole student flow of applying, updating profile etc.
  5. Show the model.py he checked all the code for each table.
  6. Write controller program to fetch all company details and send it to front end.
  7. Write jinja loop.
  8. Asked about jinja - He expects detailed answer not just definition. everything backend frontend how jinja impacts it etc.
  9. Asked about CORS - we both had a brief discussion got learn more about it.
  10. Do you have any questions for me.
Piyush MAD1

He is a very chill guy. just be confident and if you have not used multiple additional modules like flask_wtf, blueprint, flask_login and such, keep your basics strong like about sqlalchemy models, routing, jinja syntax and uses
if you used them, then keep the login of them, their different methods and all in your mind, he will ask about them a little when he gets assured that you know the basics and you know the logic behind your code

Questions remembered
  1. id, collaborater, checksum and all
  2. start the app and do what he was saying, register company, student... to check all the required functions
  3. open notepad and make a controller for fetching and sending all the data of all the companies to the frontend
  4. saw my code, asked about the code, which ORM i used. And because I used blueprint and flask_wtf so he asked about them what are they used for and how
  5. what is CORS? i answered it correctly but very unprofessionally
  6. he asked if i used ai for help.( i was honest and said i used for bootstrap, although i don't suggest this)
  7. he asked me if i have any question or anything to ask him. I asked i don't see flask being very useful in the industry like node or django for backend and fastapi for APIs, then why are we learning flask specifically rn, he explained it very nicely because my slot was very late( at 8pm) we didn't have much conversation but he wished me luck with a All the best and said i did good. A very chill and nice proctor imo.
Tung tung sahur MAD1

be calm my proctor was hella chill i made him repeat hella cuz am dumb but he didnt get angry or frustrated

Questions remembered
  1. Show id
  2. Show git collab status
  3. download project from viva portal
  4. demonstrate project
  5. create company
  6. approve company from admin
  7. create a new placement drive
  8. approve placement drive from the admin
  9. apply to that placement drive from student
  10. black list company
  11. see if the company can login again
  12. what's difference between put and patch
  13. what's CORS ( i didn't know this) ;-;
  14. go to vs code and show full project and scroll
  15. go to models and tell which models you have created
  16. have you written it on your own?
  17. any questions you have ? notepad section: write a route to fetch all the companies and send them to the backend @app.route("/fetech_companies" , methods=["GET"]) def fetch_companies(): companies = Companies.query.all() return render_template("sample.html" , companies = companies)
Rakesh MAD1

Shared viva questions from response sheet: Demo of the Project; Shown the Codebase; He check and let me asked to scroll to down and asked what is the significance of particular line of code?

Questions remembered
  1. Demo of the Project
  2. Shown the Codebase
  3. He check and let me asked to scroll to down and asked what is the significance of particular line of code?
  4. Portion of code explanation?
  5. HTTP Requests
  6. Use of Jinja2
  7. Open notepad and write a query to fetch all companies information from Companies table
HADES MAD1

Proctor is very helpful and calm, he even corrected me when i doing mistake in my syntax during coding task. overall very smooth viva .In the end he even gave a feedback of my performance as well , with small project refining tips as well

Questions remembered
  1. 1)Add company for registration and approve it from admin
  2. 2)Add Drive
  3. 3)Add Student Record and Apply for Drive
  4. like this he check for every imortant features and asked question related to it
  5. For Theory
  6. he asked for Http methods (i actually forgot about update of he corrected me on that as well), ORM Used , Where i have used JInja2 templates, how do you send data from backend to frontend.
  7. For Code
  8. he tasked me to write the controller program to fetch all company data and forward them to frontend html page in a notepad
  9. and then in front end how will i iterate though each record using jinja
vijayaraghavan MAD1

He was cool, helped in the notepad syntax

Questions remembered
  1. show id,show,collaborator,download code from github 2) create student,company and show the flow 3) what is the ORM used 4) show me th MVCs,5) show me the search feature for the comapny and student 6) show me how do you black list company 7) open note pad and show me take all users from DB and send to a html.
Hitesh MAD1

He is supportive. Gives you hints if u are stuck somewhere

Questions remembered
  1. Present the application
  2. what is jinja?
  3. what are the different Http methods you know of?
  4. what is MVC? Show in your code what is M V and C.
  5. Open notepad and write a controller code to fetch all users and render in a html file
Aryan MAD1

He's super chill, He emphasized on application demonstration and its functionality, but also asked basic question which were already there in the VIVA PYQ.

Just focus on the code logic, understand it properly.

VIVA-1 is super easy, you just need to understand the logic behind the code.

and try to explain the logic behind the code while showing the demonstration.

For example while adding an entry during the demonstration, explain where it is added, how it is added, and what is used in the whole process from clicking a button to the end of process.

It's basic, but only if you know the LOGIC

Questions remembered
  1. First he started with demonstration, showing the full app and functionality
  2. Show me your models.py
  3. What is MVC and how it is applied into your application
  4. what is jinja and why is it needed in your application
  5. What would be harder if jinja was not present in your application
  6. Explain the specific part of code, what it does and the logic No code changes were asked.
Sid MAD1

Very chill person just be confident and answer and be honest about your project he appreciates it.

Questions remembered
  1. Just asks for demo of app
Mani Manjunath MAD1

Shared viva questions from response sheet: Nothing much just demo

Questions remembered
  1. Nothing much just demo

Approved viva sets

  1. 1
    ID Card and Github collaborator verification
    Times asked 2
  2. 2
    In Theory:
    Times asked 2
  3. 3
    Write the basic structure of vue
    Times asked 2
  4. 4
    What is template
    Times asked 2
  5. 5
    What is script
    Times asked 1
  6. 6
    What is style
    Times asked 2
  7. 7
    asked about role based acess
    Times asked 2
  8. 8
    And asked where u implement celery
    Times asked 2
  9. 9
    In Practical:
    Times asked 2
  10. 10
    Register student, asked to login as student and admin
    Times asked 2
  11. 11
    And asked to add drive
    Times asked 1
  12. 12
    asked to apply for drive
    Times asked 2
Advice: He is good proctor and explaining the concepts which you have not aware! Prepare well the Viva questions in the excel sheets! All the best guys!
  1. 1
    L2_Viva 1.Explain the file structure like location of celery job, scripts, routes etc
    Times asked 2
  2. 2
    Explain what is broker and purpose of broker_url
    Times asked 2
  3. 3
    Difference between Sql database and redis database? What type is redis database?-key-valuepair 4.Asked to show model.py file and asked to explain backref and secondary use.
    Times asked 2
  4. 4
    Token based authentication implementation and how hashing is done. Expected to explain the config setup for password hashing. 6.Where the token is getting saved ie server side or client side?
    Times asked 2
  5. 5
    What is purpose of jsonify? 8.In JavaScript, what are different ways to initiate/create/define variables? -let,const,var
    Times asked 2
  6. 6
    Show any Vue component and explain how it is mapped to url and quick walkthru of its structure?
    Times asked 2
  7. 7
    Asked If i am aware of parent and child component . If yes explain it and show where it is used?
    Times asked 2
  8. 8
    Show all the celery jobs that are implemented
    Times asked 2
  9. 9
    What is the purpose of beat?
    Times asked 1
  10. 10
    What are props in Vue
    Times asked 2
  11. 11
    What do you mean by Virtual DOM
    Times asked 2
Advice: Both L1 and L2 proctors were patient and were actively listening. Alteast be familiar with any two components implementation thoroughly. Second understand celery jobs and third models. I think this is bare minimum
  1. 1
    Show your ID
    Times asked 3
  2. 2
    Show the demo
    Times asked 2
  3. 3
    Where did you use caching and why?
    Times asked 2
  4. 4
    What is the Vue lifecycle?
    Times asked 1
Advice: He was a very nice, calm and polite proctor
  1. 1
    Where all have you used caching? Asked to change the celery tasks to one minute for testing Asked how much AI %age I have used as I had done a lot of commenting in my code so he was doubting I had done whole project using AI
    Times asked 2
Advice: Chill, patient, polite proctor Explains questions with answers if u answer partially correct Just be thorough with the code and learn in deep about caching, celery Make sure you know in and out of your code so that it does not feel like you have made it using AI(even though if you did it)
  1. 1
    What is the use of Async functions
    Times asked 1
Advice: Examiner is very good and patient, clearly explains his questions No mobile joining for level 1
  1. 1
    Photo ID
    Times asked 1
    Official solution

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

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

  2. 2
    Downloaded the zip from portal and ran it. (I requested to not do checksum to save time).
    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
    He asked to create a company, admin approval, create a job drive, whole admin flow, whole student flow of applying, updating profile etc.
    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
    Show the model.py he checked all the code for each table.
    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
    Write controller program to fetch all company details and send it to front end.
    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)
  6. 6
    Asked about jinja - He expects detailed answer not just definition. everything backend frontend how jinja impacts it etc.
    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 %}
  7. 7
    Asked about CORS - we both had a brief discussion got learn more about it.
    Times asked 1
    Official solution

    SimpleDifferent origin Vue vs Flask — browser CORS check. Server Allow-Origin.

    Failed = frontend error even if curl works. Examiner curl vs browser.

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

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

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

    Example

    from flask_cors import CORS
    CORS(app, resources={r'/api/*': {'origins': 'http://localhost:8080'}})

    Project example: Flask-CORS localhost:8080.

  8. 8
    Do you have any questions for me.
    Times asked 1
    Official solution

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

Advice: 1. Examiner is very nice, patient, give you enough time, doesn't rush you. Quite patient with your answer and ask followup questions on that (not very difficult, you will be able to answer) 2. Know everything about your code. specially jinja and routes. 3. Prepare the questions from this sheet. 4. Just be calm and confident.
  1. 1
    id, collaborater, checksum and all
    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
    start the app and do what he was saying, register company, student... to check all the required functions
    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
  3. 3
    open notepad and make a controller for fetching and sending all the data of all the companies to the frontend
    Times asked 1
    Official solution

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

  4. 4
    saw my code, asked about the code, which ORM i used. And because I used blueprint and flask_wtf so he asked about them what are they used for and how
    Times asked 1
    Official solution

    SimpleBlueprint se app ko modules mein todte ho — auth, admin, user alag files. Scale + clean structure.

    Example

    auth_bp = Blueprint('auth', __name__, url_prefix='/auth')
    
    @auth_bp.route('/login')
    def login(): ...
    
    app.register_blueprint(auth_bp)

    Viva tipViva: 'kyun blueprint?' → separation of concerns, badi app maintainable.

  5. 5
    he asked if i used ai for help.( i was honest and said i used for bootstrap, although i don't suggest this)
    Times asked 1
    Official solution

    SimpleBootstrap CSS framework — grid, navbar, buttons jaldi. CDN ya downloaded files.

  6. 6
    he asked me if i have any question or anything to ask him. I asked i don't see flask being very useful in the industry like node or django for backend and fastapi for APIs, then why are we learning flask specifically rn, he explained it very nicely because my slot was very late( at 8pm) we didn't have much conversation but he wished me luck with a All the best and said i did good. A very chill and nice proctor imo.
    Times asked 1
    Official solution

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

Advice: He is a very chill guy. just be confident and if you have not used multiple additional modules like flask_wtf, blueprint, flask_login and such, keep your basics strong like about sqlalchemy models, routing, jinja syntax and uses if you used them, then keep the login of them, their different methods and all in your mind, he will ask about them a little when he gets assured that you know the basics and you know the logic behind your code
  1. 1
    Show git collab status
    Times asked 1
    Official solution

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

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

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

  2. 2
    demonstrate project
    Times asked 1
    Official solution

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

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

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

  3. 3
    approve placement drive from the admin
    Times asked 1
    Official solution

    SimpleProject overview: problem → roles → main entities → key flows (register, book, admin approve).

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  4. 4
    apply to that placement drive from student
    Times asked 1
    Official solution

    SimpleProject overview: problem → roles → main entities → key flows (register, book, admin approve).

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  5. 5
    black list company
    Times asked 1
    Official solution

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

  6. 6
    see if the company can login again
    Times asked 1
    Official solution

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

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

    Example

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

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

  7. 7
    what's CORS ( i didn't know this) ;-;
    Times asked 1
    Official solution

    SimpleDifferent origin Vue vs Flask — browser CORS check. Server Allow-Origin.

    Failed = frontend error even if curl works. Examiner curl vs browser.

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

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

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

    Example

    from flask_cors import CORS
    CORS(app, resources={r'/api/*': {'origins': 'http://localhost:8080'}})

    Project example: Flask-CORS localhost:8080.

  8. 8
    go to vs code and show full project and scroll
    Times asked 1
    Official solution

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

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

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

  9. 9
    go to models and tell which models you have created
    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)
  10. 10
    have you written it on your own?
    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: be calm my proctor was hella chill i made him repeat hella cuz am dumb but he didnt get angry or frustrated
  1. 1
    Demo of the Project
    Times asked 1
    Official solution

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

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

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

  2. 2
    Shown the Codebase
    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
    He check and let me asked to scroll to down and asked what is the significance of particular line 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'
  4. 4
    Portion of code explanation?
    Times asked 1
    Official solution

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

  5. 5
    HTTP Requests
    Times asked 1
    Official solution

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

  6. 6
    Use of Jinja2
    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 %}
  7. 7
    Open notepad and write a query to fetch all companies information from Companies table
    Times asked 1
    Official solution

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

  1. 1
    1)Add company for registration and approve it from admin
    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
    3)Add Student Record and Apply for Drive
    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
    like this he check for every imortant features and asked question related to it
    Times asked 1
    Official solution

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

  4. 4
    For Theory
    Times asked 1
    Official solution

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

  5. 5
    he asked for Http methods (i actually forgot about update of he corrected me on that as well), ORM Used , Where i have used JInja2 templates, how do you send data from backend to frontend.
    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 %}
  6. 6
    he tasked me to write the controller program to fetch all company data and forward them to frontend html page in a notepad
    Times asked 1
    Official solution

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

  7. 7
    and then in front end how will i iterate though each record using jinja
    Times asked 1
    Official solution

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

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
Advice: Proctor is very helpful and calm, he even corrected me when i doing mistake in my syntax during coding task. overall very smooth viva .In the end he even gave a feedback of my performance as well , with small project refining tips as well
  1. 1
    what are the different Http methods you know of?
    Times asked 1
    Official solution

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

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

    GET exists bina REST ke bhi — browser address bar.

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

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

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

    Example

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

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

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

  2. 2
    what is MVC? Show in your code what is M V and C.
    Times asked 1
    Official solution

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

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

  3. 3
    Open notepad and write a controller code to fetch all users and render in a html file
    Times asked 1
    Official solution

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

Advice: He is supportive. Gives you hints if u are stuck somewhere
  1. 1
    First he started with demonstration, showing the full app and functionality
    Times asked 1
    Official solution

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

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

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

  2. 2
    Show me your models.py
    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
    What is MVC and how it is applied into your application
    Times asked 1
    Official solution

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

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

  4. 4
    what is jinja and why is it needed in your application
    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
    What would be harder if jinja was not present in your application
    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
    Explain the specific part of code, what it does and the logic No code changes were asked.
    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's super chill, He emphasized on application demonstration and its functionality, but also asked basic question which were already there in the VIVA PYQ. Just focus on the code logic, understand it properly. VIVA-1 is super easy, you just need to understand the logic behind the code. and try to explain the logic behind the code while showing the demonstration. For example while adding an entry during the demonstration, explain where it is added, how it is added, and what is used in the whole process from clicking a button to the end of process. It's basic, but only if you know the LOGIC
  1. 1
    Just asks for demo of app
    Times asked 1
    Official solution

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

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

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

Advice: Very chill person just be confident and answer and be honest about your project he appreciates it.
  1. 1
    Nothing much just 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.

  1. 1
    ID Card and Github collaborator verification
    Times asked 2
    Official solution

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

    Example

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

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

  2. 2
    In Theory:
    Times asked 2
    Official solution

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

  3. 3
    Write the basic structure of vue
    Times asked 2
    Official solution

    SimpleComponent + route ya template v-if/v-for/fetch. :key dena.

    Clock interval + clear. Add numbers v-model.number. New page routes.js.

    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

    <input v-model.number="a"><input v-model.number="b">
    <p>{{ a + b }}</p>

    Project example: views/Foo.vue + path. mounted fetch if API.

  4. 4
    What is template
    Times asked 2
    Official solution

    SimpleTemplate = HTML + placeholders. Jinja {{ }} / Vue template section. Data inject karke UI banata hai.

  5. 5
    What is style
    Times asked 2
    Official solution

    Simplestyle = CSS. Inline, <style>, Bootstrap classes, ya Vue scoped CSS.

  6. 6
    asked about role based acess
    Times asked 2
    Official solution

    SimpleRBAC = Role Based Access Control. Roles (admin/user) se permissions milti hain, har user pe alag list nahi.

    Example

    if current_user.role != 'admin':
        flash('Not allowed')
        return redirect(url_for('user.home'))
  7. 7
    And asked where u implement celery
    Times asked 2
    Official solution

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

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

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

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

    Redis broker chahiye. Beat alag process schedule ke liye.

    Example

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

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

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

  8. 8
    In Practical:
    Times asked 2
    Official solution

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

  9. 9
    Register student, asked to login as student and admin
    Times asked 2
    Official solution

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

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

  10. 10
    asked to apply for drive
    Times asked 2
    Official solution

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

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

    Example

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

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

  11. 11
    asked to show the coding in admin and drive as i have faced error in front end part
    Times asked 1
    Official solution

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

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

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

Advice: He is good proctor and explaining the concepts which you have not aware! Prepare well the Viva questions in the excel sheets! All the best guys!
  1. 1
    L2_Viva 1.Explain the file structure like location of celery job, scripts, routes etc
    Times asked 2
    Official solution

    Simplebackend create_app models api jobs. frontend src router. config env. README.

    Don't read every file. 6 roles.

    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: tree command or VSCode explorer.

  2. 2
    Explain what is broker and purpose of broker_url
    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
    Difference between Sql database and redis database? What type is redis database?-key-valuepair 4.Asked to show model.py file and asked to explain backref and secondary use.
    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)
  4. 4
    Token based authentication implementation and how hashing is done. Expected to explain the config setup for password hashing. 6.Where the token is getting saved ie server side or client side?
    Times asked 2
    Official solution

    SimplePassword plain text mat store. werkzeug generate_password_hash / check_password_hash.

    Example

    from werkzeug.security import generate_password_hash, check_password_hash
    user.password = generate_password_hash(raw)
    check_password_hash(user.password, raw)
  5. 5
    What is purpose of jsonify? 8.In JavaScript, what are different ways to initiate/create/define variables? -let,const,var
    Times asked 2
    Official solution

    Simplejsonify Python dict/list ko JSON response + proper Content-Type deta hai.

    Example

    return jsonify(message='ok', count=3), 200
  6. 6
    Show any Vue component and explain how it is mapped to url and quick walkthru of its structure?
    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.

  7. 7
    Asked If i am aware of parent and child component . If yes explain it and show where it is used?
    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
    Show all the celery jobs that are implemented
    Times asked 2
    Official solution

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

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

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

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

    Redis broker chahiye. Beat alag process schedule ke liye.

    Example

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

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

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

  9. 9
    What are props in Vue
    Times asked 2
    Official solution

    SimpleVue.js frontend framework — reactive UI components. MAD2 mein common, MAD1 optional.

    Component: reusable UI (Navbar.vue) + data + template.
    Props: parent → child data. Child → parent: $emit('update', val).
    Slots: parent child ke andar extra HTML daal sakta hai.
    Lifecycle: created (data setup), mounted (DOM ready — API call), updated, unmounted.
    v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
    Standalone component: khud ke saath compile, parent register kam.

  10. 10
    What is watcher
    Times asked 1
    Official solution

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

  11. 11
    What do you mean by Virtual DOM
    Times asked 2
    Official solution

    SimpleVirtual DOM memory tree. Diff, sirf farq real DOM pe. Fayda kam DOM ops. Nuksaan chhote page overhead.

    Vue/React. jQuery direct DOM. Lose reactivity Vue2 new property bina set.

    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: v-for list patch, poora innerHTML nahi.

Advice: Both L1 and L2 proctors were patient and were actively listening. Alteast be familiar with any two components implementation thoroughly. Second understand celery jobs and third models. I think this is bare minimum
  1. 1
    Show your ID
    Times asked 3
    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
    Show the demo
    Times asked 2
    Official solution

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

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

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

  3. 3
    Where did you use caching and why?
    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.

  4. 4
    What goes inside the script section? (I didn't get the question but the answer was - data, methods...)
    Times asked 1
    Official solution

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

  5. 5
    What is included in a Vue component?
    Times asked 1
    Official solution

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

    Progressive frontend framework. Components, reactivity, directives.

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

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

    Example

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

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

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

Advice: He was a very nice, calm and polite proctor
  1. 1
    Asked to add 3 lots, edit one of the lots Saw summary pages and asked to do 2 reservations of the same lot in user dashboard to check how my summary page is changing Asked following-
    Times asked 1
    Official solution

    SimpleCRUD 4 operations live: add list edit delete, list refresh.

    REST mapping. Related bookings after delete ready answer.

    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

    POST /api/venues → add
    GET /api/venues → list
    PUT /api/venues/3 → edit
    DELETE /api/venues/3

    Project example: Admin venues. Postman + UI dono.

    Viva tipUpdate ke baad list refresh hoke naya data dikhe. Delete ke baad related bookings kya hoti hain, ready raho.

  2. 2
    What are we avoiding using caching?
    Times asked 1
    Official solution

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

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

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

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

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

    Example

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

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

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

  3. 3
    Where all have you used caching? Asked to change the celery tasks to one minute for testing Asked how much AI %age I have used as I had done a lot of commenting in my code so he was doubting I had done whole project using AI
    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.

Advice: Chill, patient, polite proctor Explains questions with answers if u answer partially correct Just be thorough with the code and learn in deep about caching, celery Make sure you know in and out of your code so that it does not feel like you have made it using AI(even though if you did it)
  1. 1
    Explain the Vue Lifecycle
    Times asked 1
    Official solution

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

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

  2. 2
    What is the use of Caching
    Times asked 1
    Official solution

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

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

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

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

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

    Example

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

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

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

Advice: Examiner is very good and patient, clearly explains his questions No mobile joining for level 1
  1. 1
    Show Student ID and GitHub collaborator.
    Times asked 1
    Official solution

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

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

    Collaborator settings. Commit dates.

    Example

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

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

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

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

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

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

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

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

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

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

  3. 3
    Create 3 parking lots.
    Times asked 1
    Official solution

    SimpleAdmin POST 3 lots loop. Create 3 parking lots. Edit one of lots CRUD.

    Form name capacity.

    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: Admin lots.

    Project example: Admin lots.

  4. 4
    Edit one of the lots.
    Times asked 1
    Official solution

    SimpleCRUD 4 operations live: add list edit delete, list refresh.

    REST mapping. Related bookings after delete ready answer.

    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

    POST /api/venues → add
    GET /api/venues → list
    PUT /api/venues/3 → edit
    DELETE /api/venues/3

    Project example: Admin venues. Postman + UI dono.

    Viva tipUpdate ke baad list refresh hoke naya data dikhe. Delete ke baad related bookings kya hoti hain, ready raho.

  5. 5
    Make 2 reservations for the same lot from the user dashboard.
    Times asked 1
    Official solution

    SimpleCRUD 4 operations live: add list edit delete, list refresh.

    REST mapping. Related bookings after delete ready answer.

    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

    POST /api/venues → add
    GET /api/venues → list
    PUT /api/venues/3 → edit
    DELETE /api/venues/3

    Project example: Admin venues. Postman + UI dono.

    Viva tipUpdate ke baad list refresh hoke naya data dikhe. Delete ke baad related bookings kya hoti hain, ready raho.

  6. 6
    Show how the summary/dashboard updates after multiple reservations.
    Times asked 1
    Official solution

    SimpleCounts API, bar/pie, booking ke baad number badle.

    2 colors live task common.

    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

    new Chart(ctx, {
      type: 'bar',
      data: { labels: ['Jan','Feb'], datasets: [{ data: [12, 19], backgroundColor: ['#36a','#f80'] }] }
    })

    Project example: Admin dashboard.

    Viva tipBooking karke chart update dikhao. Examiner 2 colors maange to backgroundColor array chhota kar do.

  7. 7
    Register a student/user.
    Times asked 1
    Official solution

    SimplePublic register POST hash default role. Register a student/user.

    Demo.

    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: Register.vue.

    Project example: Register.vue.

  8. 8
    Log in as both student/user and admin.
    Times asked 1
    Official solution

    SimpleTwo browsers student + admin. Features contrast. Log in as both.

    Demo RBAC.

    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: Incognito.

    Project example: Incognito.

  9. 9
    Add a drive (or equivalent admin feature).
    Times asked 1
    Official solution

    Simpleadmin form POST create drive pending. Add a drive admin feature.

    CRUD.

    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: AdminDrives.vue.

  10. 10
    Apply for the drive.
    Times asked 1
    Official solution

    SimplePOST /api/apply {drive_id} unique eligibility. Apply for the drive. Write endpoint apply.

    Prevent multiple after selection unique where selected.

    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: Apply button.

  11. 11
    Explain the code when a frontend error occurs.
    Times asked 1
    Official solution

    SimpleConsole stack Vue warn Network. Fix then retry. Explain code when frontend error occurs.

    try/catch.

    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: Reproduce.

    Project example: Reproduce.

  12. 12
    Show where Celery is implemented.
    Times asked 1
    Official solution

    SimpleTask function, beat dict, delay() call, worker+beat terminals, MailHog/CSV.

    App context DB. Args serializable. How many jobs: reminder, monthly, export — gino honestly.

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

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

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

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

    Project example: tasks.py + config schedule + POST export.

  13. 13
    Change Celery scheduled tasks to run every 1 minute for testing.
    Times asked 1
    Official solution

    SimpleTest ke liye dono jobs crontab(minute='*/1'), demo ke baad wapas original.

    Beat restart. MailHog spam ho sakta hai — ek-do mails dikha ke revert.

    Examiner scheduling samajh check karta hai, production cron nahi.

    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: Change config, restart beat, worker log Task succeeded, MailHog UI.

  14. 14
    Show where caching is implemented and explain why each route is cached.
    Times asked 1
    Official solution

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

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

    print after set sirf miss. Timeout chhota karke expiry.

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

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

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

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

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

    Project example: resources list GET cached. create_venue delete key.

  15. 15
    Explain the Vue Lifecycle.
    Times asked 1
    Official solution

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

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

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

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

    Example

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

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

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

  16. 16
    What is a Vue component?
    Times asked 2
    Official solution

    SimpleComponent Lego block: UI + data. Pages routes, components unke andar.

    Bahut files = maintainable Navbar/Footer. Not a bug.

    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

    app.component('Hello', { template: '<p>Hi {{ name }}</p>', props: ['name'] })

    Project example: src/components vs views. router uses views.

    Viva tipBahut Vue files isliye: har page/feature alag — maintainable. Navbar layout har route pe.

  17. 17
    What is the basic structure of a Vue component?
    Times asked 1
    Official solution

    SimpleSFC ek .vue file: template + script + style. Reusable scoped CSS.

    Pages route-level. Components andar. Vue 2 one root; Vue 3 fragments.

    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

    <template><div>{{ venue.name }}</div></template>
    <script>export default { props: ['venue'] }</script>
    <style scoped>.card{padding:8px}</style>

    Project example: VenueCard.vue props. views/Home.vue page.

  18. 18
    What goes inside the <template> section?
    Times asked 1
    Official solution

    SimpleHTML + directives {{ }}. Vue2 one root, Vue3 fragments OK.

    What goes in template.

    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: <template> first child.

    Project example: <template> first child.

  19. 19
    What goes inside the <script> section? (e.g., data, methods, computed, lifecycle hooks, etc.)
    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.

  20. 20
    What goes inside the <style> section?
    Times asked 1
    Official solution

    SimpleCSS scoped or not. Preprocessors optional. Bootstrap extra file.

    What goes in style.

    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: <style scoped>.

    Project example: <style scoped>.

  21. 21
    What is a Watcher?
    Times asked 1
    Official solution

    Simplewatch = 'jab yeh badle tab yeh karo'. Computed nahi, kyunki return value nahi, kaam hai.

    deep: true objects. immediate: true first run. Composition watch().

    Search, $route.params.id load user.

    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(() => route.params.id, (id) => loadUser(id))

    Project example: watch query debounce 300ms search API. Nahi use to 'computed kaafi'.

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

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

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

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

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

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

    Example

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

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

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

  23. 23
    What problem are we avoiding by using caching?
    Times asked 1
    Official solution

    SimpleJo problem bachate hain: thundering reads + latency.

    Bina cache, har page refresh SELECT * FROM show. 1000 users = 1000 identical queries.

    Cache se pehli request mehnat karti hai, baaki copy. Nayi problem: stale — isliye timeout + delete on write.

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

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

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

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

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

    Project example: Home page venues. Pehle slow, cache ke baad Network tab 5ms.

  24. 24
    Where all have you implemented caching in your project?
    Times asked 1
    Official solution

    SimpleHaan Redis routes X demo hit miss. Nahi: kaise add karte — decorator + redis + invalidation.

    Don't lie. Examiner code dekhega.

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

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

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

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

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

    Project example: If yes open decorator. If no 4-step plan.

  25. 25
    Explain Role-Based Access Control (RBAC).
    Times asked 2
    Official solution

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

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

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

    Frontend hide UX. Backend 403 real security.

    Example

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

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

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

  26. 26
    How much AI (%) did you use in your project?
    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.

  27. 27
    Why does your code contain so many comments?
    Times asked 1
    Official solution

    SimpleComments viva help + business rules. Not hide AI. Har line comment mat justify.

    Why so many comments.

    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: Overbooking comment OK. Obvious for i in range not.

  1. 1
    Show ID card. Verify GitHub collaborator/checksum.
    Times asked 1
    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.

  2. 2
    Download the project from the Viva portal and run it.
    Times asked 1
    Official solution

    SimpleExaminer submitted ZIP chahta hai, local extra changes nahi.

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

  3. 3
    Demonstrate all mandatory functionalities: Register Company. Approve Company. Create Placement Drive. Approve Placement Drive. Register Student. Apply for a Drive. Blacklist Company and verify whether it can log in again.
    Times asked 1
    Official solution

    SimpleBlacklist flag user/company ko block karta hai — login ya features band.

    user.is_blacklisted = True; db.session.commit()
    Login: if user.is_blacklisted: flash('Blocked'); return
    Student dashboard: blacklisted company ke drives hide — query filter join Company.is_blacklisted==False.
    Demo: admin blacklist → us user se login fail.


    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 overall project/codebase.
    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.

  5. 5
    Explain your models.py.
    Times asked 2
    Official solution

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

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

    Example skeleton

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

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

  6. 6
    Explain a specific line/portion of code and its logic.
    Times asked 1
    Official solution

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

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

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

  7. 7
    Explain the significance of a particular line of code.
    Times asked 1
    Official solution

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

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

    Example

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

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

  8. 8
    Explain how data is sent from the backend to the frontend.
    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().

  9. 9
    Write a controller/route to fetch all companies and send them to an HTML template.
    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.


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

  10. 10
    Explain Blueprints and why they are used.
    Times asked 1
    Official solution

    SimpleBlueprint Flask app ko modules mein baant ta hai — auth, admin, user alag files.

    admin_bp = Blueprint('admin', __name__, url_prefix='/admin')
    @admin_bp.route('/dashboard')

    def dash(): ...
    app.register_blueprint(admin_bp)

    Bina blueprint: sab routes ek app.py — chhote MAD1 ke liye theek. Alternative: multiple modules import karke app pe route attach, ya create_app factory.
    Bada project: Blueprints = clean controllers.

  11. 11
    Explain Flask-WTF and why it is used.
    Times asked 1
    Official solution

    SimpleUserMixin Flask-Login ko batata hai user object kaise treat karna hai (is_authenticated, get_id).

    class User(db.Model, UserMixin):
        id = db.Column(db.Integer, primary_key=True)

    current_user proxy logged-in user. Initialize: login_user(user) / user_loader callback.
    Flask-WTF: Python classes se forms, CSRF, validators. RegisterForm forms.py mein.
    fs_uniquifier Flask-Security mein token/session identity — email change pe sessions invalidate.
    enctype='multipart/form-data' file upload pe zaroori. request.files.get('resume').

  12. 12
    What is Jinja2? Where have you used Jinja2 in your project?
    Times asked 1
    Official solution

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

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

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

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

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

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

  13. 13
    Why is Jinja2 needed? What would be harder without it?
    Times asked 1
    Official solution

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

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

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

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

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

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

  14. 14
    Write the Jinja loop to iterate through the fetched company records.
    Times asked 1
    Official solution

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

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

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

  15. 15
    Explain the MVC architecture and how it is applied in your project.
    Times asked 1
    Official solution

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

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

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

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

  16. 16
    Which ORM have you used?
    Times asked 3
    Official solution

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

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

    Example model

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

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

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

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

  17. 17
    Explain HTTP Methods. Difference between PUT and PATCH.
    Times asked 1
    Official solution

    SimplePUT poori resource replace karta hai, PATCH sirf kuch fields update karta hai.

    PUTfull update. Jo fields nahi bheji, woh empty/default ho sakti hain. Idempotent — same request 5 baar bhejo, result same.

    PATCHpartial update. Sirf name change karna hai to sirf name bhejo, baaki fields same rehti hain.

    ExampleUser {name: Ram, city: Delhi, age: 20}

    PUT /user/1 {name: Shyam} → city/age lose ho sakte hain agar poora object nahi bheja.
    PATCH /user/1 {name: Shyam} → sirf name Shyam, city Delhi, age 20 same.

    MAD1 Flask forms mein aksar POST se update karte hain kyunki HTML form PUT/PATCH native support nahi karta. Theory mein farq yeh hai.

  18. 18
    What is CORS?
    Times asked 8
    Official solution

    SimpleCORS browser rule hai ki kaunsa frontend kis API ko call kar sake. XSS attacker ka JS tumhare page pe chalaata hai.

    CORS: API header Access-Control-Allow-Origin. Vue (localhost:8080) Flask (5000) ko call kare to CORS chahiye. Same Flask+Jinja site pe usually issue nahi.
    XSS: <script> cookie chori. Fix: escape output (Jinja autoescape), user HTML mat render karo.
    CSRF alag: attacker user ke browser se hidden request. Fix: CSRF token (Flask-WTF).

  19. 19
    Did you build the project yourself or use AI? If AI was used, explain where and how you used it.
    Times asked 1
    Official solution

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

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

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