-
1
Demonstrate the complete project. Run the application simultaneously in two browsers (e.g., Admin and User).Times asked 1Official solution
SimpleExaminer submitted ZIP chahta hai, local extra changes nahi.
Portal se ZIP download → extract → venv → pip install -r requirements.txt → flask run / python app.py.
Checksum maange to hash match karke dikhao. Camera/OPPE setup unke instructions.
Linux/Mac: paths, gunicorn; Windows paths alag ho to relative paths use karo.
Do browsers: admin + user parallel demo impressive lagta hai.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 the relationship types used in your models. What is ORM, and what is its biggest advantage?Times asked 1Official 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.
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
-
3
How would you support multiple roles for a user (e.g., Admin + Manager)?Times asked 1Official solution
SimpleRBAC = Role-Based Access Control — permission role se (admin/staff/user), har user pe alag nahi.
user.role = 'admin'
if current_user.role != 'admin': abort(403)Same login page, role ke hisaab dashboard. Multiple roles: roles table Many-to-Many, ya comma field (behtar normalized table).
Unapproved staff: is_approved flag, login pe check.
Flask-Security/UserMixin is_authenticated, is_active, get_id dete hain.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
If a parking lot has multiple floors, how would you design the database? New table vs adding a floor column.Times asked 1Official solution
Difference question hai — 3 cheezein bolo: meaning, kab use, 1 example.
Pehle concept A ek line, phir B ek line, phir table-jaisa farq (input/output/side-effect).
Example hamesha MAD1 se: GET search page, POST register, PUT/PATCH API update, session vs cookie login.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
What happens if you try to delete a parking lot that still has occupied spots?Times asked 1Official 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.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 how total cost is calculated.Times asked 1Official solution
SimpleCost generally rate × quantity/time, round up rules ke saath.
hours = max(1, math.ceil(total_minutes / 60)) # 10 min bhi 1 hour
cost = hours * lot.price_per_hour
Logic route/model method mein rakho, template mein sirf {{ booking.cost }}.
Viva: numbers ka example 90 min × ₹50 = ₹100 (ceil 2 hours) walkthrough karo.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 would you improve your project's folder structure?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
Identify shortcomings in your project and explain how you would improve or implement them (may require live coding).Times asked 1Official solution
Simple2-3 honest improvements + 1 security + 1 UX.
Example
password hashing/CSRF tighter, Redis cache, tests, pagination, email verify, rate limit login, better mobile CSS.Challenges: relationships/cascade, concurrent booking, Jinja inheritance.
Rate: 7-8/10 with reason — 10/10 arrogant, 3/10 confidence khatam.
Security extra: HTTPS, hashed passwords, CSRF, SQL injection (ORM), login attempts, file type 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
-
9
How do you round a number up using math.ceil() (e.g., parking time less than one hour rounds up to one hour)?Times asked 1Official solution
SimpleCost generally rate × quantity/time, round up rules ke saath.
hours = max(1, math.ceil(total_minutes / 60)) # 10 min bhi 1 hour
cost = hours * lot.price_per_hour
Logic route/model method mein rakho, template mein sirf {{ booking.cost }}.
Viva: numbers ka example 90 min × ₹50 = ₹100 (ceil 2 hours) walkthrough karo.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
Make a UI change by bolding a column in a table.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