-
1
Demo of the complete application.Times asked 2Official solution
SimpleDemo script pehle se practice karo, 5-7 minute, saari roles.
Suggested flow
1) Register/login user 2) Admin login — CRUD 3) Approval/blacklist 4) Booking/apply 5) Search 6) Validation edge (slots 0, duplicate) 7) Logout
Bolte-bolte dikhao: 'Yahan overbooking rokta hoon'. Code tab kholna jab poochhein.
Crash ho to debug calmly: terminal error, typo, DB path.
Mandatory features skip mat karna — examiner list tick karta hai.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
Explain how subjects, chapters, quizzes, etc. work in your project.Times asked 1Official 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.
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
What architecture are you using?Times asked 2Official solution
SimpleMVC = Model-View-Controller. Code ko 3 hisson mein baant ta hai taaki mix na ho.
Model: data + DB. models.py — User, Trek, Booking classes.
View: jo user dekhta hai. templates/*.html + Jinja.
Controller: beech ka logic. routes / app.py — request lo, model se data, view ko do.Example flow (register):
Browser form POST → Controller register() → User model save → redirect → View dashboard.htmlDraw: Browser → Controller → Model → DB, phir Controller → View → Browser.
ORM na ho to bhi MVC ho sakta hai — Model raw SQL functions ho sakte hain. Structure matter karta hai, library nahi.
MVP/MVVM doosri architectures hain; MAD1 mein MVC expected hai.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
Explain MVC architecture.Times asked 9Official solution
SimpleMVC = Model-View-Controller. Code ko 3 hisson mein baant ta hai taaki mix na ho.
Model: data + DB. models.py — User, Trek, Booking classes.
View: jo user dekhta hai. templates/*.html + Jinja.
Controller: beech ka logic. routes / app.py — request lo, model se data, view ko do.Example flow (register):
Browser form POST → Controller register() → User model save → redirect → View dashboard.htmlDraw: Browser → Controller → Model → DB, phir Controller → View → Browser.
ORM na ho to bhi MVC ho sakta hai — Model raw SQL functions ho sakte hain. Structure matter karta hai, library nahi.
MVP/MVVM doosri architectures hain; MAD1 mein MVC expected hai.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
How have you implemented MVC in your project?Times asked 1Official solution
SimpleMVC = Model-View-Controller. Code ko 3 hisson mein baant ta hai taaki mix na ho.
Model: data + DB. models.py — User, Trek, Booking classes.
View: jo user dekhta hai. templates/*.html + Jinja.
Controller: beech ka logic. routes / app.py — request lo, model se data, view ko do.Example flow (register):
Browser form POST → Controller register() → User model save → redirect → View dashboard.htmlDraw: Browser → Controller → Model → DB, phir Controller → View → Browser.
ORM na ho to bhi MVC ho sakta hai — Model raw SQL functions ho sakte hain. Structure matter karta hai, library nahi.
MVP/MVVM doosri architectures hain; MAD1 mein MVC expected hai.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
Show the MVC architecture in your code.Times asked 1Official solution
SimpleMVC = Model-View-Controller. Code ko 3 hisson mein baant ta hai taaki mix na ho.
Model: data + DB. models.py — User, Trek, Booking classes.
View: jo user dekhta hai. templates/*.html + Jinja.
Controller: beech ka logic. routes / app.py — request lo, model se data, view ko do.Example flow (register):
Browser form POST → Controller register() → User model save → redirect → View dashboard.htmlDraw: Browser → Controller → Model → DB, phir Controller → View → Browser.
ORM na ho to bhi MVC ho sakta hai — Model raw SQL functions ho sakte hain. Structure matter karta hai, library nahi.
MVP/MVVM doosri architectures hain; MAD1 mein MVC expected hai.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
How do controllers communicate/interact with each other?Times asked 1Official solution
SimpleRoutes/controllers URLs handle karte hain. app.py app banata hai, models.py data, templates/ views, static/ CSS-JS.
Typical structure:
app.py / __init__.py → Flask app, db.init, register blueprints
models.py → tables
routes.py / views → @app.route functions
templates/ → Jinja HTML
static/ → css, images
instance/*.db → SQLiteEk route explain karne ka template:
1) URL + methods 2) Auth/role check 3) Form/query se data 4) Business rule (duplicate, slots) 5) db.session 6) render ya redirectExample GET+POST same route: GET form, POST save.
Data HTML se: form name= → request.form. Data HTML ko: render_template(..., items=query).
Nayi .py file: import karke use karo, warna Flask ko pata nahi. Folder rename: imports/paths/templates check.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
How do different routes communicate with each other?Times asked 1Official solution
Definition style question: 1 line simple Hinglish + project example + mini code.
Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'
Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'
Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.
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
Explain your database schema.Times asked 3Official solution
Simplemodels.py har table ki class hai — columns, PK/FK, relationships. Yeh Model layer hai.
Viva mein file khol ke bolo:
1) Kaunsi classes/tables hain (User, Role-specific, Booking...)
2) Har table ka kaam 1 line
3) Relationships: 1-1 / 1-M / M-M, backref, cascade, lazy
4) Constraints: unique email, nullable, default statusExample skeleton
class User(db.Model): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(120), unique=True, nullable=False) role = db.Column(db.String(20), default='user') bookings = db.relationship('Booking', backref='user', cascade='all, delete-orphan')ER diagram: rectangles entities, lines relationships, PK/FK mark. Schema = yahi structure.
Tables create: db.create_all() ya migrations. SQLite file SQL viewer se dikha sakte ho.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
Explain all tables and their relationships.Times asked 1Official solution
SimpleRelationships tables ko jodti hain taaki related data object se mil jaaye.
One-to-Many: User → kai Posts. posts = relationship('Post', backref='author'). FK post.user_id.
One-to-One: User → Profile. uselist=False + unique FK. Profile.user_id unique.
Many-to-Many: Student ↔ Drive. Junction/secondary table (student_id, drive_id).Example 1-1:
class Profile(db.Model): user_id = db.Column(db.Integer, db.ForeignKey('user.id'), unique=True) user = db.relationship('User', back_populates='profile', uselist=False)1-M ko 1-1: child FK pe unique=True + uselist=False.
Parent-child: parent PK, child FK. Junction table extra columns bhi rakh sakti hai (applied_on).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
How is data populated if it is not hardcoded?Times asked 1Official solution
Definition style question: 1 line simple Hinglish + project example + mini code.
Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'
Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'
Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.
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
Design a database schema for a leaderboard. Would you create a separate table? Why?Times asked 1Official solution
Simplemodels.py har table ki class hai — columns, PK/FK, relationships. Yeh Model layer hai.
Viva mein file khol ke bolo:
1) Kaunsi classes/tables hain (User, Role-specific, Booking...)
2) Har table ka kaam 1 line
3) Relationships: 1-1 / 1-M / M-M, backref, cascade, lazy
4) Constraints: unique email, nullable, default statusExample skeleton
class User(db.Model): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(120), unique=True, nullable=False) role = db.Column(db.String(20), default='user') bookings = db.relationship('Booking', backref='user', cascade='all, delete-orphan')ER diagram: rectangles entities, lines relationships, PK/FK mark. Schema = yahi structure.
Tables create: db.create_all() ya migrations. SQLite file SQL viewer se dikha sakte ho.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 frontend technology did you use?Times asked 1Official solution
Definition style question: 1 line simple Hinglish + project example + mini code.
Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'
Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'
Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.
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
What styling approach did you use?Times asked 1Official solution
Definition style question: 1 line simple Hinglish + project example + mini code.
Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'
Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'
Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.
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
Which CSS did you use?Times asked 1Official solution
SimpleCSS page ko style karti hai — color, layout, font. HTML structure, CSS look.
h1 { color: navy; } .card { padding: 16px; } #logo { width: 80px; }
Selectors: element (h3), class (.btn), id (#nav), pseudo (:hover).
display:flex — ek line/row mein items, justify-content/align-items se center.
Multiple classes: saari apply, conflict pe specificity/order.
Responsive: media queries / Bootstrap grid. Bina CSS limited (old tables) — practically CSS 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
-
16
What are CSS selectors?Times asked 1Official solution
SimpleCSS page ko style karti hai — color, layout, font. HTML structure, CSS look.
h1 { color: navy; } .card { padding: 16px; } #logo { width: 80px; }
Selectors: element (h3), class (.btn), id (#nav), pseudo (:hover).
display:flex — ek line/row mein items, justify-content/align-items se center.
Multiple classes: saari apply, conflict pe specificity/order.
Responsive: media queries / Bootstrap grid. Bina CSS limited (old tables) — practically CSS 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
-
17
Name the different types of CSS selectors.Times asked 1Official solution
SimpleCSS 3 tarikon se lagti hai, priority Inline > Internal > External (same specificity pe).
Inline: style='color:red' element pe. Highest priority, lekin reuse nahi. Debugging mushkil.
Internal: <style> tag HTML head mein. Us page tak limited.
External: style.css file. Large project ke liye best — ek jagah change, saari pages update.Example same button pe teeno:
/* external */ .btn { color: blue; }
/* internal */ .btn { color: green; }
<!-- inline --> <button class='btn' style='color:red'> → red jeetegaID (#box) class (.btn) se strong, class element (button) se strong.
!important sabko override karta hai — avoid karo.
Large project: external CSS preferred.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
What are the types of CSS?Times asked 1Official solution
SimpleCSS 3 tarikon se lagti hai, priority Inline > Internal > External (same specificity pe).
Inline: style='color:red' element pe. Highest priority, lekin reuse nahi. Debugging mushkil.
Internal: <style> tag HTML head mein. Us page tak limited.
External: style.css file. Large project ke liye best — ek jagah change, saari pages update.Example same button pe teeno:
/* external */ .btn { color: blue; }
/* internal */ .btn { color: green; }
<!-- inline --> <button class='btn' style='color:red'> → red jeetegaID (#box) class (.btn) se strong, class element (button) se strong.
!important sabko override karta hai — avoid karo.
Large project: external CSS preferred.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
Which type of CSS is better and why?Times asked 1Official solution
Yeh live UI/CSS change hai. Examiner jo element bole uski CSS turant badlo.
Bootstrap class badlo (btn-primary → btn-success, bg-dark → bg-warning) ya inline style='color:red; background:#eee'.
Center: d-flex justify-content-center text-center. Navbar neeche: navbar fixed-bottom.Example
<button class='btn btn-success' style='background:#16a34a'>Book</button>Pehle browser inspect karke class dhundo, phir template mein change karke refresh.
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
Is your application responsive?Times asked 2Official solution
Definition style question: 1 line simple Hinglish + project example + mini code.
Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'
Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'
Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.
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
Can you make it responsive without using CSS?Times asked 2Official solution
Yeh live UI/CSS change hai. Examiner jo element bole uski CSS turant badlo.
Bootstrap class badlo (btn-primary → btn-success, bg-dark → bg-warning) ya inline style='color:red; background:#eee'.
Center: d-flex justify-content-center text-center. Navbar neeche: navbar fixed-bottom.Example
<button class='btn btn-success' style='background:#16a34a'>Book</button>Pehle browser inspect karke class dhundo, phir template mein change karke refresh.
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
What is template inheritance?Times asked 3Official solution
Simpleextends poora layout inherit karta hai, include chhota piece insert karta hai.
extends: child page base.html ka structure use karti hai, blocks override karti hai. Ek hi parent.
include: navbar.html / footer.html jahan chaho insert. Kai baar use ho sakta hai.base.html:
{% block content %}{% endblock %} home.html: {% extends 'base.html' %} {% block content %}<h1>Home</h1>{% endblock %} {% include 'navbar.html' %} → navbar har page peFayda: header/footer ek jagah, change once — saari pages update. MAD1 mein almost har project use karta 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
-
23
What is a component?Times asked 1Official solution
Definition style question: 1 line simple Hinglish + project example + mini code.
Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'
Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'
Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.
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
Are you using Session-based or Token-based authentication?Times asked 1Official solution
SimpleFlask session request-across data store karta hai, generally signed cookie mein.
session['user_id'] = user.id
uid = session.get('user_id')
session.clear() # logoutType: dictionary-like (SecureCookieSession). SECRET_KEY se sign — tamper detect.
Store kahan: default client cookie. Server-side Redis/filesystem bhi laga sakte ho.
Browser storage: cookies, localStorage, sessionStorage. Session cookie tab-close pe jaa sakti hai.
Remember-me: permanent session ya alag token cookie.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
Why did you choose Session/Token?Times asked 1Official solution
SimpleFlask session request-across data store karta hai, generally signed cookie mein.
session['user_id'] = user.id
uid = session.get('user_id')
session.clear() # logoutType: dictionary-like (SecureCookieSession). SECRET_KEY se sign — tamper detect.
Store kahan: default client cookie. Server-side Redis/filesystem bhi laga sakte ho.
Browser storage: cookies, localStorage, sessionStorage. Session cookie tab-close pe jaa sakti hai.
Remember-me: permanent session ya alag token cookie.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
Which is better: Session or Token? Why?Times asked 1Official solution
SimpleFlask session request-across data store karta hai, generally signed cookie mein.
session['user_id'] = user.id
uid = session.get('user_id')
session.clear() # logoutType: dictionary-like (SecureCookieSession). SECRET_KEY se sign — tamper detect.
Store kahan: default client cookie. Server-side Redis/filesystem bhi laga sakte ho.
Browser storage: cookies, localStorage, sessionStorage. Session cookie tab-close pe jaa sakti hai.
Remember-me: permanent session ya alag token cookie.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
What is Session?Times asked 3Official solution
SimpleFlask session request-across data store karta hai, generally signed cookie mein.
session['user_id'] = user.id
uid = session.get('user_id')
session.clear() # logoutType: dictionary-like (SecureCookieSession). SECRET_KEY se sign — tamper detect.
Store kahan: default client cookie. Server-side Redis/filesystem bhi laga sakte ho.
Browser storage: cookies, localStorage, sessionStorage. Session cookie tab-close pe jaa sakti hai.
Remember-me: permanent session ya alag token cookie.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
How does Session work in the browser?Times asked 1Official solution
SimpleFlask session request-across data store karta hai, generally signed cookie mein.
session['user_id'] = user.id
uid = session.get('user_id')
session.clear() # logoutType: dictionary-like (SecureCookieSession). SECRET_KEY se sign — tamper detect.
Store kahan: default client cookie. Server-side Redis/filesystem bhi laga sakte ho.
Browser storage: cookies, localStorage, sessionStorage. Session cookie tab-close pe jaa sakti hai.
Remember-me: permanent session ya alag token cookie.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
What is the difference between Session and Cookies?Times asked 1Official solution
SimpleCookie browser mein save hoti hai, Session server pe data rakhta hai aur browser ko sirf ID deta hai.
Cookie: key-value browser pe. JS padh sakta hai (agar HttpOnly nahi). Size chhoti (~4KB).
Session: server-side dict. Flask default mein session data signed cookie mein hi store hota hai (client pe, lekin tamper-proof).Example
session['user_id'] = 12 # login ke baad
# browser ko Set-Cookie milti haiTab close: default Flask session cookie browser close pe delete (session cookie). Permanent session alag hota hai.
Incognito: cookies isolated, isliye logged-in nahi dikhega.
SECRET_KEY se session sign hota hai — key nahi to session insecure/kaam nahi karega.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
What is the difference between Authentication and Authorization?Times asked 4Official 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 delete kar sakta hai, normal user nahi.Example (Flask):
# Authenticationif user and check_password_hash(user.password, form_password): session['user_id'] = user.id # Authorization if session.get('role') != 'admin': abort(403) # logged in ho, lekin allowed nahiProject example: student login = authentication. Student admin dashboard nahi khol sakta = authorization.
Validation alag cheez hai (form sahi bhara hai ya nahi, jaise age 18+).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
What authentication method are you using? (JWT)Times asked 1Official 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.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
Explain how JWT works in your project.Times asked 1Official 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.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
Is Admin authenticated or authorized?Times asked 1Official 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 delete kar sakta hai, normal user nahi.Example (Flask):
# Authenticationif user and check_password_hash(user.password, form_password): session['user_id'] = user.id # Authorization if session.get('role') != 'admin': abort(403) # logged in ho, lekin allowed nahiProject example: student login = authentication. Student admin dashboard nahi khol sakta = authorization.
Validation alag cheez hai (form sahi bhara hai ya nahi, jaise age 18+).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
How did you implement the search functionality?Times asked 1Official solution
SimpleSearch box GET form, backend query filter, results template mein.
q = request.args.get('q', '').strip() results = Doctor.query.filter(Doctor.name.ilike(f'%{q}%')).all() if q else [] return render_template('search.html', results=results, q=q)Jinja: {{ results|length }} matches. Empty: 'No results'.
JS-only filter: saara data pehle load, client filter — chhote lists. Bada data: server search.
Search generally GET (shareable URL). Count: len(results) ya db.func.count.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
If you had to implement search suggestions, what approach would you follow?Times asked 1Official solution
Yeh live coding / notepad task hai. Chhota, correct Flask snippet likho.
from flask import Flask, render_template, request, redirect, url_for @app.route('/do', methods=['GET','POST']) def do(): if request.method == 'POST': # request.form.get('field') ya request.args.get('q') # db.session.add(...); commit return redirect(url_for('dashboard')) items = Model.query.all() return render_template('page.html', items=items)Jinja: {% for x in items %}<li>{{ x.name }}</li>{% endfor %}
ID URL: @app.route('/item/<int:id>')Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
36
Explain the implementation of your code.Times asked 1Official 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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
37
Explain the authentication flow in your code.Times asked 1Official 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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
38
Center-align the Login page (Username & Password fields).Times asked 1Official 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>Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
39
Convert the Login form into a centered card layout.Times asked 1Official 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>Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
40
Center-align the Search Bar.Times asked 1Official 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>Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
41
Make a UI modification on the Login page.Times asked 1Official 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'))Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
42
Ask the proctor for feedback at the end.Times asked 1Official 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'))Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet