Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level2 Viva Proctor 785

Share your experience Add your viva experience here
28 Questions
2 Sets
0 Topics
0 Reviews
Tips for this examiner: Chillest person ever met on viva✨ Went really good. He was very patient and helpful. Lasted for about 35 mins only since I was able to answer theory questions quickly. It was kind of rapid fire.🔥

Student reviews

No student reviews for this proctor yet.

Approved viva sets

  1. 1
    ⁠Download Code
    Times asked 1
    Official solution

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

  2. 2
    ⁠Run the app and show all of the features.
    Times asked 1
    Official solution

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

    Example

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    flask run
  3. 3
    ⁠Then in between I kept giving theory knowledge of whatever I knew.
    Times asked 1
    Official solution

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

  4. 4
    ⁠Made me open each of the files and asked to explain the folder structure
    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
    ⁠Then asked to explain models.py file, app.py, routes.py
    Times asked 1
    Official solution

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

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

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  6. 6
    ⁠He randomly picked any line of code and asked me to explain it. I was able to explain everything since I was thorough with my code. Will suggest you to be as well.
    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
    ⁠Code changes: Make a new button in the trekkers page that deletes the trek when clicked.
    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: Chillest person ever met on viva✨ Went really good. He was very patient and helpful. Lasted for about 35 mins only since I was able to answer theory questions quickly. It was kind of rapid fire.🔥
  1. 1
    Show ID card.
    Times asked 6
    Official solution

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

    Pehle se ID haath mein rakho. Glare mat aane do. Examiner screenshot/verify karta hai. Iske baad GitHub + project run.

  2. 2
    Download and run the project.
    Times asked 2
    Official solution

    SimpleExaminer submitted ZIP chahta hai, local extra changes nahi.

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

  3. 3
    Demonstrate all project features.
    Times asked 1
    Official solution

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

    Suggested flow

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

  4. 4
    Explain the project folder structure.
    Times asked 2
    Official solution

    SimpleRoutes/controllers URLs handle karte hain. app.py app banata hai, models.py data, templates/ views, static/ CSS-JS.

    Typical structure:
    app.py / __init__.py → Flask app, db.init, register blueprints
    models.py → tables
    routes.py / views → @app.route functions
    templates/ → Jinja HTML
    static/ → css, images
    instance/*.db → SQLite

    Ek route explain karne ka template:
    1) URL + methods 2) Auth/role check 3) Form/query se data 4) Business rule (duplicate, slots) 5) db.session 6) render ya redirect

    Example GET+POST same route: GET form, POST save.
    Data HTML se: form name= → request.form. Data HTML ko: render_template(..., items=query).
    Nayi .py file: import karke use karo, warna Flask ko pata nahi. Folder rename: imports/paths/templates check.

  5. 5
    Explain the purpose of app.py, models.py, and routes.py.
    Times asked 1
    Official solution

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

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

    Example skeleton

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

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

  6. 6
    Explain any randomly selected line of code from your project.
    Times asked 1
    Official solution

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

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

    Example

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

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

  7. 7
    What is ORM? What are its advantages and disadvantages?
    Times asked 1
    Official solution

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

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

    Example model

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

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

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

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

  8. 8
    Explain MVC architecture.
    Times asked 9
    Official solution

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

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

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

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

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

    Simpledono SQLAlchemy relationships ko do taraf se connect karte hain, farq sirf likhne ke style ka hai.

    backref: relationship ek side pe likhte ho, doosri side SQLAlchemy khud bana deta hai. Short hai, lekin dono models dekh ke relationship clearly nahi dikhti.

    back_populates: dono models pe relationship explicitly likhte ho. Code padhne wale ko turant samajh aa jaata hai ki User.posts aur Post.author linked hain.

    Example

    class User(db.Model):
        posts = db.relationship('Post', backref='author')

    Yahan Post.author automatically mil jaata hai.

    Explicit version:

    class User(db.Model):
        posts = db.relationship('Post', back_populates='author')
    class Post(db.Model):
        author = db.relationship('User', back_populates='posts')

    Viva tipexaminer ko bolo — MAD1 project mein back_populates zyada clear hai, isliye preferred.

  10. 10
    CSS priority (Inline, Internal, External).
    Times asked 1
    Official solution

    SimpleCSS 3 tarikon se lagti hai, priority Inline > Internal > External (same specificity pe).

    Inline: style='color:red' element pe. Highest priority, lekin reuse nahi. Debugging mushkil.
    Internal: <style> tag HTML head mein. Us page tak limited.
    External: style.css file. Large project ke liye best — ek jagah change, saari pages update.

    Example same button pe teeno:
    /* external */ .btn { color: blue; }
    /* internal */ .btn { color: green; }
    <!-- inline --> <button class='btn' style='color:red'> → red jeetega

    ID (#box) class (.btn) se strong, class element (button) se strong.
    !important sabko override karta hai — avoid karo.
    Large project: external CSS preferred.

  11. 11
    What are database constraints?
    Times asked 1
    Official solution

    SimpleConstraints rules hain jo galat data rok te hain. Referential integrity FK valid parent ko point kare.

    PK, FK, UNIQUE, NOT NULL, CHECK (age >= 18). ORM Column flags yahi map karte hain.
    SQL = language tables se baat. Database organized data store.
    SQL View: saved query, table jaisi dikhti hai, data copy nahi.
    Cluster: kai DB servers together (HA/scale) — MAD1 SQLite single file.
    Entity mapping: class User → table user, attributes → columns.

  12. 12
    Difference between structured and unstructured data.
    Times asked 1
    Official solution

    SimpleJSON = JavaScript Object Notation — data exchange ka text format.

    {"name": "Ram", "age": 20}
    APIs, localStorage, Chart.js data. Python dict ↔ JSON.
    Structured data: tables, fixed schema (SQL). Unstructured: images, logs, free text. JSON semi-structured.
    SQL structured relational. Mongo unstructured/document.

  13. 13
    Basic JavaScript concepts (even if not used in the project).
    Times asked 1
    Official solution

    SimpleJavaScript browser pe chalta hai — click, validation, Chart.js, Bootstrap modal.

    Frameworks: Vue, React, Angular. MAD1 mein vanilla JS / Bootstrap JS kaafi.
    Modal: popup overlay. Bootstrap: data-bs-toggle='modal' data-bs-target='#id'.
    Flash hide: setTimeout se alert remove. Form submit confirm: onsubmit='return confirm(...)'.
    Agar project mein JS kam hai to sach bolo, theory example do.

  14. 14
    Difference between horizontal and vertical scaling.
    Times asked 1
    Official solution

    SimpleVertical = same machine ko powerful banao. Horizontal = aur machines add karo.

    Vertical (scale up): RAM/CPU badhao. Simple, lekin ek limit hai, downtime ho sakta hai, single point of failure.
    Horizontal (scale out): 5 servers + load balancer. Sasta long-term, fault tolerant, lekin session/DB sharing sochna padta hai.

    Example10k users aaye to Flask app ke 4 copies chalao nginx peeche, DB alag machine pe.

    Thousands of requests on one machine: caching (Redis), DB indexes, gunicorn workers, phir horizontal.

  15. 15
    Difference between Primary Key and Foreign Key.
    Times asked 1
    Official solution

    SimplePrimary Key row ki unique ID hai, Foreign Key doosri table ki Primary Key ko point karti hai.

    Primary Key: unique + not null. Har table mein hota hai. Example: user.id = 5
    Foreign Key: relationship banati hai. post.user_id = 5 matlab yeh post user 5 ki hai.

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
    class Post(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        user_id = db.Column(db.Integer, db.ForeignKey('user.id'))

    FK Primary Key bhi ho sakti hai (1-to-1 profile table). FK unique ho to One-to-One, nahi to One-to-Many.

  16. 16
    What is lazy loading?
    Times asked 3
    Official solution

    Simplelazy loading related objects tab load karta hai jab attribute access karte ho, pehle nahi.

    user = User.query.get(1)  # posts query nahi

    user.posts # ab query

    lazy=True / 'select' default. lazy='joined' eager join. lazy='dynamic' query object.
    uselist=False One-to-One (single object, list nahi). Hataoge to list mil sakti hai.
    Frontend lazy loading images alag cheez hai (viewport mein aaye tab load).

  17. 17
    What are REST APIs?
    Times asked 1
    Official solution

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

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

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

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

  18. 18
    What are HTTP methods?
    Times asked 5
    Official solution

    SimpleHTTP methods batate hain request kya karna chahti hai. Common: GET POST PUT PATCH DELETE.

    GETread/fetch. Safe, URL se. Page kholna, search.

    POSTcreate/submit. Form, login.

    PUTpoora replace/update. Idempotent.

    PATCHpartial update.

    DELETEhataana.

    HEAD: sirf headers. OPTIONS: CORS preflight.

    Flask: @app.route('/x', methods=['GET','POST'])
    Agar methods na likho to default sirf GET.
    HTML form native sirf GET/POST. PUT/DELETE JS/fetch ya hidden _method se.
    GET se data fetch ho sakta hai, create nahi karna chahiye. POST se theoretically fetch ho sakta hai lekin cache/semantics galat.
    DELETE fetch ke liye nahi. GET POST ka kaam officially nahi karta — side effects GET pe mat rakho.

  19. 19
    What is SQL Injection? How can you prevent it?
    Times asked 1
    Official solution

    SimpleSQL Injection user input ko SQL bana ke DB hack. ORM/parameterized queries se bachao.

    Galat: f"SELECT * FROM user WHERE email='{email}'" # email = ' OR 1=1 --
    Sahi: User.query.filter_by(email=email) # bound parameters
    Raw: db.session.execute(text('SELECT * FROM user WHERE id=:id'), {'id': i})
    Extra: least privilege DB user, input validate, error messages generic.

  20. 20
    What is render_template()?
    Times asked 3
    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.

  21. 21
    Add a new Delete Trek button on the Trekkers page that deletes the selected trek when clicked.
    Times asked 1
    Official solution

    Yeh live UI/CSS change hai. Examiner jo element bole uski CSS turant badlo.

    Bootstrap class badlo (btn-primary → btn-success, bg-dark → bg-warning) ya inline style='color:red; background:#eee'.
    Center: d-flex justify-content-center text-center. Navbar neeche: navbar fixed-bottom.

    Example

    <button class='btn btn-success' style='background:#16a34a'>Book</button>

    Pehle browser inspect karke class dhundo, phir template mein change karke refresh.

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