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
    Know your code fully. If any missing part, proctor points out readily.
    Times asked 1
    Official solution

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

  2. 2
    Explaining MVC architecture
    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

  3. 3
    What is the difference between Authentication and Authorization?
    Times asked 4
    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)
  4. 4
    GET vs. POST vs. PUT. Which did you use?
    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')
  5. 5
    Explain Lazy Loading and 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')
  6. 6
    What is cascade effect wrt models (database)
    Times asked 1
    Official solution

    SimpleCascade parent delete pe children pe kya ho: delete-orphan related rows hata deta hai.

    Example

    db.relationship('Spot', cascade='all, delete-orphan')

    Viva tipParking lot delete → uske spots/bookings policy clear bolo.

  7. 7
    Asked code clarifications for Add doctor, add patient, search doctor / patient. book appointments. Know the functionality and prepare fully.
    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()
  8. 8
    On Patient Module & Booking Logic proctor tool almost 15 minutes.
    Times asked 1
    Official solution

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

  9. 9
    What is ilike / or_ ? why they used.
    Times asked 1
    Official solution

    SimpleLIKE case-sensitive Postgres. ILIKE insensitive. SQLite LIKE often insensitive.

    Search use ilike.

    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: Venue.name.ilike(f'%{q}%').

    Project example: Venue.name.ilike(f'%{q}%').

  10. 10
    why used flush 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().

Advice: Be calm, very friendly person. if you panick; proctor waits to here from you.
  1. 1
    all questtions where asked from this sheet repeated questions
    Times asked 1
    Official solution

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

  2. 2
    code changes will be based on jinja for loop ,adding a route and som frontend changes
    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 %}
Advice: knowing your code thoroughly and strong in theory concepts will make your viva process smoother or else you might feel that the proctor is a strict one
  1. 1
    Started off by instructing me to setup my environment and installing requirements.
    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
    Identify MVC in my app - which moved on to explain it by doing some action, like registering or adding a dept. or doctor. So, i described the MVC framework in action, going back and forth to code and browser.
    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
    Code Change. Asked me to add an address field, in doctor's registration. So I had to add a new column in doctor's model for the database, a new form field, pass it on the route, and finally in the html. I had some jinja exceptions, which I quickly fixed but he never rushed me through.
    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
    Another Code Change had to do with changing minor text colors, what bootstrap class I'm using for that etc. __No more code changes__ For theory questions, I had to describe my database relationship in detail. I described I used "Usefield=False" for One-One relations, why i used "back_populate" instead of "back_ref"(He never asked me this, but I explained for clarity sakes and to dodge any further questions. Some explanation for keywords like, "redirect", "url_for", HTTP methods, "CSRF"(which I couldn't explain, I only knew this is used for security).
    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: The proctor is very calm and gives you enough time to explain your thought process, kind of trusts you to speak for yourself rather than rapid fire questions. Please practice minor code changes, and learn about keywords, terminologies associated with the whole Flask based system.
  1. 1
    She asks lot of questions once you answered. Please make sure, you practice the questions that is already present in this sheet. for all proctor. make sure you properly understand the questions and concept. if you impress her with your theorical questions, she is very chill. she asked me to open simple txt file and give three simple tasks, one related to jinja for loop, one is jinja if loop, one is give simple route for square of a number. then for code questions you need to make sure whatever it is there you understand clearly. More focus on your routes, models and all basic html, css things. she asked me to change the doctor name with doctor name - specilization. then simple simple filtering questions. if you tried hard, to do, and if she felt you are tring hard, she will also help you if you stuck inbetween. Overall, she is very good proctor, if you perform well, she will chill, otherwise she will roast you both sides. be careful. happy leaning!
    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 %}
Advice: She obessed with css z index idk why, then routes and models, jinja templates, simple simple code changes, very good proctor, very motivative, kind, strict all in one. lol
  1. 1
    Explain render template
    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
    Add disease column in patient table
    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
    Db.relationship def
    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
    Backref and backpopulate def
    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
    Usecase of secondary
    Times asked 1
    Official solution

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

  6. 6
    Go to controllers and explain route for patient
    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
    Diff bw get and 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')
  8. 8
    Can we send data through get
    Times asked 1
    Official solution

    SimpleGET data mangta hai (read), POST data bhejta hai (create/submit).

    GETURL mein dikhta hai, bookmark ho sakta hai, browser back/refresh safe hai, data URL query mein jaata hai. Search, page open, login form dikhana.

    POSTbody mein data jaata hai, URL mein password nahi dikhta, refresh pe dubara submit ho sakta hai. Login, register, form save.

    Example

    # page dikhana

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'GET':
            return render_template('login.html')
        # POST: form submit
        email = request.form.get('email')
        ...

    GET se theoretically data bhej sakte ho (?q=flask), lekin create/update ke liye nahi use karna — data log/history mein save ho jaata hai, length limit hoti hai.
    HTML form default GET hota hai; method='POST' likhna zaroori hai login/register pe.

  9. 9
    Request.form and request.args
    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
  10. 10
    Use of render template
    Times asked 1
    Official solution

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

  11. 11
    Diff bw get and filter by
    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.

  12. 12
    Use of fstring
    Times asked 1
    Official solution

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

  13. 13
    write a piece of codee in jinja2, where the code will display a dr name and the patients assigned ..
    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 %}
  14. 14
    Write a code in jinja2 , where it will look for appointments for a particular patient,, if there's no appointment, than show no appt available
    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 %}
  15. 15
    Structured and unstructured database
    Times asked 1
    Official solution

    Difference question hai — 3 cheezein bolo: meaning, kab use, 1 example.

    Pehle concept A ek line, phir B ek line, phir table-jaisa farq (input/output/side-effect).
    Example hamesha MAD1 se: GET search page, POST register, PUT/PATCH API update, session vs cookie login.

  16. 16
    Write a route for updating patient treatment form
    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'
  17. 17
    Patient name should be clickable in dr dash,and when dr clicks on this than it should redirect to treatment .
    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'))
  18. 18
    app 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.

  19. 19
    Z index in css
    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.

  20. 20
    SQLALCHEMY benchmark or something .
    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
    How do you return json in flask .
    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.

  22. 22
    How do you change host/host no.
    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.

  23. 23
    Default port no. Of flask
    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.

  24. 24
    How will you test the database without creating frontend.
    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.

  25. 25
    Version control meaning
    Times asked 1
    Official solution

    SimpleGit version control: commit history dikhao. VCS = Version Control System.

  26. 26
    Use of debug=true
    Times asked 1
    Official solution

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

Advice: She is helpful and friendly ,just have a deep understanding of theory concepts and few code changes ..😊
  1. 1
    Quick Go Through The Application. Ask you to disable your auto complete on VS 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.

  2. 2
    Explain hashing? if not implemented would ask to Hash your password?
    Times asked 1
    Official solution

    SimpleJo miss hai honestly bolo + why (time). Agar examiner maange to quick plan: kahan add karoge.

  3. 3
    Explain the Model.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
    Explain admin_dashboard Route.
    Times asked 1
    Official solution

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

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

  5. 5
    What is uselist (I have used it While defining a relationship in the model.py file, so he asked)
    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')
  6. 6
    What is the difference between redirect 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)
  7. 7
    What is templet inheritance?
    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
    He would ask you to write SQL query in Notepad : Write an SQL query to create a table name student and with two columns age and gender. write a basic SQL query to filter.all() from patients, doctor.
    Times asked 1
    Official solution

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

  9. 9
    He asked me to add another search functionality to filter the doctor by experience? (As I did add seperately for the Doctor Specialization)
    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()
  10. 10
    How does Jinja Access the Variable?
    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 %}
  11. 11
    How to write a for loop in jinja? Tip : Be prepared to make any changes in your code. Especially with the Admin, Doctor and Patient dashboard. Also, search functionality.
    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 %}
Advice: Tip : Try Booking a slot in the night for around 8-11PM, You get the proctor level details via email a day before the viva in the Night before 10PM. This way you get approx 12 hrs to prepare according to the proctor. Refer to the Viva question asked by this proctor previously and prepare accordingly. This way for sure you will be able to clear your Viva.
  1. 1
    Explain project 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.

  2. 2
    What is ORM
    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
    What is VCS
    Times asked 1
    Official solution

    SimpleGit version control: commit history dikhao. VCS = Version Control System.

  4. 4
    Stateless vs Stateful
    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
    Html semantic tags
    Times asked 1
    Official solution

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

  6. 6
    Some CSS questions (basic)
    Times asked 1
    Official solution

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

    Progressive frontend framework. Components, reactivity, directives.

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

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

    Example

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

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

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

  7. 7
    How would you load more data from another column in Jinja using a for loop
    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 %}
  8. 8
    Add a welcome message on dashboard
    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.

  9. 9
    Add a text to the navigation topbar and make it appear in the center
    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.

  10. 10
    Demonstrate any one template and routes used in it
    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.

  11. 11
    Explain flow of any one Flask route
    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'
  12. 12
    url_for() vs redirect() vs 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)
  13. 13
    request.args vs request.session vs request.json
    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().

  14. 14
    Flask handle files
    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.

  15. 15
    Debug mode
    Times asked 1
    Official solution

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

  16. 16
    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)
  17. 17
    What is secret key
    Times asked 1
    Official solution

    SimpleSECRET_KEY Flask ka secret jisse session cookies sign/encrypt hoti hain.

    app.config['SECRET_KEY'] = os.getenv('SECRET_KEY', 'dev-key')

    Iske bina session/flash unreliable ya insecure. Key leak = attacker session forge kar sakta hai.
    Hardcode mat karo production mein — .env / environment variable. Flash messages bhi session use karti hain, isliye SECRET_KEY se related hain.
    Hataane pe session kaam nahi / warning. Change karne pe purane sessions invalid.

  18. 18
    Where are the user credentials stored when they login
    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.

  19. 19
    Asked me something about the login page and route, checked if admin could create a doctor
    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.

  20. 20
    Explain database 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)
  21. 21
    Foreign key
    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)
  22. 22
    Relationships one to many and many to one
    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')
  23. 23
    How to achieve many to many 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')
  24. 24
    What is the secondary parameter in 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')
  25. 25
    rollback() in SQLAlchemy
    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()
  26. 26
    commit() vs flush() in SQLAlchemy
    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()
  27. 27
    get() vs filter_by() SQLAlchemy
    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()
  28. 28
    Write a SQLAlchemy query and Flask route for a new table called "Diseases" and update disease name for a patient
    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'
  29. 29
    Demonstrate creation of new doctor and patient, book an appointment and check conflict
    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.

  30. 30
    Explain how data was loaded on the dashboard
    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.

  31. 31
    Handling testing in a situation without front end just backend connection
    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.

  32. 32
    Change some 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.

Advice: She was strict but supportive, questions were rapid fire and had to be answered within one minute or else she would move on. Make sure to prepare all questions in this sheet.
  1. 1
    Viva 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
    models theory (ORM, backref, relationships bw tables)
    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
    flask routes (login management, 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)
  4. 4
    explain any one route in detail, how is it connected to front end
    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
    bootstrap css basic questions
    Times asked 1
    Official solution

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

  6. 6
    code changes- change color, add an extra field in patient regn (model, frontend and route) and show implementation live, jinja for loop
    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 %}
Advice: proctor is very nice and helpful and patient, just be confident and know your code.
  1. 1
    VIVA 2
    Times asked 1
    Official solution

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

  2. 2
    Write a query to search patients from admin dashboard
    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()
  3. 3
    Write a query to delete patient from the database
    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)

  4. 4
    Write a route to view patient from admin
    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'
  5. 5
    Explain double booking prevention from backend
    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.

  6. 6
    Lazy = true and lazy = dynamic what it does
    Times asked 1
    Official solution

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

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

    Example

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

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

  7. 7
    What is db.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)
  8. 8
    Explain where and where your folders and files located
    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.

  9. 9
    Authentication and authorisation difference
    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)
  10. 10
    Why is GitHub used?
    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.

  11. 11
    Did you use any virtual environment
    Times asked 1
    Official solution

    SimpleVirtualenv isolated Python env — project deps system Python ko nahi bigaadte.

    Example

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
  12. 12
    What is name in the form search query
    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()
  13. 13
    What is jinja
    Times asked 1
    Official solution

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

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
  14. 14
    Difference between URL and 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'))
  15. 15
    Make css changes like align boxes in left to the centre
    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
    Inline and block elements
    Times asked 1
    Official solution

    SimpleBlock poori line leta hai, Inline text ke saath baithta hai.

    Block (div, p, h1, section): width 100%, next element neeche aata hai. Height/width/margin set kar sakte ho.
    Inline (span, a, strong): sirf content jitni jagah. Width/height generally nahi chalti.
    Inline-block: inline ki tarah baithta hai, lekin width/height milti hai.

    Example

    <div>Hello</div><div>World</div> do lines. <span>Hello</span> <span>World</span> ek line.
Advice: Very strict proctor, for theory go through the responses in this form. For coding part learn by blocks of search , edit, appointment, etc.,
  1. 1
    LEVEL-2
    Times asked 1
    Official solution

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

  2. 2
    ---She asked 25+ questions which i forgot...writing only those which is remembered----
    Times asked 1
    Official solution

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

  3. 3
    1.Demonstrate your 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.

  4. 4
    2.What is MVC architecture?
    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

  5. 5
    3.Template inheritance
    Times asked 1
    Official solution

    SimpleBase template pe navbar/footer, child pages {% extends %} + {% block %} se content bharte hain. DRY.

    Example

    {# base.html #}
    {% block content %}{% endblock %}
    
    {# home.html #}
    {% extends 'base.html' %}
    {% block content %}
      <h1>Home</h1>
    {% endblock %}
  6. 6
    4.Https methods
    Times asked 1
    Official solution

    SimpleHTTP postcard (koi padh le). HTTPS envelope (TLS lock).

    Same headers, encrypted channel. MITM se password/token bachao. Local viva HTTP OK.

    HTTP/1.1 version keep-alive. TCP neeche, TLS security layer, SMTP mail alag.

    Browser + API ke beech extra darwaze: CORS origin allow, HTTPS encrypt transit, CSRF cookie-auto-send attack, XSS HTML inject, SQL injection raw query.

    MAD2 SPA: Vue :8080 Flask :5000 → Flask-CORS. JWT localStorage XSS se chori ho sakta — v-html user input pe avoid. Password Network tab localhost pe dikhega; prod HTTPS, response mein password echo nahi.

    401 unauthenticated, 403 unauthorized, 400 validation. Hash one-way — SHA decrypt nahi hota. Secret key .env, GitHub pe nahi.

    Project example: Dev localhost http. Production https:// + cert.

    Viva tipProtocols: HTTP/HTTPS app, TCP transport, TLS security, SMTP mail. HTTP/1.1 version — persistent connections.

  7. 7
    5.Post,put,delete,patch,update
    Times asked 1
    Official solution

    SimplePOST naya janam (har baar naya id). PUT poori photo replace. PATCH sticker chipkao.

    POST create, not idempotent. PUT full update, idempotent. PATCH partial.

    POST ki jagah PUT se REST semantics toot. GET typically no body.

    CRUD map: POST create, GET read, PUT/PATCH update, DELETE delete.

    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.

    Example

    POST /api/venues
    PUT  /api/venues/1   {all fields}
    PATCH /api/venues/1 {only name}

    Project example: POST /api/venues create. PUT /venues/1 saari fields. PATCH sirf name.

  8. 8
    6.Backref and backpopulates
    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')
  9. 9
    7.How database is creating and how do you check if your project is running or not,explain it.
    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.

  10. 10
    8.How tables are created?
    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.

  11. 11
    9.Explain relationships between tables?
    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')
  12. 12
    10.How to convert one-to-one relationship into one-to-many?
    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')
  13. 13
    11.What is Scalability and Concurrency?
    Times asked 1
    Official solution

    SimpleLoad badhe to handle: scale up/out, cache, async, DB tune.

    SQL scale: indexes, pool, replicas, partition, cache hot queries.

    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: If 10k: URI postgres, gunicorn, cache, celery concurrency.

  14. 14
    12.What is space padding?
    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.

  15. 15
    13.How does flask handles routing?
    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: She will ask you many questions but basics ,which you should know.She is quite strict but also supportive!...if you got this proctor then prepare your best!
Created for educational purposes only. Questions are based on students' personal experiences and may not reflect actual exam content.