Viva prep Β· Real questions Β· Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level2_100

Share your experience Add your viva experience here
114 Questions
2 Sets
0 Topics
2 Reviews
Tips for this examiner: do all the questions in the sheet for th same proctor and have thorough knowledge of your code.

Student reviews

Tushar Bharti MAD1

Shared viva questions from response sheet: Basis overview is like he will ask questions related to vue and backend , though questions are same as he asked above but still I am writing.; What is Props , Slot, How to pass data from child to parent; What is Vue Cli and vue cdn and what you have used.

Questions remembered
  1. Basis overview is like he will ask questions related to vue and backend , though questions are same as he asked above but still I am writing.
  2. What is Props , Slot, How to pass data from child to parent
  3. What is Vue Cli and vue cdn and what you have used.
  4. What is Webhooks??
  5. What is Sqlalchemy??
  6. What is Difference between v-model and v-bind?
  7. What is V-if and V-show?
  8. What is lifecycle in vue js and explain them??
  9. What have you used for security purpose?? Flask Security or JWT??
  10. He will ask for showing celery work.
  11. He will ask a change in code type of questions and that he will ask randomly so you can't predict that (I was not able to do so I told sorry sir , I am not able to figure it out), So you can do the same if needed πŸ˜€. Basically prepare all the questions from his side in this sheet you are good to go as he focuses majorly on vue js and backend. Overall Chill Proctor πŸ˜„πŸ˜ƒ I will update my grade after I will get the results as how he penalize me for not solving code change question
Bharat MAD1

Shared viva questions from response sheet: What is Vue?; Are you using CLI or CDN?; What are webhooks?

Questions remembered
  1. What is Vue?
  2. Are you using CLI or CDN?
  3. What are webhooks?
  4. What is ORM and are you using it?
  5. What is ORM's advantage?
  6. What are Vue lifecycle hooks?
  7. What is difference between v-if and v-show?
  8. Changed the code - Add table to one page instead of Card view. Debugged the model.

Approved viva sets

  1. 1
    Introduce yourself.
    Times asked 7
    Official solution

    Simple30s: naam, city, degree, project, stack Vue Flask Redis Celery.

    1 unique feature. No rattu script. Currently doing short then project.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Example

    Main Priya, IITM BS. MAD2 SPA β€” Vue, Flask REST, JWT, Redis cache, Celery reports.

    Project example: Parking/ticket/job-portal one-liner.

    Viva tipScript ratt ke mat bolo. Project ka 1 unique feature highlight karo.

  2. 2
    What are you doing apart from this degree? Why are you pursuing this degree?
    Times asked 1
    Official solution

    SimpleShort honest job/family/other. Why degree 20s then project wapas.

    Don't ramble.

    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: Bridge to MAD2 skills.

    Project example: Bridge to MAD2 skills.

  3. 3
    Demonstrate your complete project.
    Times asked 2
    Official solution

    SimpleDemo 5–7 min ki kahani: saari roles, koi milestone skip nahi, bolte-bolte dikhao.

    Examiner list tick karta hai. Crash ho to panic nahi β€” terminal error padho.

    Code tab kholna jab poochhein. Extra uncommitted features mat dikhana agar portal ZIP mein nahi.

    Suggested flow1) Register/login user
    2) Admin login β€” CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search + charts
    6) CSV export / email job
    7) Logout

    Project example: Jo statement/parking/jobs/tickets hai uske user+admin journeys.

    Viva tipBol: 'Yahan overbooking rokta hoon'. Mandatory features pehle, polish baad.

  4. 4
    Explain the search implementation in your project.
    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
    What frameworks and technologies have you used?
    Times asked 1
    Official solution

    SimpleHar lib ek line why β€” list 40 mat.

    Flask, SQLAlchemy, JWT/Security, CORS, Caching+Redis, Celery, Vue+Router, Vuex/Pinia, Axios/fetch, Chart.js, Bootstrap.

    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: requirements.txt + package.json top 6 open karke bolo.

    Viva tipHar lib ek line why: CORS alag origin, Redis tez, Celery async, Chart.js dashboard.

  6. 6
    What's the backbone/architecture of your application?
    Times asked 1
    Official solution

    SimpleClient-server SPA + background workers. Boxes: Vue | HTTP JSON | Flask | SQLite | Redis | Celery.

    Not microservices. Layered REST. Cache aur queue extra.

    Scale story alag: gunicorn, Postgres, more workers.

    MAD2 architecture: Vue SPA (client) β†’ HTTP JSON β†’ Flask API (server) β†’ SQLAlchemy DB. Side path: Flask β†’ Redis broker β†’ Celery worker β†’ MailHog/CSV.

    Client-server alag ports. State: Vue memory + LS token. Persistent: SQLite. Cache: Redis. MVC-ish: models.py, API views, Vue templates.

    Scale: more workers, Postgres, cache, not 'bigger SQLite file'.

    Suggested flowBrowser Vue β†’ HTTP JSON β†’ Flask β†’ SQLAlchemy β†’ DB
    Extra: Redis cache; Celery via Redis

    Project example: Draw 6 boxes viva mein. Point to folders.

  7. 7
    Show your data models.
    Times asked 1
    Official solution

    Simplemodels.py tour + draw. Design decisions unique/cascade.

    SQL models = same.

    ORM objects ko tables se map karta hai β€” raw SQL kam. SQLAlchemy MAD2 default.

    class User(db.Model) + Column + relationship. query.filter_by / db.session.get. Fayda: portable SQLite→Postgres, injection se safer. Nuksaan: N+1, complex SQL.

    SQLite file, zero server β€” course friendly. Postgres scale. Relationships: FK, backref, lazy/joinedload, cascade on delete. Constraints unique/not null integrity.

    Bookings source of truth DB, Redis cache copy.

    Project example: 3 relationships explain.

  8. 8
    Show your Celery jobs and reports.
    Times asked 1
    Official solution

    SimpleTask function, beat dict, delay() call, worker+beat terminals, MailHog/CSV.

    App context DB. Args serializable. How many jobs: reminder, monthly, export β€” gino honestly.

    Celery Python ka distributed task queue β€” HTTP request ko 10s email/CSV ke liye mat rokna.

    Flow: Flask .delay() β†’ Redis broker β†’ Worker execute. Beat alag process hai (clock): crontab padhke due time pe queue mein daalta hai. Beat khud mail nahi bhejta; Worker haath hai.

    MAD2 typical: daily reminder (Beat), monthly report (Beat), user Export CSV (button, Beat nahi). JS async/await browser event loop hai, Celery server-side process β€” mix mat karo.

    Demo: tin terminals β€” redis-server, celery worker, celery beat β€” plus Flask. MailHog :8025 inbox. Result backend se task SUCCESS poll optional.

    Project example: tasks.py + config schedule + POST export.

  9. 9
    Show how emails are being sent from your application.
    Times asked 1
    Official solution

    SimpleMAIL config Message MailHog. Show how emails sent SMTP. Show Celery-generated emails. Where email sending logic.

    tasks.py + MailHog.

    Flask-Mail / SMTP se mail. Local MailHog fake server: SMTP 1025, UI 8025 β€” internet nahi, viva safe.

    Asli send Celery task mein, request thread mein nahi. Beat 6pm reminder, export ke baad CSV attach optional.

    MAIL_SERVER localhost demo. Gmail SMTP student account pe block common. Body mein user name personalization examiner dekhta hai.

    Project example: screenshot 8025.

  10. 10
    What styling approach have you used on the frontend?
    Times asked 1
    Official solution

    SimpleBootstrap utilities and/or custom.css. Grid responsive. Colors variables.

    d-flex container btn navbar. Custom for brand. Chart.js alag.

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

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

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

    Project example: Inspect a button class. bootstrap CDN or npm.

  11. 11
    What is Flask?
    Times asked 6
    Official solution

    SimpleFlask halka Python web framework. MAD2 REST API. Open source BSD.

    Large apps possible blueprints+gunicorn. Flask(__name__) paths. Dev server not prod.

    create_app factory tests/celery.

    Flask Python micro web framework. Route decorator URL β†’ function. MAD2 mein JSON API: request.get_json(), jsonify, JWT.

    WSGI: server (Werkzeug) app ko call. if __name__ == '__main__' sirf direct run. Factory create_app() test/celery ke liye.

    Blueprint/resources folders. @app.route vs MethodView. Debug=True viva local, prod nahi. CORS alag port Vue ke liye.

    Example

    app = Flask(__name__)
    @app.route('/api/hello')
    def hello():
        return jsonify(message='Hello World')

    Project example: create_app register db cache cors jwt celery.

    Viva tipOpen source haan. Flask(__name__) root path/templates locate karta hai β€” hataoge to config confuse.

  12. 12
    What is an API?
    Times asked 8
    Official solution

    SimpleInterface programs use. REST JSON over HTTP MAD2.

    What is an API.

    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: GET /api/hello.

    Project example: GET /api/hello.

  13. 13
    Explain HTTP verbs (GET, POST, PUT, PATCH, DELETE).
    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.

  14. 14
    What is jsonify()?
    Times asked 1
    Official solution

    Simplejsonify Flask ka JSON response + sahi Content-Type. dumps sirf string.

    marshal schema. serialize models. pickle APIs pe nahi.

    Flask Python micro web framework. Route decorator URL β†’ function. MAD2 mein JSON API: request.get_json(), jsonify, JWT.

    WSGI: server (Werkzeug) app ko call. if __name__ == '__main__' sirf direct run. Factory create_app() test/celery ke liye.

    Blueprint/resources folders. @app.route vs MethodView. Debug=True viva local, prod nahi. CORS alag port Vue ke liye.

    Example

    return jsonify(users=[{'id': u.id, 'email': u.email} for u in User.query.all()])

    Project example: return jsonify(users=[u.serialize() for u in users])

  15. 15
    What security mechanism have you implemented?
    Times asked 1
    Official solution

    SimplePassword hash, JWT, RBAC, CORS whitelist, HTTPS prod, no secrets Vue.

    Least privilege. Don't CORS *.

    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: List 4 you actually coded.

    Project example: List 4 you actually coded.

  16. 16
    What other authentication mechanisms are available in Flask besides JWT?
    Times asked 1
    Official solution

    SimpleFlask-Login sessions, HTTP Basic, OAuth. We used JWT. Available besides JWT.

    What other authentication Flask.

    Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"

    Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
    Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).

    MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX β€” asli deny backend pe.

    Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.

    Project example: Not implemented OAuth.

  17. 17
    How is JWT built?
    Times asked 1
    Official solution

    Simpleheader+payload base64 HMAC secret β†’ signature three segments. How JWT built.

    HS256.

    Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"

    Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
    Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).

    MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX β€” asli deny backend pe.

    Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.

    Project example: jwt.io.

  18. 18
    How is JWT validated?
    Times asked 1
    Official solution

    SimpleSplit decode hmac compare exp < now user exists. Invalid 401. How JWT validated.

    Library does it @jwt_required.

    Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"

    Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
    Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).

    MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX β€” asli deny backend pe.

    Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.

    Project example: Wrong token Postman 401.

  19. 19
    JWT vs Session-based authentication.
    Times asked 1
    Official solution

    SimpleSession school id card office mein rakha. Token photocopy jo tum har baar dikhate ho.

    Session: Set-Cookie, server store, MAD1 Flask-Login. CSRF risk cookies auto-send.

    Token/JWT: SPA + alag port Vue/Flask, scale easy, mobile. XSS if localStorage.

    MAD2 typically JWT/Flask-Security token. httpOnly cookie safer lekin CORS+CSRF extra.

    Example

    # session
    login_user(user)  # Set-Cookie
    # token
    return jsonify(token=create_access_token(identity=user.id))

    Project example: login jsonify token. Vue LS. MAD1 session cookie nahi dikhana unless used.

    Viva tipToken localStorage XSS risk; httpOnly cookie safer. Session CSRF risk. MAD2 APIs ke liye JWT/Flask-Security token common.

  20. 20
    What is RBAC (Role-Based Access Control)?
    Times asked 3
    Official solution

    SimpleRBAC = role ka badge. Admin badge se delete, user badge se sirf book.

    Role-Based Access Control. Har user pe alag permission list nahi β€” roles.

    Models: User M-M Role association. Decorators @roles_required. Vue v-if + router meta.

    Frontend hide UX. Backend 403 real security.

    Example

    if current_user.roles[0].name != 'admin':
        return jsonify(msg='Forbidden'), 403

    Project example: roles_users table. admin stats API roles_required. User booking POST user role.

    Viva tipCode mein roles_required, Vue meta.role, models User↔Role many-to-many (roles_users table).

  21. 21
    What is SQLAlchemy?
    Times asked 8
    Official solution

    SimpleSQLAlchemy toolkit + ORM. Flask-SQLAlchemy wrapper db.

    URI sqlite:///app.db. Postgres postgresql://. Dialects MySQL MSSQL.

    Session add/commit/rollback. IntegrityError catch.

    ORM objects ko tables se map karta hai β€” raw SQL kam. SQLAlchemy MAD2 default.

    class User(db.Model) + Column + relationship. query.filter_by / db.session.get. Fayda: portable SQLite→Postgres, injection se safer. Nuksaan: N+1, complex SQL.

    SQLite file, zero server β€” course friendly. Postgres scale. Relationships: FK, backref, lazy/joinedload, cascade on delete. Constraints unique/not null integrity.

    Bookings source of truth DB, Redis cache copy.

    Example

    app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///app.db'
    # migrate: URI postgres://user:pass@host/db  + psycopg2

    Project example: config SQLALCHEMY_DATABASE_URI. db.create_all() ya migrate.

  22. 22
    Why do we use SQLAlchemy instead of directly using SQLite?
    Times asked 1
    Official solution

    SimpleModels safety portability. Raw OK reports. text()+format still inject.

    SQLAlchemy injection possible if you raw concat.

    ORM objects ko tables se map karta hai β€” raw SQL kam. SQLAlchemy MAD2 default.

    class User(db.Model) + Column + relationship. query.filter_by / db.session.get. Fayda: portable SQLite→Postgres, injection se safer. Nuksaan: N+1, complex SQL.

    SQLite file, zero server β€” course friendly. Postgres scale. Relationships: FK, backref, lazy/joinedload, cascade on delete. Constraints unique/not null integrity.

    Bookings source of truth DB, Redis cache copy.

    Project example: No f"SELECT ... {name}".

  23. 23
    Which databases are supported by SQLAlchemy?
    Times asked 1
    Official solution

    SimpleSQLite MySQL Postgres MSSQL Oracle via dialects + drivers.

    Which DBs supported by SQLAlchemy. Can MSSQL? Yes pyodbc.

    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: We used sqlite. Could switch URI.

  24. 24
    What is ORM? What are its advantages?
    Times asked 1
    Official solution

    SimpleORM = translator. Python object bolo, woh SQL mein baat kare.

    Object Relational Mapper. Class User ↔ table user. Raw SQL kam.

    SQLAlchemy MAD1/MAD2. Fayde: portable SQLite→Postgres, relationships, parameterized queries (injection kam).
    Nuksaan: N+1, hidden SQL, complex reports pe raw better.

    Direct sqlite3 se SQLAlchemy isliye: models, switch DB, safer queries.

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(128), unique=True)
    User.query.filter_by(email='a@b.com').first()

    Project example: models.py db.Model. resources User.query.filter_by. Koi f-string SQL nahi.

    Viva tipFayde: safe-ish, portable (SQLite→Postgres). Nuksaan: complex queries, N+1, leaky abstractions. Direct SQLite se SQLAlchemy isliye: models + injection protection + switch DB.

  25. 25
    Explain your database models.
    Times asked 8
    Official solution

    SimpleTables + lines (FK) + 1-M / M-M. Draw mentally, phir models.py.

    Har class: PK, important columns, relationships. Why normalized (no duplicate venue name in every show as only string without FK).

    Indexes search columns. Unique email. Cascade policy bookings pe.

    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: User-Role M-M. User-Booking 1-M. Venue-Show 1-M. Show-Booking 1-M.

  26. 26
    What SQL constraints are available?
    Times asked 1
    Official solution

    SimpleNOT NULL UNIQUE PK FK CHECK. Integrity even if API bug. Two writers safer.

    Why required. SQL constraints available.

    ORM objects ko tables se map karta hai β€” raw SQL kam. SQLAlchemy MAD2 default.

    class User(db.Model) + Column + relationship. query.filter_by / db.session.get. Fayda: portable SQLite→Postgres, injection se safer. Nuksaan: N+1, complex SQL.

    SQLite file, zero server β€” course friendly. Postgres scale. Relationships: FK, backref, lazy/joinedload, cascade on delete. Constraints unique/not null integrity.

    Bookings source of truth DB, Redis cache copy.

    Project example: email unique. user_id FK.

  27. 27
    Is there any one-to-one relationship in your models?
    Times asked 1
    Official solution

    SimpleHaan Profile / nahi only 1-M. Don't invent.

    Is there one-to-one.

    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: Open models.

    Project example: Open models.

  28. 28
    Explain relationships between your tables.
    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.

  29. 29
    What are SQL aggregate functions?
    Times asked 1
    Official solution

    SimpleCOUNT SUM AVG MIN MAX. Dashboard stats.

    SQL aggregate functions.

    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

    db.session.query(func.count(Booking.id)).scalar()

    Project example: func.count(Booking.id).

  30. 30
    Explain GROUP BY.
    Times asked 1
    Official solution

    SimpleGROUP BY collapse + aggregates per group. Dashboard count per venue.

    Explain GROUP BY.

    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: stats API func.count group venue_id.

    Project example: stats API func.count group venue_id.

  31. 31
    Explain HAVING.
    Times asked 1
    Official solution

    SimpleHAVING after group. WHERE before. users with >5 bookings HAVING COUNT>5.

    Explain HAVING. WHERE cannot use COUNT same way.

    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: Venues having count>10.

  32. 32
    Explain SQL joins.
    Times asked 1
    Official solution

    SimpleJOIN ON fk=pk. inner match dono. left left saari. SQLAlchemy .join(User.roles).

    What are joins. Explain SQL joins.

    ORM objects ko tables se map karta hai β€” raw SQL kam. SQLAlchemy MAD2 default.

    class User(db.Model) + Column + relationship. query.filter_by / db.session.get. Fayda: portable SQLite→Postgres, injection se safer. Nuksaan: N+1, complex SQL.

    SQLite file, zero server β€” course friendly. Postgres scale. Relationships: FK, backref, lazy/joinedload, cascade on delete. Constraints unique/not null integrity.

    Bookings source of truth DB, Redis cache copy.

    Project example: bookings join user email list.

  33. 33
    Explain subqueries.
    Times asked 1
    Official solution

    SimpleQuery inside query. Exists / in_. Users bookings>3.

    Explain subqueries.

    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: Maybe not used β€” theory + how would.

    Project example: Maybe not used β€” theory + how would.

  34. 34
    What happens to AUTO_INCREMENT values after deleting a record?
    Times asked 1
    Official solution

    SimpleDelete ke baad AUTOINCREMENT wapas nahi. Sequence aage. Gaps normal.

    Last auto-increment sqlite_sequence. Not needed usually.

    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: Don't rely on ids 1,2,3 after deletes.

  35. 35
    What is the last auto-increment value?
    Times asked 1
    Official solution

    Simplesqlite_sequence / information_schema. Last auto-increment value. Not needed usually.

    SELECT seq FROM sqlite_sequence.

    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: Don't rely.

    Project example: Don't rely.

  36. 36
    How can you migrate data from one database to another?
    Times asked 1
    Official solution

    SimpleDump SQL/CSV new URI alembic import. sqlite3 .dump | psql careful types.

    How migrate data one DB to another.

    ORM objects ko tables se map karta hai β€” raw SQL kam. SQLAlchemy MAD2 default.

    class User(db.Model) + Column + relationship. query.filter_by / db.session.get. Fayda: portable SQLite→Postgres, injection se safer. Nuksaan: N+1, complex SQL.

    SQLite file, zero server β€” course friendly. Postgres scale. Relationships: FK, backref, lazy/joinedload, cascade on delete. Constraints unique/not null integrity.

    Bookings source of truth DB, Redis cache copy.

    Project example: Not done, steps known.

  37. 37
    What is Vue.js?
    Times asked 5
    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.

  38. 38
    What is the difference between Vue CDN and Vue CLI?
    Times asked 1
    Official solution

    SimpleCDN = Vue script tag se, jaise pen drive. CLI/Vite = poori factory (SFC, npm, bundle).

    CDN: no build, chhote apps, exam PC pe Node nahi to bhi chal. Weak: no .vue compile, 3rd-party cache, scale/team.

    CLI/Vite: Single File Components, env, code-split, production dist/. Scalable.

    Examiner 'which + why' β€” jo use kiya wahi justify, doosra naam rato mat.

    Example

    <!-- CDN -->
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    
    # Vite
    npm run dev
    npm run build

    Project example: CDN: index.html unpkg vue. CLI: package.json, npm run serve / vite.

    Viva tipCDN scalable large teams ke liye weak (no SFC compile, caching 3rd party). Examiner 'which + why' poochta hai β€” jo use kiya wahi justify karo.

  39. 39
    Which one did you use and why?
    Times asked 2
    Official solution

    SimpleJo actually use kiya: CDN vs CLI / Vuex vs Pinia / fetch vs Axios β€” 1 reason + tradeoff.

    Examiner vague 'which one' previous question se jodo. Package.json dikhao.

    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: Don't invent unused library.

  40. 40
    What is Vuex?
    Times asked 3
    Official solution

    SimpleVuex/Pinia ghar ka notice board. Har room (component) same user/token dekhe.

    State data, mutations sync change, actions async API phir commit.

    Local data() sirf us component. Token/user global.

    Pinia Vue 3 official, kam boilerplate. Vuex older MAD2 still common.

    Example

    state: { user: null }
    mutations: { setUser(s, u) { s.user = u } }
    actions: { async login({ commit }, form) {
      const u = await api.login(form); commit('setUser', u)
    }}

    Project example: store user + token login action. Navbar getters isAdmin. Logout clear LS+state.

    Viva tipLocal/Session storage persist ke liye, reactive share ke liye store. Pinia Vue 3 official, Vuex older.

  41. 41
    What is Pinia?
    Times asked 2
    Official solution

    SimplePinia naya store: mutations nahi, seedha state. Vue 3 recommended.

    defineStore. Vuex vs Pinia: naya project Pinia. Purana Vuex valid.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Project example: stores/user.js. Agar Vuex hai to Pinia ka naam mat lo unless used.

  42. 42
    Vuex vs Pinia.
    Times asked 1
    Official solution

    SimplePinia naya store: mutations nahi, seedha state. Vue 3 recommended.

    defineStore. Vuex vs Pinia: naya project Pinia. Purana Vuex valid.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Project example: stores/user.js. Agar Vuex hai to Pinia ka naam mat lo unless used.

  43. 43
    What are Vue lifecycle hooks?
    Times asked 11
    Official solution

    SimpleLifecycle = component ki zindagi ke stages. API call tab jab DOM ready ho β€” mounted.

    created: instance bani, this data, DOM nahi. mounted/onMounted: page pe aa gaya β€” fetch, Chart.js, setInterval.
    updated: data change ke baad. unmounted: cleanup (clearInterval) warna memory leak.

    Dashboards onMounted isliye: canvas/API tab valid. created mein $el nahi.

    Composition: onMounted(() => {}) setup ke andar.

    Example

    export default {
      async mounted() {
        const r = await fetch('/api/venues')
        this.venues = await r.json()
      }
    }

    Project example: Venues.vue mounted fetch list. Clock component unmounted pe interval clear.

    Viva tipcreated: data setup, DOM nahi. mounted/onMounted: $el mil gaya β€” fetch yahi. Dashboards isliye onMounted use karti hain.

  44. 44
    Why are lifecycle hooks useful?
    Times asked 1
    Official solution

    SimpleRight time side effects fetch timers. Cleanup unmount leak. Fetch after DOM.

    Why lifecycle hooks useful.

    Lifecycle = component ki zindagi: created (instance, DOM nahi) β†’ mounted/onMounted (DOM ready β€” fetch, Chart.js yahi) β†’ updated β†’ unmounted (clearInterval).

    Dashboard API created mein isliye nahi ki $el/canvas missing ho sakta. Composition API: onMounted(() => {}) setup ke andar. Options: mounted() method. Mix mat.

    Examiner 'konsa hook use kiya' β€” related .vue kholo, line padh ke bolo.

    Project example: mounted fetch, beforeUnmount clearInterval.

  45. 45
    What is data binding in Vue?
    Times asked 1
    Official solution

    SimpleMustache {{ }}, v-bind attrs, v-model forms, v-html careful.

    Data binding in Vue.

    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: Form + text + image.

    Project example: Form + text + image.

  46. 46
    What is v-model?
    Times asked 4
    Official solution

    Simplev-model do tarfa glue: input likho to data, data badlo to input.

    Shorthand :value + @input. Forms ke liye. Display ke liye {{ }} / v-bind kaafi.

    v-model.number number input. checkbox boolean. select string.

    Directives Vue ke special attributes hain β€” HTML ko superpower: v-if/v-show, v-for, v-bind (:), v-on (@), v-model.

    v-if DOM se hataata/jodta. v-show sirf CSS display. Rare/permission: v-if. Bar-bar toggle: v-show. v-model two-way form. v-bind one-way JS→attribute.

    :key v-for pe zaroori warna Vue galat reuse. v-html XSS. Secret UI ke liye sirf v-if kaafi nahi β€” API 403 bhi.

    MAD1 Jinja server HTML. MAD2 yeh directives browser mein reactive.

    Example

    <input v-model="email">
    <!-- same as -->
    <input :value="email" @input="email = $event.target.value">

    Project example: Login email/password v-model, submit pe JSON POST.

  47. 47
    What is v-bind?
    Times asked 1
    Official solution

    Simplev-bind one-way: JS β†’ HTML attribute. UI se data automatic nahi aata.

    Images src, disabled, class object, href. Colon shorthand.

    Dynamic class :class="{ active: isOn }".

    Directives Vue ke special attributes hain β€” HTML ko superpower: v-if/v-show, v-for, v-bind (:), v-on (@), v-model.

    v-if DOM se hataata/jodta. v-show sirf CSS display. Rare/permission: v-if. Bar-bar toggle: v-show. v-model two-way form. v-bind one-way JS→attribute.

    :key v-for pe zaroori warna Vue galat reuse. v-html XSS. Secret UI ke liye sirf v-if kaafi nahi β€” API 403 bhi.

    MAD1 Jinja server HTML. MAD2 yeh directives browser mein reactive.

    Example

    <img :src="posterUrl" :alt="title">
    <button :disabled="loading">Save</button>
    <div :class="{ active: isOn }">

    Project example: Poster :src="show.poster". Submit :disabled="loading".

  48. 48
    Difference between v-model and v-bind.
    Times asked 4
    Official solution

    SimpleBind = ek tarfa poster lagana. Model = form jo typed text wapas data mein likhe.

    Display/image/disabled β†’ v-bind. Input/textarea/select β†’ v-model.
    Dono mix: <input v-bind:placeholder="hint" v-model="q">.

    Directives Vue ke special attributes hain β€” HTML ko superpower: v-if/v-show, v-for, v-bind (:), v-on (@), v-model.

    v-if DOM se hataata/jodta. v-show sirf CSS display. Rare/permission: v-if. Bar-bar toggle: v-show. v-model two-way form. v-bind one-way JS→attribute.

    :key v-for pe zaroori warna Vue galat reuse. v-html XSS. Secret UI ke liye sirf v-if kaafi nahi β€” API 403 bhi.

    MAD1 Jinja server HTML. MAD2 yeh directives browser mein reactive.

    Example

    <p>{{ price }}</p>
    <img :src="url">
    <input v-model="price">

    Project example: Search box v-model q. Result images :src.

  49. 49
    Difference between v-if and v-show.
    Times asked 10
    Official solution

    Simplev-if ghar se nikaal deta hai (DOM se). v-show sirf light band karta hai (display:none).

    v-if false β†’ element exist hi nahi β€” costly create/destroy, lekin secret HTML DOM mein nahi.
    v-show β†’ hamesha DOM, CSS hide, toggle tez.

    Rare / permission UI: v-if (admin panel). Dropdown bar-bar: v-show.

    : shorthand v-bind ka, v-if ka nahi.

    Example

    <div v-if="isAdmin">Admin panel</div>
    <div v-show="open">Dropdown</div>

    Project example: Admin links v-if="role==='admin'". FAQ accordion v-show="open".

    Viva tipSecurity ke liye sirf v-if kaafi nahi β€” API 403 bhi chahiye.

  50. 50
    What are Vue directives?
    Times asked 6
    Official solution

    SimpleDirectives Vue ke special attributes β€” HTML ko superpower.

    v-if/else/show, v-for, v-bind (:), v-on (@), v-model, v-html (XSS), v-cloak, v-slot.

    :src = v-bind:src. @click = v-on:click.

    Custom directives bhi (v-focus) β€” course basics kaafi.

    Example

    <p v-if="ok">Yes</p>
    <li v-for="u in users" :key="u.id">{{ u.name }}</li>
    <input v-model="email">
    <img :src="url">

    Project example: List v-for :key. Form v-model. Admin v-if. Image :src.

    Viva tip: src ke liye v-bind:src ka shorthand. @click = v-on:click.

  51. 51
    How do components communicate in Vue?
    Times asked 2
    Official solution

    SimpleBaat: props se neeche, emit se upar. Door ke rishte: store ya provide/inject.

    Grandparent→grandchild props drilling ugly. Vuex/Pinia ya provide('user').

    Did you use? List+card files naam lo.

    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

    provide('user', user)
    const user = inject('user')

    Project example: Dashboard v-for BookingCard. Card emit 'cancel'.

    Viva tip3+ level props drilling se better store. Navbar user info store se lo.

  52. 52
    Explain Props.
    Times asked 1
    Official solution

    SimpleProps parent ki thali child ko dena. Child thali tod ke parent ki thali na badle β€” emit bolo.

    Declare props, parent :venue="v". One-way. Mutate mat. Types/required Vue 3.

    List parent, card child β€” classic viva.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Example

    <VenueCard :venue="v" @select="onSelect" />
    props: ['venue']
    this.$emit('select', this.venue.id)

    Project example: VenueCard :venue. Child $emit('select', id).

  53. 53
    Explain Emits.
    Times asked 1
    Official solution

    Simpleemit = child parent ko chillata hai: 'delete 5'. Props down, events up.

    this.$emit('delete', id). Parent @delete="removeRow".

    Grandchild: chain emit ya Vuex/provide.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Example

    this.$emit('delete', id)
    // parent: <Child @delete="removeRow" />

    Project example: BookingRow emit cancel β†’ parent list se hata + API DELETE.

  54. 54
    Explain Slots.
    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.

  55. 55
    How do you pass data from parent to child and child to parent?
    Times asked 1
    Official solution

    SimpleProps down emit up. Store distant. provide inject. Grandparent chain or store.

    Parent to child and back. Grandparent grandchild.

    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: 3+ levels store better.

  56. 56
    What is the Composition API?
    Times asked 1
    Official solution

    SimpleOptions: data methods computed alag. Composition: setup() logic group, reuse.

    Vue 3 both. Course either. Don't claim unused API.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Project example: script setup vs export default options β€” open file.

  57. 57
    Composition API vs Options API.
    Times asked 1
    Official solution

    SimpleOptions: data methods computed alag. Composition: setup() logic group, reuse.

    Vue 3 both. Course either. Don't claim unused API.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Project example: script setup vs export default options β€” open file.

  58. 58
    What changed from Vue 2 to Vue 3?
    Times asked 1
    Official solution

    SimpleVue 3 naya engine: Composition API, fragments, better TS, tree-shaking. Vue 2 Options + filters.

    mounted vs onMounted. Filters Vue 3 mein hata β€” computed/methods.

    Version package.json / Vue.version se dikhao. Jo use kiya uske hooks bolo.

    SPA = ek HTML, Vue Router se views, full reload nahi. MPA = MAD1 Jinja har URL naya HTML.

    Vue Router: routes array, router-view, router-link, meta.auth + beforeEach guard. Dynamic /venues/:id β†’ $route.params.id.

    Vite/CLI SFC + npm build dist/. CDN script tag, no SFC. Jo tumne use kiya wahi justify. Flask send_from_directory('dist') production pattern.

    Project example: package.json vue ^3.x. setup() + onMounted fetch.

    Viva tipVersion package.json / Vue.version se dikhao. MAD2 dono allowed usually β€” jo use kiya uske hooks bolo (mounted vs onMounted).

  59. 59
    What is v-memo?
    Times asked 1
    Official solution

    Simplev-memo Vue3 skip re-render if deps same. Big lists.

    Optimization. Tree shaking Vue3 modular.

    Redis in-memory key-value store hai β€” fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.

    MAD2 mein Redis do kaam: (1) cache β€” same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker β€” Flask task queue mein daalta hai, worker uthata hai.

    Flow: cache.get(key) β†’ hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.

    Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.

    Alag: Redis β‰  Memcached (Celery broker nahi). Redis β‰  localStorage (woh browser). redis-cli ping β†’ PONG viva proof.

    Project example: If unused, theory. v-for :key more important.

  60. 60
    What Vue 3 optimizations (e.g., Tree Shaking) are available?
    Times asked 1
    Official solution

    SimpleOptions: data methods computed watch props components mounted. Tree shaking fragments proxy v-once v-memo Vue3.

    Which you used name. New Vue3 features list honestly used.

    SPA = ek HTML, Vue Router se views, full reload nahi. MPA = MAD1 Jinja har URL naya HTML.

    Vue Router: routes array, router-view, router-link, meta.auth + beforeEach guard. Dynamic /venues/:id β†’ $route.params.id.

    Vite/CLI SFC + npm build dist/. CDN script tag, no SFC. Jo tumne use kiya wahi justify. Flask send_from_directory('dist') production pattern.

    Project example: Open SFC options vs setup.

  61. 61
    What is Celery?
    Times asked 17
    Official solution

    SimpleCelery = background naukri. HTTP request ko 10 second email bhejne ke liye mat rokna.

    Distributed task queue: aap function ko abhi nahi, worker process mein later/retry/schedule pe chalaate ho.

    MAD2 typical jobs: daily reminder mail, monthly HTML report, user-triggered CSV export.

    Web request 200ms hona chahiye. 10,000 emails request thread mein = timeout. Worker alag CPU pe kaam kare.

    Redis broker chahiye. Beat alag process schedule ke liye.

    Example

    @celery.task
    def daily_reminder():
        for u in User.query.filter_by(active=True):
            send_mail(u.email, 'Book something today!')

    Project example: User Export click β†’ 202 Accepted. Worker CSV + email. Daily 6pm Beat reminder.

    Viva tipWorker + Redis bina Beat ke user-triggered chalega. Scheduled jobs ke liye Beat bhi chahiye.

  62. 62
    How does Celery work?
    Times asked 1
    Official solution

    SimpleCelery = background naukri. HTTP request ko 10 second email bhejne ke liye mat rokna.

    Distributed task queue: aap function ko abhi nahi, worker process mein later/retry/schedule pe chalaate ho.

    MAD2 typical jobs: daily reminder mail, monthly HTML report, user-triggered CSV export.

    Web request 200ms hona chahiye. 10,000 emails request thread mein = timeout. Worker alag CPU pe kaam kare.

    Redis broker chahiye. Beat alag process schedule ke liye.

    Example

    @celery.task
    def daily_reminder():
        for u in User.query.filter_by(active=True):
            send_mail(u.email, 'Book something today!')

    Project example: User Export click β†’ 202 Accepted. Worker CSV + email. Daily 6pm Beat reminder.

    Viva tipWorker + Redis bina Beat ke user-triggered chalega. Scheduled jobs ke liye Beat bhi chahiye.

  63. 63
    How many Celery jobs/tasks have you implemented?
    Times asked 1
    Official solution

    SimpleGino jo implement: generally reminder, monthly, export. Beat schedule dikhao.

    Don't claim 5 if 2.

    Celery Python ka distributed task queue β€” HTTP request ko 10s email/CSV ke liye mat rokna.

    Flow: Flask .delay() β†’ Redis broker β†’ Worker execute. Beat alag process hai (clock): crontab padhke due time pe queue mein daalta hai. Beat khud mail nahi bhejta; Worker haath hai.

    MAD2 typical: daily reminder (Beat), monthly report (Beat), user Export CSV (button, Beat nahi). JS async/await browser event loop hai, Celery server-side process β€” mix mat karo.

    Demo: tin terminals β€” redis-server, celery worker, celery beat β€” plus Flask. MailHog :8025 inbox. Result backend se task SUCCESS poll optional.

    Project example: Open beat dict count keys + extra delay() tasks.

  64. 64
    What is Redis?
    Times asked 21
    Official solution

    SimpleRedis fridge pe sticky note hai β€” poori kitchen (database) kholne ki zarurat nahi.

    Redis in-memory key-value store hai. Data RAM mein rehta hai, isliye disk wale SQLite/Postgres se kai guna tez.

    MAD2 mein Redis do kaam karta hai:
    1) Cache β€” same venue/show/dashboard JSON baar-baar DB se mat nikaalo.
    2) Celery message broker β€” Flask task queue mein daalta hai, worker uthata hai.

    Source of truth database hi hai. Redis band ho to cache miss ho jaata hai aur Celery queue ruk sakti hai. Crash pe cache gayab ho sakta hai β€” isliye important data sirf Redis mein mat rakho.

    Example

    import redis
    r = redis.Redis(host='localhost', port=6379, db=0)
    r.set('venues', json.dumps(data), ex=30)
    print(r.get('venues'))

    Project example: GET /api/venues pehle Redis dekho. Miss pe SQLAlchemy query, phir SET with timeout. Celery worker Redis list se daily reminder uthata hai.

    Viva tipCache ke liye db=1, broker ke liye db=0 rakhna smart hai taaki keys mix na hon. Viva mein redis-cli ping β†’ PONG dikhana strong hai.

  65. 65
    What is caching?
    Times asked 17
    Official solution

    SimpleCache = pehli baar hisaab karke copy rakh lo, doosri baar copy dikha do.

    Baar-baar same expensive kaam (DB query, counting bookings) mat karo. Result Redis jaise store mein timeout ke saath rakh do.

    Cache hit: key mil gayi, DB skip. Cache miss: DB se lao, SET karo, return karo.

    Tradeoff: speed vs stale data. Admin naya venue add kare aur cache 50s ka ho to user purani list dekh sakta hai β€” isliye write pe invalidation zaroori hai.

    Browser cache, Flask-Caching, Redis alag layers hain. MAD2 examiner Redis + @cache.cached code dekhta hai.

    Example

    @cache.cached(timeout=50, query_string=True)
    @app.route('/api/shows')
    def shows():
        return jsonify([s.serialize() for s in Show.query.all()])

    Project example: Admin dashboard counts / venues list cache. Create/update/delete ke baad cache.delete('venues').

    Viva tipprint('DB queried') function ke andar laga ke miss/hit demo karo β€” hit pe print nahi chalega.

  66. 66
    Why do we use caching?
    Times asked 5
    Official solution

    SimpleCache isliye taaki 100 users same dashboard pe DB ko 100 baar na maror dein.

    Problem: repeated reads, slow page, extra load. Cache seconds ke liye snapshot deta hai.

    Nahi use karna: har second badalne wala live stock, user-private secret data bina soch ke (key mein user_id hona chahiye).

    Memoization caching ka subset hai (function args). HTTP 304 / browser cache alag layer.

    Redis in-memory key-value store hai β€” fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.

    MAD2 mein Redis do kaam: (1) cache β€” same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker β€” Flask task queue mein daalta hai, worker uthata hai.

    Flow: cache.get(key) β†’ hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.

    Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.

    Alag: Redis β‰  Memcached (Celery broker nahi). Redis β‰  localStorage (woh browser). redis-cli ping β†’ PONG viva proof.

    Project example: Shows list har user dekhta hai β€” perfect cache. Booking POST cache nahi β€” har baar write.

  67. 67
    Difference between Redis and Memcached.
    Times asked 1
    Official solution

    SimpleDono RAM cache. Redis zyada smart: lists, hashes, pub/sub, persistence, Celery broker.

    Memcached: simple key-value, yahi. Redis: data structures + expire + optional disk dump.

    MAD2 Redis choose β€” cache aur broker ek hi process. Memcached Celery nahi chalaata.

    Redis in-memory key-value store hai β€” fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.

    MAD2 mein Redis do kaam: (1) cache β€” same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker β€” Flask task queue mein daalta hai, worker uthata hai.

    Flow: cache.get(key) β†’ hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.

    Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.

    Alag: Redis β‰  Memcached (Celery broker nahi). Redis β‰  localStorage (woh browser). redis-cli ping β†’ PONG viva proof.

    Project example: Tumhare config mein CACHE_TYPE RedisCache, CELERY broker redis://. Memcached nahi.

    Viva tipMAD2 mein Redis isliye β€” cache + broker ek hi tool. Memcached Celery nahi chalaata.

  68. 68
    What are Webhooks?
    Times asked 7
    Official solution

    SimpleWebhook = woh tumhe call karta hai. API = tum unhe call karte ho.

    Payment success pe Stripe tumhare /webhooks/payment pe POST. Tum poll nahi karte.

    API pull, webhook push. WebSocket dono taraf live connection. SSE server→client stream.

    MAD2 mostly REST APIs. Webhook theory + example kaafi. Verify signature production mein.

    Example

    @app.route('/webhooks/payment', methods=['POST'])
    def hook():
        event = request.json
        ...

    Project example: Agar implement nahi: 'course REST. Webhook design: POST /webhooks/booking-paid'.

    Viva tipAPI pull, webhook push. WebSocket dono taraf live. SSE server β†’ client stream.

  69. 69
    Difference between Webhooks and APIs.
    Times asked 1
    Official solution

    SimpleWebhook = woh tumhe call karta hai. API = tum unhe call karte ho.

    Payment success pe Stripe tumhare /webhooks/payment pe POST. Tum poll nahi karte.

    API pull, webhook push. WebSocket dono taraf live connection. SSE server→client stream.

    MAD2 mostly REST APIs. Webhook theory + example kaafi. Verify signature production mein.

    Example

    @app.route('/webhooks/payment', methods=['POST'])
    def hook():
        event = request.json
        ...

    Project example: Agar implement nahi: 'course REST. Webhook design: POST /webhooks/booking-paid'.

    Viva tipAPI pull, webhook push. WebSocket dono taraf live. SSE server β†’ client stream.

  70. 70
    Difference between APIs, Webhooks, and WebSockets.
    Times asked 1
    Official solution

    SimpleAPI you call them. Webhook they call you. WebSocket both stay connected.

    Difference APIs Webhooks WebSockets.

    HTTP postcard (request-response). WebSocket phone call (dono taraf live). SSE radio (server→client stream). Webhook unka server tumhe POST karta hai (payment).

    MAD2 mostly REST. Live dashboard = poll + Redis cache kaafi. Agar implement nahi kiya to design bolo, jhoot mat.

    Project example: We REST. Others theory.

    Project example: We REST. Others theory.

  71. 71
    Difference between AJAX and Fetch.
    Times asked 1
    Official solution

    SimpleAJAX idea hai, Fetch uska modern tool, Axios optional wrapper.

    Examiner difference poochhe: AJAX umbrella, fetch function, axios package.

    HTTP verbs + status REST ki zabaan. GET read, POST create, PUT replace, PATCH partial, DELETE remove. GET typically no body.

    Status: 200 OK, 201 created, 202 accepted (Celery task), 400 bad input, 401 no/bad token, 403 role nahi, 404 missing, 409 conflict (double book), 500 server.

    AJAX/fetch page reload nahi. SPA poori isi pe. Postman se bina Vue ke API prove karo β€” examiner pasand.

    Project example: Tumhare components fetch ya axios β€” jo file hai woh dikhao.

  72. 72
    Difference between Local Storage and Session Storage.
    Times asked 2
    Official solution

    SimpleSame API getItem/setItem. SS tab close pe saaf. LS survive. Shared computer pe SS thoda safer.

    Token LS common. Session storage quiz in-progress bhi.

    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: token localStorage. Don't mix randomly.

  73. 73
    Send an email whenever a new show is created.
    Times asked 1
    Official solution

    Simplecommit ke baad .delay(show.id) ya mail.send. Don't before commit (id nahi).

    Failure shouldn't rollback booking unless required.

    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: create_show route end.

  74. 74
    Display the remaining number of tickets on the booking page.
    Times asked 1
    Official solution

    Simplecapacity - booked_sum server. Display remaining on booking page.

    Don't cache too long if live booking.

    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: show.available field maintain.

    Project example: show.available field maintain.

  75. 75
    Show the number of tickets booked in each booking summary.
    Times asked 1
    Official solution

    Simplefunc.count / len(user.bookings). Header bookings page. Display total/current count. Tickets booked each summary.

    Show number tickets. Remaining tickets capacity-booked server compute.

    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: serialize available. Don't trust client.

  76. 76
    Prevent duplicate category/service/campaign names.
    Times asked 1
    Official solution

    Simplequery.filter_by(name).first() 409. DB unique=True. Prevent duplicate category/product.

    Case: lower() before save.

    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: unique constraint + 409.

    Project example: unique constraint + 409.

  77. 77
    Make uniqueness case-sensitive or case-insensitive as required.
    Times asked 1
    Official solution

    Simpleemail.lower() before save. Unique index. SQLite LIKE case. Make uniqueness case-sensitive/insensitive as required.

    Examiner specify.

    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: normalize on write.

  78. 78
    Prevent duplicate products/categories/services from being added.
    Times asked 1
    Official solution

    Simplequery.filter_by(name).first() 409. DB unique=True. Prevent duplicate category/product.

    Case: lower() before save.

    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: unique constraint + 409.

    Project example: unique constraint + 409.

  79. 79
    Validate manufacturing and expiry dates before saving.
    Times asked 1
    Official solution

    SimplePehle task repeat karke confirm, smallest diff, run, 2 line explain.

    Model? API? sirf CSS? Edge case ek. Docs if they allow.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Suggested flow1) Confirm
    2) Layer choose
    3) Change β†’ demo
    4) Edge

    Example

    @app.route('/api/hello')
    def hello():
        return jsonify(message='Hello World')

    Project example: Jo feature domain (parking/jobs/tickets) usi language mein variable names.

  80. 80
    Prevent users from booking the same service/appointment/parking slot twice.
    Times asked 1
    Official solution

    SimpleDoosri booking same slot: unique constraint + query.exists + 400 message.

    Frontend disable UX. Backend source of truth. Race: two users unique(slot).

    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

    if Booking.query.filter_by(user_id=uid, slot_id=sid).first():
        return jsonify(message='Already booked'), 400

    Project example: Click book twice. Second 400 Already booked. DB unique.

  81. 81
    Prevent users from booking multiple appointments at the same time.
    Times asked 1
    Official solution

    Simpleoverlap query same user time 400. Prevent multiple appointments same time.

    Frontend disable not enough.

    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: Booking time range.

    Project example: Booking time range.

  82. 82
    Prevent users from creating drives for past dates.
    Times asked 1
    Official solution

    Simpleif drive.date < today abort 400. Frontend min=today. Prevent past dates.

    Both layers.

    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: create drive.

    Project example: create drive.

  83. 83
    Prevent users from applying to multiple drives/jobs after selection.
    Times asked 1
    Official solution

    Simpleif selected_elsewhere 400. Unique where status=selected. Prevent applying multiple drives after selection.

    Backend.

    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: Application model.

    Project example: Application model.

  84. 84
    Add an Admin activation route.
    Times asked 1
    Official solution

    SimpleGET/POST /activate/<token> set active True. Add Admin activation route.

    Auth admin.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Project example: new route.

  85. 85
    Add or modify review disable functionality.
    Times asked 1
    Official solution

    SimpleFlag can_review false after time/status. v-if + backend 400. Add or modify review disable.

    Both layers.

    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: Review.vue.

    Project example: Review.vue.

  86. 86
    Accept or reject offers from the dashboard.
    Times asked 1
    Official solution

    SimpleAdmin PATCH application status. Notify email optional. Accept or reject offers dashboard.

    Demo.

    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: Admin applications table.

    Project example: Admin applications table.

  87. 87
    Remove department matching criteria from the code.
    Times asked 1
    Official solution

    SimplePehle task repeat karke confirm, smallest diff, run, 2 line explain.

    Model? API? sirf CSS? Edge case ek. Docs if they allow.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Suggested flow1) Confirm
    2) Layer choose
    3) Change β†’ demo
    4) Edge

    Example

    @app.route('/api/hello')
    def hello():
        return jsonify(message='Hello World')

    Project example: Jo feature domain (parking/jobs/tickets) usi language mein variable names.

  88. 88
    Modify UI elements (button, color, card/table view, etc.).
    Times asked 1
    Official solution

    SimpleLive CSS/Vue: sabse chhota change jo dikhe. Logic/API mat todo unless poochhein.

    Inspect element se class dhoondo. btn-success, navbar bottom fixed, center flex.

    Save, refresh, dikhao. Break mat karo layout poora.

    Example

    <button class="btn btn-success">Login</button>
    nav { position: fixed; bottom: 0; width: 100%; }
    .wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

    Project example: Jo button/navbar poocha usi file (Navbar.vue / App.vue / css).

    Viva tipDevTools se element inspect. Logic/API mat todo unless poochhein.

  89. 89
    Debug and fix an existing bug.
    Times asked 1
    Official solution

    SimpleConsole/terminal padho, reproduce, smallest fix, regression na todo.

    Examiner patience. Think aloud. Copilot band.

    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: F12 / celery log / flask traceback.

  90. 90
    Explain why you did not implement ticket cancellation.
    Times asked 1
    Official solution

    SimpleTime. Design: status cancelled, seats restore, refund none in course.

    Why not ticket cancellation.

    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: Would add PATCH status + available++.

    Project example: Would add PATCH status + available++.

  91. 91
    Explain why some project features were not implemented.
    Times asked 1
    Official solution

    SimpleJo nahi kiya sach + reason + kaise add (model API Vue). Bluff worse.

    Core feature not implemented? Milestone vs code.

    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 complete, polish only. If missing export, plan celery csv.

  1. 1
    What is Vue.js?
    Times asked 5
    Official solution

    SimpleVue.js frontend framework β€” reactive UI components. MAD2 mein common, MAD1 optional.

    Component: reusable UI (Navbar.vue) + data + template.
    Props: parent β†’ child data. Child β†’ parent: $emit('update', val).
    Slots: parent child ke andar extra HTML daal sakta hai.
    Lifecycle: created (data setup), mounted (DOM ready β€” API call), updated, unmounted.
    v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
    Standalone component: khud ke saath compile, parent register kam.

  2. 2
    Are you using Vue CLI or Vue CDN?
    Times asked 1
    Official solution

    SimpleCDN se Vue script tag, CLI se full project (webpack/vite, SFC).

    CDN: <script src='https://unpkg.com/vue@3'></script> β€” setup 1 minute, MAD2 proto ke liye theek, offline toot sakta hai.
    CLI (vue create / Vite): .vue files, components, router, build step. Production apps ke liye better.
    Standalone/SFC components CLI/Vite mein milte hain.

  3. 3
    Difference between Vue CLI and Vue CDN.
    Times asked 5
    Official solution

    SimpleCDN se Vue script tag, CLI se full project (webpack/vite, SFC).

    CDN: <script src='https://unpkg.com/vue@3'></script> β€” setup 1 minute, MAD2 proto ke liye theek, offline toot sakta hai.
    CLI (vue create / Vite): .vue files, components, router, build step. Production apps ke liye better.
    Standalone/SFC components CLI/Vite mein milte hain.

  4. 4
    What are Vue Lifecycle Hooks? Explain each.
    Times asked 1
    Official solution

    SimpleVue.js frontend framework β€” reactive UI components. MAD2 mein common, MAD1 optional.

    Component: reusable UI (Navbar.vue) + data + template.
    Props: parent β†’ child data. Child β†’ parent: $emit('update', val).
    Slots: parent child ke andar extra HTML daal sakta hai.
    Lifecycle: created (data setup), mounted (DOM ready β€” API call), updated, unmounted.
    v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
    Standalone component: khud ke saath compile, parent register kam.

  5. 5
    Difference between v-if and v-show.
    Times asked 10
    Official solution

    Simplev-if element DOM se hataata/jodata hai, v-show sirf CSS display toggle karta hai.

    v-if='isAdmin' β†’ false ho to element exist hi nahi. Costly toggle, lekin hidden data DOM mein nahi.
    v-show='open' β†’ display:none. Fast toggle, element hamesha DOM mein.

    Rare condition: v-if. Bar-bar toggle (dropdown): v-show.

  6. 6
    Difference between v-model and v-bind.
    Times asked 4
    Official solution

    Simplev-bind one-way data β†’ view, v-model two-way (input ke saath sync).

    <img v-bind:src='url'> ya <img :src='url'>  β€” url change to image change, image se url nahi.
    <input v-model='email'> β€” type karo to email variable turant update.

    v-model = :value + @input ka shortcut. Forms mein v-model, attributes mein v-bind.

  7. 7
    What are Props in Vue?
    Times asked 5
    Official solution

    SimpleVue.js frontend framework β€” reactive UI components. MAD2 mein common, MAD1 optional.

    Component: reusable UI (Navbar.vue) + data + template.
    Props: parent β†’ child data. Child β†’ parent: $emit('update', val).
    Slots: parent child ke andar extra HTML daal sakta hai.
    Lifecycle: created (data setup), mounted (DOM ready β€” API call), updated, unmounted.
    v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
    Standalone component: khud ke saath compile, parent register kam.

  8. 8
    What are Slots in Vue?
    Times asked 2
    Official solution

    SimpleVue.js frontend framework β€” reactive UI components. MAD2 mein common, MAD1 optional.

    Component: reusable UI (Navbar.vue) + data + template.
    Props: parent β†’ child data. Child β†’ parent: $emit('update', val).
    Slots: parent child ke andar extra HTML daal sakta hai.
    Lifecycle: created (data setup), mounted (DOM ready β€” API call), updated, unmounted.
    v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
    Standalone component: khud ke saath compile, parent register kam.

  9. 9
    How do you pass data from Child Component to Parent Component?
    Times asked 1
    Official solution

    SimpleVue.js frontend framework β€” reactive UI components. MAD2 mein common, MAD1 optional.

    Component: reusable UI (Navbar.vue) + data + template.
    Props: parent β†’ child data. Child β†’ parent: $emit('update', val).
    Slots: parent child ke andar extra HTML daal sakta hai.
    Lifecycle: created (data setup), mounted (DOM ready β€” API call), updated, unmounted.
    v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
    Standalone component: khud ke saath compile, parent register kam.

  10. 10
    What is ORM?
    Times asked 39
    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.

  11. 11
    Are you using ORM?
    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.

  12. 12
    Advantages of ORM.
    Times asked 5
    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.

  13. 13
    What is SQLAlchemy?
    Times asked 8
    Official solution

    SimpleSQLAlchemy Python ka sabse popular ORM hai. MAD1 mein Flask-SQLAlchemy wrapper use hota hai.

    db = SQLAlchemy(app)

    class Book(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        title = db.Column(db.String(80), nullable=False)
    
    Operations: db.session.add(obj), .commit(), .delete(obj), Model.query.all(), .filter_by(), .get_or_404(id).
    db.Model ek class hai (function nahi). db object engine + session + metadata hold karta hai.

    SQLALCHEMY_TRACK_MODIFICATIONS=False extra signals band karta hai, performance warning hatati hai.

  14. 14
    Flask-Security vs JWT.
    Times asked 1
    Official solution

    SimpleJWT = JSON Web Token β€” signed string jisme user id/role hota hai. Har request header mein jaata hai. Session server pe store, JWT client pe.

    Login β†’ server token deta hai β†’ Authorization: Bearer <token>
    Payload: {sub: user_id, role: admin, exp: ...} β€” padha ja sakta hai, change nahi (signature).
    Session: browser cookie, server-rendered Flask ke liye simple.
    Token: mobile/Vue SPA, scaling (server memory nahi). Store: memory/httpOnly cookie, localStorage XSS risk.
    MAD1 mostly session. Flask-Security session+login, JWT APIs ke liye.

  15. 15
    What security mechanism have you used?
    Times asked 2
    Official solution

    SimplePassword DB mein plain text mat rakho β€” hash store karo jo reverse nahi hota.

    from werkzeug.security import generate_password_hash, check_password_hash
    user.password = generate_password_hash(request.form['password'])
    check_password_hash(user.password, form_password)

    Hashing β‰  encryption. Leak pe bhi original password nahi milta (easy passwords rainbow table se β€” isliye salt + strong hash).
    Column String(200) kyunki hash lamba hota hai. unique=True password pe mat lagao.

  16. 16
    What are Webhooks?
    Times asked 7
    Official solution

    SimpleWebSocket do-tarfa live connection, Webhook 'kisi event pe URL hit karo'.

    WebSocket: chat, live scores. Connection open rehti hai.
    Webhook: payment success pe Stripe tumhari /webhook URL POST karta hai. Connection nahi, ek HTTP call.
    MAD1 mein usually nahi hote; REST request-response hota hai.

  17. 17
    Show how Celery works in your project.
    Times asked 1
    Official solution

    SimpleCelery background tasks (email, CSV, reports) async chalaata hai. Redis broker/queue + cache.

    User 'Export' click β†’ Celery task queue β†’ Redis message β†’ worker CSV banaata hai β†’ user baad mein download.
    Saath isliye: Celery ko broker chahiye, Redis tez in-memory. MAD2 topic zyada, MAD1 mein optional.
    Priority: task queues/routing. Caching: Redis mein key-value, DB hits kam.
    Pub/Sub: publisher channel pe message, subscribers sunte hain β€” Redis yeh bhi karta hai.

  18. 18
    Replace a Card View with a Table View on a page.
    Times asked 1
    Official solution

    Simpleexaminer UI tweak maangta hai β€” CSS class ya inline, instantly dikhao.

    Button color: <button class='btn btn-success'> ya style='background:#22c55e;color:#fff'
    Navbar: navbar-dark bg-success / style='background:yellow' / fixed-bottom se neeche.
    Center: .wrap { display:flex; justify-content:center; align-items:center; min-height:100vh; }
    text-align:center heading ke liye. Bootstrap: d-flex justify-content-center, mx-auto, text-center.
    Hover: .btn:hover { opacity:0.8; transform:scale(1.02); }
    Half width: class='col-6' ya width:50%. Row→column: flex-direction:column / col-12 stack.
    Login card: card shadow p-4 mx-auto (max-width:400px).
    Table header green: th { background:green; color:white; } Bold column: td:nth-child(2){font-weight:bold}
    Box shadow: box-shadow: 4px 4px 12px rgba(0,0,0,.3);
    Background image: body { background: url('/static/bg.jpg') center/cover; }
    Reset button: <button type='reset'>Clear</button>
    Move button: ms-auto / position / flex order.
    Jinja dashboard heading: <h1>{{ user.name }}'s Dashboard</h1>

  19. 19
    Debug and fix a model issue.
    Times asked 1
    Official solution

    Yeh MAD-1 viva question tumhare project ke context se linked hai. Short answer is structure se do:

    Pehle 1 line definition/purpose, phir tumhare project ka example, phir chhota code/flow.

    Typical Flask flowBrowser request β†’ @app.route controller β†’ SQLAlchemy model/DB β†’ Jinja template response.

    Auth: session['user_id'] + role check. CRUD: add/commit, query.all, field update, delete.
    Live change maange to: related model β†’ route β†’ template, phir browser refresh karke dikhao.

    Example (generic create):
    obj = Model(name=request.form.get('name'))

    db.session.add(obj); db.session.commit()
    return redirect(url_for('list_view'))
  20. 20
    Perform a random code modification (project-specific).
    Times asked 1
    Official solution

    Yeh feature demo hai. Account ready rakho, steps bol ke dikhao.

    Role ke hisaab login β†’ action (create/approve/book) β†’ DB/UI pe result β†’ edge case (fail when slots=0 / blacklisted).
    Do browser windows: admin + user. Search/filter alag se dikhao.
    Agar feature nahi hai to sach bolo aur 2 minute mein kaise add karoge (query + template) explain karo.

  21. 21
    Demonstrate Celery working.
    Times asked 1
    Official solution

    SimpleCelery background tasks (email, CSV, reports) async chalaata hai. Redis broker/queue + cache.

    User 'Export' click β†’ Celery task queue β†’ Redis message β†’ worker CSV banaata hai β†’ user baad mein download.
    Saath isliye: Celery ko broker chahiye, Redis tez in-memory. MAD2 topic zyada, MAD1 mein optional.
    Priority: task queues/routing. Caching: Redis mein key-value, DB hits kam.
    Pub/Sub: publisher channel pe message, subscribers sunte hain β€” Redis yeh bhi karta hai.

  22. 22
    Explain the Vue frontend implementation.
    Times asked 1
    Official solution

    SimpleVue.js frontend framework β€” reactive UI components. MAD2 mein common, MAD1 optional.

    Component: reusable UI (Navbar.vue) + data + template.
    Props: parent β†’ child data. Child β†’ parent: $emit('update', val).
    Slots: parent child ke andar extra HTML daal sakta hai.
    Lifecycle: created (data setup), mounted (DOM ready β€” API call), updated, unmounted.
    v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
    Standalone component: khud ke saath compile, parent register kam.

  23. 23
    Explain the backend implementation.
    Times asked 2
    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.

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