Viva prep · Real questions · Student experiences Enroll in Bootcamp

Study workspace

Viva Prep

Prepare in structure for the Project Mentorship.

18687 Questions
265 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
    show id & no demo, mam directly told i think u already done this stuff in viva 1, so we will proceed with your pro struc & asked to explain fronted backend database stuff & what i used, while u explain she may ask ques related to that thing like relationships etc, i told purpose of relationship, about orm etc, once she get a hint u know about that topic she may move on to next que, her voice was breaking & got disconnected but dont be panicked.
    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')
  2. 2
    asked about http methods, use of name in form, what will happen if we try to submit method='GET'(ans - we get that value in url) & how will we retrieve it in backend(ans - request.args.get('name')), after i told its value will be in url then she asked me to write & show how the url will look like 💀.
    Times asked 1
    Official solution

    SimpleORM = Object Relational Mapping. Tables → Python classes. Raw SQL kam likhte ho.

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  3. 3
    Told to open app.py, then whats the use of secret_key, i imported migrate so asked about that module what it does, gave a situation suppose 2 users already exists & u used migrate & added 2 new columns using migrate then what will the prev 2 users value contain in new columns? (ans - NULL, ans are very simple so dont get panicked with length of que 😊), whats __name__='__main__', whats is session what is session.clear(), she asked to open route where student apply for apps, i opened apply route, she asked for creating apps u r using drive id & student id so i can see u r passing drive id so from where u r getting student id?(ans - from session), then after this she finally wrapped up.😊 Finally at end we had a small conversation about my career like what im interested in, r u doing this degree standalone, she also gave career advice coz i was nervous during viva, she was very friendly she may give hint if u r stuck somewhere & till now it was amazing experience during this viva. 😊
    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.

Advice: Just be calm & chill & give your best!! , Best Of Luck 😊👍
  1. 1
    Double Click to view Full!! (for Level 1)
    Times asked 1
    Official solution

    SimpleLevel = viva difficulty band. Level 1 usually demo + basics; higher pe live coding + deeper theory.

    Viva tipJo level assign hai uske hisaab se demo + theory ready rakho.

  2. 2
    Show ID Card & Git Repo Collaborator & I downloaded the Project (gave options).
    Times asked 1
    Official solution

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

    Example

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

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

  3. 3
    At very first after copying venv, i was setuping migration stuff during that time proctor asked me whats the use of that commands which u r writing like python -m flask db init, python -m flask db migrate -m "ini commit", python -m flask db upgrade.
    Times asked 1
    Official solution

    SimpleMigration = schema change history (Flask-Migrate/Alembic). Model badlo → migrate → upgrade.

    Example

    flask db migrate -m 'add spot status'
    flask db upgrade
  4. 4
    Demo & told to show all functionalities during that time he asked me the steps & i did exactly how sir told like create this do that do this (basically he wanted to see whether all core stuff works or not & also the edge points), asked about search func but i forgot to add that 🥲so i told sir but i know the logic how it works, asked to explain the drive model & relationships im using(i used back_populates but may ask for backref also & types of relationships), during explaining i volunteerily explained about ORM(sqlalchemy & how it works & benefits, say everything what u know related to particular topic unless he interrupts to consume bit time but be genuine), whats http stateless(ans - each request is independent), whats MVC. (coding part)
    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')
  5. 5
    He remembered when i told i may know the logic of search func as i havent implemented, finally he asked me to open notepad & told to write frontend part(using form) & also told to write backend(the route part) 💀 but somehow managed!!, asked if used get method then how will retrieve that in backend (request.args.get('name')), i was writing but in between he asked alright say me the logic coz i think he already knew i know the logic, so i told like i'll filter out by role & ilike & told exact code orally so he was satisfied, asked if form action url & route url mismatch then what will be result, asked template renders serverside or client side (i think it should be server side coz jinja is dynamic & html part will render on client side). finally sir told i will wrap it up here, viva went moderate 🥲
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: Proctor was calm & patient but seeing him seems sir was tired (may be) but overall went gd havent much interrupt during explaining 😊, So be calm n' chill, say as much u know related to topic they ask, along with viva 1 prep for viva 2 as well coz many prac concepts overlap so it will help, BEST OF LUCK 😊👍
  1. 1
    Demonstration (gave a flow to follow )
    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
    Asked to add a field in the models.py and display it accordingly
    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
    asked Abt backend logic of the search functionality without seeing the code
    Times asked 1
    Official solution

    SimpleSearch: form/query param → ilike filter → results template.

    Example

    q = request.args.get('q', '').strip()
    lots = Lot.query.filter(Lot.name.ilike(f'%{q}%')).all()
  4. 4
    Asked to explain the structure of the project, Asked some questions about the models
    Times asked 1
    Official solution

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

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

    Example

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

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

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

    Example

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

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

  6. 6
    One or two more but all were from the sheet
    Times asked 1
    Official solution

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

Advice: Very nice and calm proctor, would guide u if u get stuck somewhere.Be confident and answer with conviction ,and greet him.
  1. 1
    Asked me 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
    Asked me to explain the entire project and give a demo (I explained the controllers, models and views first, explained my whole code, and showed demo of all functionalities). This itself took 20 minutes.
    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
    Asked me code-based questions: add mobile number as another column to student table, and include it in registration (basically reflect that addition of column everywhere)
    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
    Asked me to change colour of a heading (I already chose a colour so I just changed that). That's it for code based questions.
    Times asked 1
    Official solution

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

    Example

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

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

Advice: Just elaborate/ present your project really well, he listens patiently, be confident about your communication skills, he doesn't ask deep theory questions, he just wants to know your project, he is very kind and sweet
  1. 1
    (Level 2)
    Times asked 1
    Official solution

    SimpleLevel = viva difficulty band. Level 1 usually demo + basics; higher pe live coding + deeper theory.

    Viva tipJo level assign hai uske hisaab se demo + theory ready rakho.

  2. 2
    Thousands of questions....and the level are so tough...just expect the unexpected
    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 anybody got level1_150, best of luck....thousands of questions and if you able to answer it, the questions Will be tougher untill u can't answer anymore. And be ready to postmortem your project and get thousands of issues he will mentioned that, the core requirements are fine but why u didn’t implement this and that....if you got pass, you are pro in mad 1 😭🙏
  1. 1
    Quickly noticed a flaw in my logout system
    Times asked 1
    Official solution

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

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

    Example

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

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

  2. 2
    Explain MVC and demonstrate its implementation in your code
    Times asked 1
    Official solution

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

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

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

  3. 3
    Routing Questions (explain entire routes)
    Times asked 1
    Official solution

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

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

  4. 4
    How do you know 1-1 and 1-Many. Explain the basic relationships.
    Times asked 1
    Official solution

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

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  5. 5
    Do you know Cascading? (No)
    Times asked 1
    Official solution

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

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

    Example

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

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

  6. 6
    In the student dashboard, instead of heading being "Student Dashboard", make it "{{Name}}'s Dashboard"
    Times asked 1
    Official solution

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

    Example

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

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

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

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

Advice: Very sharp, yet chill. He has his cam on, and does small talks to calm the situation. Very responsive. Refer to sheet PYQs, he repeats most of the questions. Know jinja template and the the variables used to save values in the db (you'll get stuck if you dk)
  1. 1
    - First asked me to download from Portal so that I don't need to perform Checksum
    Times asked 1
    Official solution

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

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

  2. 2
    - Asked me demonstrate the working of the app and its core functionalities
    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
    - Asked about the schema/model what relationships are there how I have defined each column and 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')
  4. 4
    - Asked redirect vs render template
    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'))
  5. 5
    - Asked about GET vs POST in login form and explain each from MVC point of view
    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')
  6. 6
    - Asked about login, authentication vs authorization
    Times asked 1
    Official solution

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

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
  7. 7
    - Asked what is CSRF is and if I have implemented prevention, how I have used it.
    Times asked 1
    Official solution

    SimpleCSRF: attacker tumhari logged-in browser se unwanted POST. CSRF token form mein proof hai request genuine hai.

    Viva tipFlask-WTF CSRF protect karta hai. Token bina POST reject.

  8. 8
    - Asked me if I have used Bootstrap, where have I used it in my code.
    Times asked 1
    Official solution

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

  9. 9
    - Asked about MVC architecture how it is used in flask.
    Times asked 1
    Official solution

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

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

  10. 10
    - Asked to add a new field in student registration , 'Father's name' and add validation
    Times asked 1
    Official solution

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

    Example

    if not email or '@' not in email:
        flash('Invalid email')
        return redirect(request.url)
    if User.query.filter_by(email=email).first():
        flash('Email taken')
  11. 11
    - Asked me to change color of login button to a color of my choice.
    Times asked 1
    Official solution

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

    Example

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

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

Advice: Good proctor, he is very calm and doesn't interrupt you when you are answering or presenting. Just be confident and explain your code well, he will get the impression that you know. My viva lasted only about 25 minutes lol. Patiently think and answer, know your code well, you'll ace it.
  1. 1
    Asked to write the controller for showing the drives that have been not approved by the admin and the job title is data scientist
    Times asked 1
    Official solution

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

  2. 2
    Jinja syntax for printing the description and eligibility for the drives
    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 %}
  3. 3
    What is MVC
    Times asked 3
    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 the datatype of d in the line {% for d in drives %} (jinja) Ans: object
    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 %}
  5. 5
    What is the datatype of drive in the line return render_template("file.html", drive = drives) Ans: List of objects
    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)
Advice: The proctor was very helpful and helped me with the syntax.
Created for educational purposes only. Questions are based on students' personal experiences and may not reflect actual exam content.