-
1
Show your ID card.Times asked 23Official solution
SimpleCamera pe college ID — naam photo match. Identity viva ki pehli gate.
Pehle se haath mein, glare nahi. Examiner screenshot. Phir GitHub + portal ZIP run.
Name GitHub/portal se mismatch red flag.
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: ID dikhao, bolo roll/name, phir screen share repo.
Viva tipPehle se ID haath mein rakho, glare mat aane do. Examiner screenshot/verify karta hai. Iske baad GitHub + project run.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
2
Show your GitHub repository and collaborator.Times asked 16Official solution
SimpleRepo = evidence tumne kaam kiya: commits, collaborators, README.
Regular messages, last-day dump nahi. Private access pehle de do. Main branch submitted ZIP se match.
Collaborator settings. Commit dates.
Example
Settings → Collaborators: apna + teammate (agar allowed). Commits: regular messages, last-day dump nahi.Project example: Settings → Collaborators. git log --oneline. README run steps.
Viva tipPrivate repo access de do pehle. Main branch latest submitted ZIP se match honi chahiye.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
3
Confirm that you submitted the required form.Times asked 1Official solution
SimpleHaan submitted portal form/report. Link ready. Checksum if any.
Don't contradict AI %.
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 confirmation / PDF.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
4
Demonstrate your complete application.Times asked 7Official 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) LogoutProject example: Jo statement/parking/jobs/tickets hai uske user+admin journeys.
Viva tipBol: 'Yahan overbooking rokta hoon'. Mandatory features pehle, polish baad.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
5
Explain your project and its implementation.Times asked 1Official solution
SimpleFeatures tour then architecture then 1 deep dive jobs/cache.
Project statement first. Don't skip celery if 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: User journey + admin + jobs.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
6
Explain your models.py.Times asked 2Official solution
SimpleEach class PK/FK relationships why. Random line ready.
serialize hide password.
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: models.py top to bottom 3 min.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
7
Explain your project code.Times asked 1Official 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, redirectUnknown 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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
8
Show your login/authentication code.Times asked 1Official solution
Simplelogin.vue + backend login + decorator + LS. Show login/authentication code.
Show where authentication backend.
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_requiredidentity.@roles_required('admin')ya Vuev-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: 4 files.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
9
Show MailHog integration.Times asked 1Official solution
SimpleMailHog local fake post office — email internet pe nahi jaata, browser mein dikhta hai.
SMTP 1025, Web UI 8025. Viva demo gold. Credentials nahi.
Real Gmail SMTP student accounts pe block common — MailHog safer.
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.
Example
MAIL_SERVER=localhost MAIL_PORT=1025 # http://localhost:8025Project example: Reminder task → MailHog list → HTML body user name ke saath.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
10
Demonstrate Celery background jobs (daily reminder/monthly report).Times asked 1Official solution
SimpleLive jobs: Redis, worker, beat, crontab abhi, logs + email/CSV.
Scheduled vs user-triggered dono dikhao. Missing feature honestly.
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) redis
2) worker
3) beat
4) crontab now
5) logs + MailHogExample
CELERY_BEAT_SCHEDULE = { 'daily-reminder': { 'task': 'jobs.daily_reminder', 'schedule': crontab(hour=18, minute=0), }, }Project example: Change schedule current time. MailHog. Export button 202.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
11
Explain where Celery and Redis are implemented.Times asked 1Official solution
SimpleRedis box hai, Celery us box se kaam uthane wala worker hai — same cheez nahi.
Redis: store (cache keys) + queue (broker lists).
Celery: Python library jo tasks define karti hai,.delay()se queue mein daalti hai, worker execute karta hai.Dono localhost pe ho sakte hain. Alag Redis DB index use karo. Redis band = cache miss + Celery stuck.
Example
Celery: broker_url='redis://localhost:6379/0' Cache: CACHE_REDIS_URL='redis://localhost:6379/1'Project example: export_csv.delay(user_id) Flask se. Worker Redis se task uthata hai, CSV+email. Cache alag keys
venues.Viva tipAgar possible ho to cache db=1, broker db=0 — keys mix nahi hoti.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
12
Difference between Authentication and Authorization.Times asked 20Official solution
SimpleAuthentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"
Authentication: login. Username + password check karke prove karte ho ki tum genuine user ho. Success pe session/token milta hai.
Authorization: uske baad role check. Admin hi parking lot / venue / drive delete kar sakta hai, normal user nahi.MAD2 mein yeh alag layers hain: login API = authentication (JWT milta hai).
@roles_required('admin')ya Vuev-if="isAdmin"= authorization.Validation alag cheez hai (form sahi bhara hai ya nahi, jaise age 18+). Authentication identity hai, authorization permission, validation input quality.
Example
# Authentication if user and check_password_hash(user.password, form_password): token = create_access_token(identity=user.id) # Authorization if current_user.role != 'admin': abort(403) # logged in ho, lekin allowed nahiProject example: Student login = authentication. Student admin dashboard nahi khol sakta = authorization. Frontend button hide sirf UX hai — asli check backend pe hona chahiye.
Viva tip401 = not logged in / bad token. 403 = logged in, role galat. Examiner yeh difference bahut poochta hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
13
What token-based authentication mechanism have you used?Times asked 1Official solution
SimpleJWT HS256 flask-jwt-extended / security token. Named library.
Which library token generation / token-based.
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_requiredidentity.@roles_required('admin')ya Vuev-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: requirements.txt line.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
14
How is the authentication token generated?Times asked 2Official solution
SimpleLogin success pe server secret se sign. create_access_token / security token.
Show login route return. DevTools response JSON. jwt.io payload.
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_requiredidentity.@roles_required('admin')ya Vuev-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.
Example
token = create_access_token(identity=user.id, additional_claims={'role': user.role})Project example: auth.py login. Flask-JWT-Extended.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
15
Explain UserMixin and RoleMixin.Times asked 1Official solution
SimpleUserMixin RoleMixin Flask-Security interfaces: is_authenticated, roles relation.
Methods milte. Models inherit.
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: class User(db.Model, UserMixin).
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
16
What is caching?Times asked 23Official 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.cachedcode 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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
17
Where have you implemented caching?Times asked 7Official solution
SimpleGET lists/stats @cache.cached. Mutations pe delete. CACHE_TYPE Redis.
Why each route: public repeated reads. User-private careful.
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: File+line decorator. redis-cli get key optional.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
18
Show the cached API/code.Times asked 1Official solution
SimpleDecorator + Redis ping + invalidation line + miss/hit demo idea.
Kaunsi routes, timeout, key_prefix, query_string. POST pe nahi.
print after set sirf miss. Timeout chhota karke expiry.
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: resources list GET cached. create_venue delete key.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
19
What is lazy in SQLAlchemy relationships?Times asked 1Official solution
SimpleWhen related load: select extra query, joined JOIN now, dynamic query object.
lazy in relationships.
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
bookings = db.relationship('Booking', lazy='dynamic') user.bookings.filter_by(status='ok').all()Project example: default select. N+1.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
20
What is cascading (cascade)?Times asked 1Official solution
SimpleCASCADE = parent gaya to bacche bhi. Restrict = pehle bacche sambhalo.
ON DELETE CASCADE SQL. SQLAlchemy cascade='all, delete-orphan' collection se orphans.
Opposite auto nahi — child delete se parent nahi marata.Venue delete: bookings restrict (safer viva) ya cascade+cancel policy. Examiner design poochta hai.
ON UPDATE CASCADE PK change — rare. SET NULL, RESTRICT bhi options.
Example
shows = db.relationship('Show', cascade='all, delete-orphan', back_populates='venue')Project example: Show belongs Venue delete-orphan. Booking venue pe restrict — 'reassign first'.
Viva tipVenue delete pe bookings: restrict (mat delete) ya cascade+refund policy. Examiner design poochta hai. Cascade UPDATE bhi hota hai (PK change) — rare.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
21
Difference between LIKE and ILIKE.Times asked 2Official 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}%').
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
22
Write an ORM query to fetch a user by ID.Times asked 1Official solution
Simple
User.query.get(id) or db.session.get(User,id). Write ORM query fetch user by ID.None if missing.
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 404 unless get_or_404.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
23
What happens if two users try to book the same appointment/resource simultaneously?Times asked 1Official solution
SimpleTwo users same slot: unique + txn. Last IntegrityError 400 just taken.
Simultaneous book.
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(user,slot) or seat number unique.
Project example: unique(user,slot) or seat number unique.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
24
Show your Celery tasks.Times asked 1Official 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/awaitbrowser 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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
25
Explain background mailing jobs.Times asked 1Official solution
SimpleFlask-Mail SMTP Celery. Templates HTML. Verify MailHog/logs.
Dynamic render_template user=stats.
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: tasks send + reminder.html.
Project example: tasks send + reminder.html.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
26
Write a v-for loop in Vue.Times asked 1Official solution
Simplev-for item in items :key. Write v-for loop Vue. Syntax. Notepad.
key required.
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.
:keyv-for pe zaroori warna Vue galat reuse.v-htmlXSS. Secret UI ke liye sirf v-if kaafi nahi — API 403 bhi.MAD1 Jinja server HTML. MAD2 yeh directives browser mein reactive.
Example
<li v-for="s in students" :key="s.id">{{ s.name }}</li>Project example: li students.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
27
Write a v-if / v-else example in Vue.Times asked 1Official solution
Simplev-if condition v-else. Write v-if / v-else example Vue.
Same.
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.
:keyv-for pe zaroori warna Vue galat reuse.v-htmlXSS. Secret UI ke liye sirf v-if kaafi nahi — API 403 bhi.MAD1 Jinja server HTML. MAD2 yeh directives browser mein reactive.
Project example: isAdmin.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
28
Write an if-else statement in Vue.Times asked 1Official solution
Simplev-if v-else on p. Write if-else Vue. Write v-if example.
next sibling else.
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.
:keyv-for pe zaroori warna Vue galat reuse.v-htmlXSS. Secret UI ke liye sirf v-if kaafi nahi — API 403 bhi.MAD1 Jinja server HTML. MAD2 yeh directives browser mein reactive.
Example
<p v-if="n>0">pos</p><p v-else>not</p>Project example: status.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
29
Write a JavaScript function to: Calculate the square of a number. Calculate the cube of a number. Multiply an integer by 4. Add two or three numbers.Times asked 1Official solution
Simplesq n*n cube n**3 *4 add rest. Write JS square cube multiply 4 add two/three.
Separate functions.
JS browser ki language.
constrebind nahi,letblock. Arrow() =>this lexical.Promise: pending/fulfill/reject.
async/awaitusko seedha padhne jaisa.try/catchawait pe. Yeh Celery nahi — Celery Python worker.fetchnative AJAX.array.filter/mapcomputed lists. Vue data reactive; plain JS DOM querySelector se manual.Example
const sq=n=>n*n; const cube=n=>n**3; const mul4=n=>n*4; const add=(...a)=>a.reduce((x,y)=>x+y,0)Project example: Notepad.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
30
Write a JavaScript function to compute cube roots.Times asked 1Official solution
SimpleMath.cbrt(n) ya n**(1/3). Write JS cube roots.
Watch negative.
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: console.log.
Project example: console.log.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
31
Write an @app.route example for GET and POST methods.Times asked 1Official solution
SimpleOne route methods GET+POST. GET JSON, POST create 201. Write @app.route GET and POST. Simple GET POST endpoints.
if request.method.
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.
Example
@app.route('/api/echo', methods=['GET','POST']) def echo(): if request.method=='GET': return jsonify(ok=True) return jsonify(body=request.get_json()), 201Project example: echo API.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
32
Write a Jinja function/filter to calculate the cube of an integer.Times asked 1Official solution
SimpleMAD1 templates. MAD2 mostly Vue; emails still Jinja. {{ n|cube }} custom filter. Write Jinja snippet Notepad.
extends for block. cube filter.
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
{{ value|cube }} @app.template_filter('cube') def cube(n): return int(n)**3Project example: reminder.html.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
33
What is MVC?Times asked 9Official solution
SimpleModel-View-Controller separation of concerns.
Map folders. Vue is V. Flask routes C. models M.
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'.
Example
Vue Booking.vue → POST /api/book → Booking model → jsonify → this.bookings.pushProject example: See architecture essay.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
34
What is Lazy Loading?Times asked 3Official solution
SimpleLazy = zarurat pe load. Relationship default extra query. Vue route import() code-split.
lazy='dynamic' query object. noload mat laao. Fast first paint.
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: user.bookings access pe query. Dashboard joinedload instead.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
35
Approximately what percentage of your project was built using AI?Times asked 1Official solution
SimpleSach % + kahan + kaise verify + kya seekha. Report se contradict mat.
Boilerplate vs business logic. Examiner process poochta. 'Sab ChatGPT' red flag.
Verify: docs, run, edge case. Seekha: CORS, JWT exp, beat vs worker.
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: Jo number form/PDF mein hai wahi. Example file jo AI se start kiya, khud debug kiya.
Viva tipExaminer 'kya seekha / kaise check kiya' pe marks. 'Sab ChatGPT' red flag. Jo khud debug kiya woh story ready rakho.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet