Viva prep · Real questions · Student experiences Enroll in Bootcamp

Study workspace

Viva Prep

Prepare in structure for the Project Mentorship.

5926 Questions
161 Proctors

Lazy IITians

Who are we?

A student-built prep community for IITM BS — real viva questions, shared experiences, and structured practice so you walk into mentorship confident.

Fill the form and join us

Enroll in Bootcamp

Find questions

Search by question text across the whole library, then narrow with subject, level, and proctor.

Share your experience Add your viva experience here

Question sets

  1. 1
    Just do the sheet for theory coding - 1. Make a header to center
    Times asked 1
    Official solution

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

  2. 2
    query a trek staff whose experience is greater than 5
    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.

Advice: She is very polite and good proctor..gives you time to think and also help you if you messed up
  1. 1
    Check id card first
    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
    Coding Part:-
    Times asked 1
    Official solution

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

  3. 3
    1.there is a list with ['a','b','c'] want same list with 'd' appended to list
    Times asked 1
    Official solution

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

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

    Example

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

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

  4. 4
    2.Staff query with more than 5 yrs of experience
    Times asked 1
    Official solution

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

  5. 5
    3.Jinja loop for easy difficulty treks print
    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
    2.Explain One to many ,many to one One to one etc using 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)
  7. 7
    6.get 404(i didn't know anything about this)
    Times asked 1
    Official solution

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

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

    Example

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

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

  8. 8
    8.what is blueprints
    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.

  9. 9
    11.Backpopulates
    Times asked 1
    Official solution

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

  10. 10
    13.Get Post
    Times asked 1
    Official solution

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

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  11. 11
    14.Commit Flush
    Times asked 1
    Official solution

    Simplecommit changes save. rollback fail pe undo. Transaction consistency ke liye.

    Example

    try:
        db.session.add(obj)
        db.session.commit()
    except Exception:
        db.session.rollback()
        raise
  12. 12
    16.Return vs Redirect
    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'))
  13. 13
    Live Demonstration
    Times asked 1
    Official solution

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

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

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

  14. 14
    1.Trek Creation 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.

  15. 15
    2.Make border round
    Times asked 1
    Official solution

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

    Example

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

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

  16. 16
    3.Another one was bring a heading in center
    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: Total 40 mins viva . Calm and interactive just be chill and sheet would be enough to answer just be confident.. she indirectly pointed me out at last that I was lacking confidence. Even said viva was good.
  1. 1
    Query parameters in URL
    Times asked 1
    Official solution

    SimpleQuery params URL ? ke baad: /search?q=mall. Flask: request.args.get('q').

    Example

    @app.route('/search')
    def search():
        q = request.args.get('q', '')
        return ...
  2. 2
    Whats <select>
    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
    SQL Query to extract maximum and minimum price.
    Times asked 1
    Official solution

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

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

    Example

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

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

  4. 4
    Difference between return and render_template
    Times asked 1
    Official solution

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

    Example

    return render_template('dashboard.html', user=user, lots=lots)
  5. 5
    What happend if we keep debug = True
    Times asked 1
    Official solution

    SimpleDebug: terminal traceback padho, print/logging, Flask debug, browser Network/Console, reproduce minimum steps.

  6. 6
    Create a Forgot Password link in the register form
    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
  7. 7
    Add a description box in the edit trek
    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.

  8. 8
    Jinja code for showing odd numbers
    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 %}
  9. 9
    app.route defination
    Times asked 1
    Official solution

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

  10. 10
    Flask code to return eligible if a trekker ismore than 18 years of age.
    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.

Advice: Ma'am is very supportive.She will provide suggestions if you get stuck. Be confident about your work and you will excel.
  1. 1
    why backref and what's uselist = false
    Times asked 1
    Official solution

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

    Example

    # backref
    spots = db.relationship('Spot', backref='lot')
    # spot.lot available
    
    # back_populates
    spots = db.relationship('Spot', back_populates='lot')
    # Spot.lot = db.relationship('Lot', back_populates='spots')
  2. 2
    write sqalchamy query for getting the loggin user , write jinja loop for trek count and write a route that takes argument from the URL and displays welcom user_name
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  3. 3
    change the book button so when you hover it changes color
    Times asked 1
    Official solution

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

    Example

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

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

  4. 4
    what's semantic tag
    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
    create a new trek , checked if starting date is not after end date
    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.

  6. 6
    how do you prevent redundancy in table like user can't have duplicate mail
    Times asked 1
    Official solution

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

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

  7. 7
    what's overflow hidden and display none
    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: She's very humble , polite and sweet and gives to time to speak and process and helps you too if you get stuck
  1. 1
    It was over in around 15 to 20 mins.... asked for id github, checeksum or portal download (i chose portal download)
    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
    Asked to give demo, started with home then admin, staff then when I was showing update profile option then he asked me to show the template for this section then askjed to show the route and how it works... while i was explaining asked to explain get & post (this he had asked in other vivas as well)....
    Times asked 1
    Official solution

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

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  3. 3
    After taht he asked me to write code for returning first 3 values, i might messed here out of nervousness then said leave this and write jinja template for returning any 3 values (i wrote for trek details)
    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 %}
  4. 4
    Then he said okay its done we can wrap up the viva here..... i asked if i made any mistake bit till rhen he ended the meeting....
    Times asked 1
    Official solution

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

Advice: He's calm & patient but deep dive to the code and ask conceptual questions rather than general theory. Focus on HTTPS method, routes & jinja template writing in notepad, he may ask some random codes for basic understanding.
  1. 1
    Prepare all the questions from the sheet Apart from them, I got asked these questions:
    Times asked 1
    Official solution

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

  2. 2
    What if 2 functions have the same URL
    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: If you are struck in some questions, she is skipping it herself. But I would recommend this: If you don't know answers for her questions, admit that you don't have a clear idea on that and just tell your thought process and try to give answers. Do not just blindly say "I don't know" for her to skip it.
  1. 1
    Wat is anchor used for
    Times asked 1
    Official solution

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

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

    Example

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

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

  2. 2
    Explain MVC and your models.py
    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
    Wat is the route ?
    Times asked 1
    Official solution

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

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

    Example

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

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

  4. 4
    Difference between first() and one()
    Times asked 1
    Official solution

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

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

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

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

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

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

  5. 5
    Wat happens if u remove return
    Times asked 1
    Official solution

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

    Example

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

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

  6. 6
    Define relationship in the table
    Times asked 1
    Official solution

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

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  7. 7
    Wat is the use of secret key
    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
    Difference between cookies and session
    Times asked 1
    Official solution

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

    Example

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

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

  9. 9
    Get and post method
    Times asked 1
    Official solution

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

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  10. 10
    Explain this Sqlalchemy query she pointed out a query and asked me to explain
    Times asked 1
    Official solution

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

    Example

    user = User(email='a@b.com')
    db.session.add(user)
    db.session.commit()
    users = User.query.filter_by(role='admin').all()
  11. 11
    How session works
    Times asked 1
    Official solution

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

    Example

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

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

  12. 12
    CRUD operations explain it with respect to your code
    Times asked 1
    Official solution

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

  13. 13
    Wat does debug=True mean
    Times asked 1
    Official solution

    SimpleDebug: terminal traceback padho, print/logging, Flask debug, browser Network/Console, reproduce minimum steps.

  14. 14
    Wat is python comprehension
    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.

  15. 15
    Open 1 html and explain the jinja code in that
    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 %}
  16. 16
    Wat is the use of existing booking why are we checking it while booking a trek
    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.

  17. 17
    Do u know how to make the button round ? Demonstration
    Times asked 1
    Official solution

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

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

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

  18. 18
    Login as admin create a trek
    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.

  19. 19
    Register as a user and book the trek you have created now Notepad coding
    Times asked 1
    Official solution

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

  20. 20
    SQLALCHEMY query staff sorted by experience
    Times asked 1
    Official solution

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

    Example

    user = User(email='a@b.com')
    db.session.add(user)
    db.session.commit()
    users = User.query.filter_by(role='admin').all()
  21. 21
    Jinja names of the trek whose difficulty level is easy Live coding
    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 %}
  22. 22
    Add a validation to the description that the description has to mini 20 characters
    Times asked 1
    Official solution

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

    Example

    if not email or '@' not in email:
        flash('Invalid email')
        return redirect(request.url)
    if User.query.filter_by(email=email).first():
        flash('Email taken')
  23. 23
    Change the button to a clickable link and that link shd redirect to the respective page
    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'))
Advice: She’s very kind, listens patiently to your explanations, and asks follow-up questions. She focuses a lot on theory, so prepare that well. Most of the questions were repeated from this sheet.
  1. 1
    Very humble, patient, and friendly. He gives enough time to explain your answers and doesn't rush.
    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
    First asked me to run my entire website and explain all the features from the User, Staff, and Admin panels.
    Times asked 1
    Official solution

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

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

  3. 3
    Asked me to explain my models.py file.
    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
    Asked me to explain the Admin routes and other routes used in the project.
    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
    Most practical questions were directly from my own code.
    Times asked 1
    Official solution

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

  6. 6
    Asked about:
    Times asked 1
    Official solution

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

  7. 7
    CRUD operations
    Times asked 1
    Official solution

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

  8. 8
    Primary and Foreign Keys
    Times asked 1
    Official solution

    SimpleForeign key dusri table ke PK ko point karti hai — relationship banati hai.

    Example

    lot_id = db.Column(db.Integer, db.ForeignKey('lot.id'), nullable=False)
  9. 9
    backref
    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')
  10. 10
    Why the User model is used
    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)
  11. 11
    render_template
    Times asked 1
    Official solution

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

    Example

    return render_template('dashboard.html', user=user, lots=lots)
  12. 12
    Purpose of __init__.py
    Times asked 1
    Official solution

    Simplerender_template HTML file ko Jinja se process karke browser ko bhejta hai. Backend data ko frontend se jodta hai.

    return render_template('dashboard.html', user=user, treks=treks)

    File templates/dashboard.html honi chahiye.
    Keyword arguments template mein variables ban jaate hain: {{ user.name }}.
    Route kuch return na kare to Flask error. Boolean return typical HTML view ke liye nahi — string/Response chahiye.

  13. 13
    Asked me to make a small change in the dashboard using a query.
    Times asked 1
    Official solution

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

    Example

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

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

  14. 14
    Theory questions included:
    Times asked 1
    Official solution

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

  15. 15
    HTTP methods (GET, POST, etc.) and their use cases
    Times asked 1
    Official solution

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

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  16. 16
    Request-Response model
    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)
  17. 17
    JSON
    Times asked 1
    Official solution

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

  18. 18
    DOM
    Times asked 1
    Official solution

    SimpleDOM HTML tree. JS nodes change. Vue Virtual DOM ke through, direct kam.

    Manipulation innerHTML vs Vue data. Remove CSS class = rules gone layout may collapse.

    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: Inspect Elements. Vue devtools.

  19. 19
    AJAX
    Times asked 1
    Official solution

    SimpleAJAX = page reload ke bina server se baat. Technique ka naam, library nahi.

    Purana XMLHttpRequest. Aaj fetch() / Axios. Vue SPA poori AJAX pe chalti hai — JSON aata, v-for render.

    AJAX ≠ jQuery. Fetch native API. Axios library interceptors ke saath.

    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

    const res = await fetch('/api/venues')
    const data = await res.json()

    Project example: mounted() mein fetch('/api/venues') — yeh AJAX hai.

    Viva tipAJAX technique hai, Fetch modern API hai. Axios library hai uske upar.

  20. 20
    ORM
    Times asked 3
    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
  21. 21
    Partial and full refresh
    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.

  22. 22
    Overall, he mainly checks whether you understand your own project and the concepts behind it. If you know your code well and are clear with Flask, SQLAlchemy, database relationships, and basic web development concepts, you should be fine.
    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')
Advice: He doesn't have a list of questions, he just goes asking. Try to explain everything as far as you know correctly it will be fine. Work on Understanding your work and being able to explain anything confidently
Created for educational purposes only. Questions are based on students' personal experiences and may not reflect actual exam content.