Viva prep · Real questions · Student experiences Enroll in Bootcamp

Search viva questions

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

Question sets

  1. 1
    Demonstrate the entire 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
    First tell me about the models.py in your app and how you have connected it.
    Times asked 1
    Official solution

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

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

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  3. 3
    Explain entire MVC control flow of the login system in your code.
    Times asked 1
    Official solution

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

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

  4. 4
    Explain the difference between authentication and authorization used in your project
    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)
  5. 5
    Explain how bootstrap is used in your project. I had mix of CSS, Bootstrap and inline stuffs.
    Times asked 1
    Official solution

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

  6. 6
    Explain the difference between render_template and redirect used in your app.
    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)
  7. 7
    Explain ORM and its benefit. Where it was used in your model.
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  8. 8
    In user signup page add an extra attribute "emergency_contact_name" to the entire frontend and backend system. (You have to add it in template, then model, then controller.. After completing this, open your db with db browser and show that the new column is populated with NULL for the old users and with the data received from the new user onwards.
    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)
  9. 9
    In user signup page there is a signup button. change the button color using bootstrap(if bootstrap is used)
    Times asked 1
    Official solution

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

  10. 10
    Difference between GET and POST.
    Times asked 7
    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
    Explain CSRF and real life examples.
    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.

  12. 12
    Explain how Jinja template tool works in your app. I explained how this pulls data and renders.
    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: Please learn how to add/delete columns in db safely. Also learn how to pull and display the modifcations to final html. It's not a GPT's work. You only know your app, so learn to plug codes wherever necessary. Be respectful.....
  1. 1
    - Show 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
    - Download the app from the Viva Portal and run it
    Times asked 1
    Official solution

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

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

  3. 3
    - Demonstrate the app (didn't interrupt in between)
    Times asked 1
    Official solution

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

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

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

  4. 4
    - Show ER diagram
    Times asked 1
    Official solution

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

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

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

  5. 5
    - Explain "models.py" and relationships
    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
    - What is Jinja template and where did I use it?
    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
    - Did I use Bootstrap? Where?
    Times asked 1
    Official solution

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

  8. 8
    - Primary key vs Foreign key
    Times asked 1
    Official solution

    SimplePrimary key row ka unique identity — usually id Integer autoincrement.

    Example

    id = db.Column(db.Integer, primary_key=True)
  9. 9
    - Add a phone number field to the trekker registration page
    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.

  10. 10
    - Change the background color of the trekker registration tab
    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: He was nice and patient. He didn't interrupt me during the demo or while answering questions. At the end, he said my viva was nice and wished me a nice day
  1. 1
    Procor L3_45
    Times asked 1
    Official solution

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

  2. 2
    But keep your theirory very strong
    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
    A lot were asked in between the demo remember only few
    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
    Checksum and stuff like id. Lasted 40ish mins
    Times asked 1
    Official solution

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

  5. 5
    - explain model. Py full
    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
    - make logout button
    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
    - change colors here and there
    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.

  8. 8
    - make stuff left go right kinda stuff
    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.

  9. 9
    - do u know APIs?
    Times asked 1
    Official solution

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

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

    Example

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

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

  10. 10
    - make something a radio button
    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.

  11. 11
    - code: treks with price>3000 highlight them (jinja template if else for )
    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 %}
  12. 12
    - what happens if I remove url for
    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.

  13. 13
    - why render template
    Times asked 1
    Official solution

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

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

    Example

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

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

  14. 14
    - why if else try except block?
    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
    - write a query to fetch logged in users all bookings
    Times asked 1
    Official solution

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

    Examiner project-specific names — same pattern.

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

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

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

    Project example: Drive.query.filter_by(approved=True)

  16. 16
    - latest booking of user write query
    Times asked 1
    Official solution

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

  17. 17
    - where jinja used show
    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 %}
  18. 18
    - what are command line arguments
    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.

  19. 19
    - how to change port
    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.

  20. 20
    - What is defualt port
    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.

  21. 21
    - session get user_id
    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().

  22. 22
    I messed up a bit in radio button, but she helped and with her help i was able to do.
    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.

  23. 23
    Tip: do the sheet + website very well.
    Times asked 1
    Official solution

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

Advice: Do sheet website very well. Even older semester questions. Theory repeat from there.
  1. 1
    TIP: Check that your screen share works properly. I had prepared well with everything else about the code and the checklist, but my screen share in GMeet was not showing anything, and I had to restart my laptop and open everything from the beginning, which wasted almost 15 minutes.
    Times asked 1
    Official solution

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

  2. 2
    Explain MVC and how I implemented that in my project (explain the file structure).
    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.

  3. 3
    Explain the models I wrote and explain each of the relationships and constraints used, including backref.
    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
    Write a Jinja code: if a company status is approved, show the company name.
    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
    Demonstrate the project (Mam helped with the flow).
    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.

  6. 6
    In between, Mam asked me to make a heading a clickable link with no redirection (while using an a tag, make sure you use # in href, i.e., href="#").
    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'))
  7. 7
    Session vs Cookie
    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().

  8. 8
    db.session.commit() vs db.session.flush()
    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
    Link vs Anchor tags
    Times asked 1
    Official solution

    SimpleHTML structure, CSS styling. Templates mein semantic tags + classes. Responsive ke liye viewport + flex/grid/bootstrap.

  1. 1
    mam was very calm and polite. 1)Id card 2)Explain the folder structure of your app and MVC of your app?
    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
    Explain the models.py and the relationship.
    Times asked 1
    Official solution

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

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  3. 3
    What is backref and back populates?
    Times asked 1
    Official solution

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

    Example

    # backref
    spots = db.relationship('Spot', backref='lot')
    # spot.lot available
    
    # back_populates
    spots = db.relationship('Spot', back_populates='lot')
    # Spot.lot = db.relationship('Lot', back_populates='spots')
  4. 4
    if the field unique=True and you keep inserting duplicate values then what will happen?
    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
    Explain the role based access in your controllers.py?
    Times asked 1
    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'))
  6. 6
    show and explain the blacklist Route?
    Times asked 1
    Official solution

    SimpleBlacklist/block: user.status='blocked' check login/booking pe. Temporary flag vs hard delete permanent.

  7. 7
    Explain create_drive route,edit drive route,update route? 9)How have you ensured that if a student has applied for the drive then he will not be able to apply for the same drive again? 10)how have you prevented duplicate applications?
    Times asked 1
    Official solution

    SimpleDuplicate booking/register rokne ke liye unique constraint + query check pehle.

    Example

    exists = Booking.query.filter_by(user_id=uid, slot_id=sid).first()
    if exists:
        flash('Already booked'); abort/redirect
  8. 8
    what is enctype multipart/form-data?
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  9. 9
    write a jinja if loop for the student if cgpa>7 then display the name of the student with green color?
    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 %}
  10. 10
    Write a route to update the cgpa of the student? 17)Write a drop down option in the register student.html that show gender of the person?
    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'
  11. 11
    In the navbar create a profile link?
    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.

  12. 12
    what is db.flush? I didnot know about it 20)center a div vertically and horizontally Viva lasted for 50 minutes..
    Times asked 1
    Official solution

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

Advice: Ma’am was the most humble and polite person I have ever come across. She corrected me while doing coding questions and also she was waiting patiently for me to complete the task. She advised me to know the tags with the name itself and also do a little improvement while writing the code in notepad (syntax and logic). Just know your code and be confident to explain everything you done in the project.
  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
    - 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
    Card, orm, authentication, authorisation
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  2. 2
    Adding a new field in backend and frontend code changes
    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: Doesn't help, but is cool will pass you
  1. 1
    Was there 15 min before the viva time, I joined 10 mins before and he just started the viva.
    Times asked 1
    Official solution

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

    Example

    db.session.query(Booking, User).join(User).filter(User.id == uid).all()
  2. 2
    Started with the demonstration of each and every page of the application.
    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
    Then asked to open models file and explain each and every line.
    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 "Have u used bootstrap, show where and how?"
    Times asked 1
    Official solution

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

  5. 5
    Then told to add a input box to take mobile no. in the student registration form and store it in the table.
    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
  6. 6
    Then told to change the button colour.
    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
    And ended the viva in 40 min and said that u presented really well.
    Times asked 1
    Official solution

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

Advice: He don't interrupt in between. Just be clean and clear with your statement.
  1. 1
    explain your code and some minor live code changes like change the 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.

  2. 2
    He asked me explain the project and code fully then asked some coding to add father_name in the student registration it should also reflect in the db then asked to change the color of dashboard then some theory questions like orm Authorization vs authentication
    Times asked 1
    Official solution

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

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
  3. 3
    He asked about get post method in code
    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')
  4. 4
    asked about csrf
    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.

Advice: just know about your project and be able to explain the code in your project
Created for educational purposes only. Questions are based on students' personal experiences and may not reflect actual exam content.