Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level2_135

Share your experience Add your viva experience here
50 Questions
4 Sets
0 Topics
3 Reviews
Tips for this examiner: Chillest proctor ever, helped me throughout. I was getting a errors in the edge cases but he didn't seem much bothered with those, only wanted to make sure whether I'd done it on my own. No worries about this proctor, he'll be like your friend

Student reviews

MOHD ASJAD MAD1

He is very rude in the third question I said what is the meaning of idempotent he said this is not your doubt clearing class it is your viva. And also don't Just memorize the questions present in this spreadsheet. Just do not panic in front of him and just practice questions like they are given above he usually ask these types of questions only. Good luck for your viva😉

Questions remembered
  1. I think he is bit tired so he is not interested in the viva. he is also taking burb again and again
  2. First of all he asked me to open git hub
  3. then he asked to show me the collaborator
  4. then he asked me to download the zip file and run the code
  5. He has not taken any demo I think he is in some hurry.
  6. Then he asked me to login as a admin
  7. then he asked to add 2 treks
  8. then he asked to create a staff
  9. then asked to approve the staff as a admin
  10. then asked to assign the trek to staff
  11. then asked to login as a trekker then asked to book trek
  12. then asked to edit trek as admin
  13. then asked to change status of the trek as a staff
  14. then in all bookings tab as a trekker asked to add a column for assigned staff
  15. then asked about delete cascade(not able to answer😭)
  16. then asked about blueprint and did I implemented that in my code (which is not) so I simply said no.
  17. then he asked "is the post method idempotent but the put is not is this statement correct" ( not able to answer )
  18. And by this, viva is over which lasted 20 mins only.
Shwetabh MAD1

He was nonchalant.Well not help u and will be disappointed in u if u r not able to do it.

Questions remembered
  1. During the Level 2_135 meeting with the proctor, he first asked me my name. Then he asked me to show my GitHub, which I did. After that, he asked me to close all the existing tabs, and I did.
  2. Next, he asked me to download the code. I downloaded it and tried to run it, but it was taking a long time. I asked him if I could run the project directly using "app.py" instead, and he agreed. I then ran the application using "app.py".
  3. After the application started, he asked me to log in as the admin. Once logged in, he asked me to create a trek, which I did. Then he asked me to create a guide. After creating the guide, I went to the approval section on the admin page and approved the guide.
  4. Next, he asked me to create a user account. I created the user and then logged in as that user to book the trek. After booking the trek, I went back to the admin account.
  5. The proctor then asked me to blacklist the guide. Instead, I accidentally removed the guide. I told him that I couldn't blacklist the guide because I had already removed it, so I would need to create it again. I created the guide again, logged back into the admin account, and approved the guide once more.
  6. After that, he asked me to add a Staff column to the booking table so that the staff name would be displayed. I added the Staff column, but I was unable to fetch and display the staff name correctly. I tried to implement it but couldn't complete it successfully.
  7. He then asked me the following conceptual questions:
  8. - Difference between GET and POST.
  9. - Whether POST and PUT are idempotent or not.
  10. - What is backref?
  11. - What is a Blueprint in Flask?
  12. After the questions, he said, "Okay, thank you." I remained on the meeting screen for a moment and asked, "Should I leave?" He replied, "Okay, you can leave." Then I left the meeting.
No Name MAD1

Chillest proctor ever, helped me throughout. I was getting a errors in the edge cases but he didn't seem much bothered with those, only wanted to make sure whether I'd done it on my own. No worries about this proctor, he'll be like your friend

Questions remembered
  1. First, we greeted each other and asked about my day
  2. • He asked me to show the GitHub collaborator page
  3. • After that, he told me to download the submission from the website and asked me to share the checksum(it took much time, as I was not getting the correct checksum he helped me all through)
  4. • He asked me to run the app and explain it's features and also checked the edge cases
  5. • He told me to open my code and explain the models.py in brief
  6. • Then asked me a few theory questions like
  7. 1)what's ORM and what ORM have you used
  8. 2)Frameworks I've used
  9. 3)what's RBAC and it's implementation in your code
  10. 4) HTTP methods and difference between POST and PUT, give an example for POST in your code
  11. Finally, he said your evaluation is over and asked me if had any questions and then wished me All The Best for your Level 2 Viva and it was over

Approved viva sets

  1. 1
    I think he is bit tired so he is not interested in the viva. he is also taking burb again and again
    Times asked 1
    Official solution

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

  2. 2
    First of all he asked me to open git hub
    Times asked 1
    Official solution

    SimpleGitHub repo open karo: commits, collaborators, README. Examiner check karta hai tumne khud kaam kiya.

    Example

    Settings → Collaborators
    Commits: regular messages, last-day dump nahi.

    Viva tipPrivate repo access pehle de do. Main branch submitted ZIP se match honi chahiye.

  3. 3
    He has not taken any demo I think he is in some hurry.
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  4. 4
    then he asked to add 2 treks
    Times asked 1
    Official solution

    SimpleProject overview: problem → roles → main entities → key flows (register, book, admin approve).

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  5. 5
    then he asked to create a staff
    Times asked 1
    Official solution

    SimpleDemo script pehle se practice: 5–7 min, Admin + User roles, saare mandatory features.

    Suggested flow1) Register/login user
    2) Admin login — CRUD
    3) Approval/blacklist
    4) Booking/apply + edge case
    5) Search
    6) Logout

    Viva tipBolte-bolte dikhao. Code tab kholna jab poochhein.

  6. 6
    then asked to approve the staff as a admin
    Times asked 1
    Official solution

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

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

    Example

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

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

  7. 7
    then asked to assign the trek to staff
    Times asked 1
    Official solution

    SimpleProject overview: problem → roles → main entities → key flows (register, book, admin approve).

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  8. 8
    then asked to login as a trekker then asked to book trek
    Times asked 1
    Official solution

    SimpleProject overview: problem → roles → main entities → key flows (register, book, admin approve).

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  9. 9
    then asked to change status of the trek as a staff
    Times asked 1
    Official solution

    SimpleProject overview: problem → roles → main entities → key flows (register, book, admin approve).

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  10. 10
    then in all bookings tab as a trekker asked to add a column for assigned staff
    Times asked 1
    Official solution

    SimpleProject overview: problem → roles → main entities → key flows (register, book, admin approve).

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  11. 11
    then asked about delete cascade(not able to answer😭)
    Times asked 1
    Official solution

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

    Example

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

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

  12. 12
    then asked about blueprint and did I implemented that in my code (which is not) so I simply said no.
    Times asked 1
    Official solution

    SimpleBlueprint se app ko modules mein todte ho — auth, admin, user alag files. Scale + clean structure.

    Example

    auth_bp = Blueprint('auth', __name__, url_prefix='/auth')
    
    @auth_bp.route('/login')
    def login(): ...
    
    app.register_blueprint(auth_bp)

    Viva tipViva: 'kyun blueprint?' → separation of concerns, badi app maintainable.

  13. 13
    then he asked "is the post method idempotent but the put is not is this statement correct" ( not able to answer )
    Times asked 1
    Official solution

    SimpleIdempotent = same request N baar = same effect. GET/PUT/DELETE usually; POST create duplicate ho sakta hai.

  14. 14
    And by this, viva is over which lasted 20 mins only.
    Times asked 1
    Official solution

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

Advice: He is very rude in the third question I said what is the meaning of idempotent he said this is not your doubt clearing class it is your viva. And also don't Just memorize the questions present in this spreadsheet. Just do not panic in front of him and just practice questions like they are given above he usually ask these types of questions only. Good luck for your viva😉
  1. 1
    During the Level 2_135 meeting with the proctor, he first asked me my name. Then he asked me to show my GitHub, which I did. After that, he asked me to close all the existing tabs, and I did.
    Times asked 1
    Official solution

    SimpleLevel = viva difficulty band. Level 1 usually demo + basics; higher pe live coding + deeper theory.

    Viva tipJo level assign hai uske hisaab se demo + theory ready rakho.

  2. 2
    Next, he asked me to download the code. I downloaded it and tried to run it, but it was taking a long time. I asked him if I could run the project directly using "app.py" instead, and he agreed. I then ran the application using "app.py".
    Times asked 1
    Official solution

    SimpleExaminer portal wala submitted ZIP chahta hai. Local extra changes mat dikhana.

    Suggested flow1) Portal ZIP download
    2) Extract
    3) venv + pip install -r requirements.txt
    4) flask run / python app.py

  3. 3
    After the application started, he asked me to log in as the admin. Once logged in, he asked me to create a trek, which I did. Then he asked me to create a guide. After creating the guide, I went to the approval section on the admin page and approved the guide.
    Times asked 1
    Official solution

    SimpleCamera pe clearly college/IITM ID dikhao — naam aur photo match hone chahiye.

    Viva tipPehle se ID haath mein rakho, glare mat aane do. Iske baad GitHub + project run.

  4. 4
    Next, he asked me to create a user account. I created the user and then logged in as that user to book the trek. After booking the trek, I went back to the admin account.
    Times asked 1
    Official solution

    SimpleProject overview: problem → roles → main entities → key flows (register, book, admin approve).

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  5. 5
    The proctor then asked me to blacklist the guide. Instead, I accidentally removed the guide. I told him that I couldn't blacklist the guide because I had already removed it, so I would need to create it again. I created the guide again, logged back into the admin account, and approved the guide once more.
    Times asked 1
    Official solution

    SimpleBlacklist/block: user.status='blocked' check login/booking pe. Temporary flag vs hard delete permanent.

  6. 6
    After that, he asked me to add a Staff column to the booking table so that the staff name would be displayed. I added the Staff column, but I was unable to fetch and display the staff name correctly. I tried to implement it but couldn't complete it successfully.
    Times asked 1
    Official solution

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

  7. 7
    He then asked me the following conceptual questions:
    Times asked 1
    Official solution

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

  8. 8
    - Whether POST and PUT are idempotent or not.
    Times asked 1
    Official solution

    SimpleIdempotent = same request N baar = same effect. GET/PUT/DELETE usually; POST create duplicate ho sakta hai.

  9. 9
    - What is backref?
    Times asked 1
    Official solution

    Simplebackref reverse attribute auto banata hai. back_populates dono sides explicitly naam dete ho — clearer.

    Example

    # backref
    spots = db.relationship('Spot', backref='lot')
    # spot.lot available
    
    # back_populates
    spots = db.relationship('Spot', back_populates='lot')
    # Spot.lot = db.relationship('Lot', back_populates='spots')
  10. 10
    - What is a Blueprint in Flask?
    Times asked 1
    Official solution

    SimpleBlueprint se app ko modules mein todte ho — auth, admin, user alag files. Scale + clean structure.

    Example

    auth_bp = Blueprint('auth', __name__, url_prefix='/auth')
    
    @auth_bp.route('/login')
    def login(): ...
    
    app.register_blueprint(auth_bp)

    Viva tipViva: 'kyun blueprint?' → separation of concerns, badi app maintainable.

  11. 11
    After the questions, he said, "Okay, thank you." I remained on the meeting screen for a moment and asked, "Should I leave?" He replied, "Okay, you can leave." Then I left the meeting.
    Times asked 1
    Official solution

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

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

    Example

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

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

Advice: He was nonchalant.Well not help u and will be disappointed in u if u r not able to do it.
  1. 1
    First, we greeted each other and asked about my day
    Times asked 1
    Official solution

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

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

    Example

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

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

  2. 2
    • He asked me to show the GitHub collaborator page
    Times asked 1
    Official solution

    SimpleGitHub repo open karo: commits, collaborators, README. Examiner check karta hai tumne khud kaam kiya.

    Example

    Settings → Collaborators
    Commits: regular messages, last-day dump nahi.

    Viva tipPrivate repo access pehle de do. Main branch submitted ZIP se match honi chahiye.

  3. 3
    • After that, he told me to download the submission from the website and asked me to share the checksum(it took much time, as I was not getting the correct checksum he helped me all through)
    Times asked 1
    Official solution

    SimpleExaminer wohi ZIP chahta hai jo tumne submit kiya, local extra magic nahi.

    Portal download → extract → redis, venv, pip, npm, flask, worker, beat.

    Checksum maange to hash. Uncommitted files mat dikhana.

    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) ZIP
    2) Extract
    3) Redis + venv + pip
    4) npm/vite
    5) flask + celery worker + beat

    Project example: Submitted zip run. README commands copy.

    Viva tipChecksum maange to hash match karke dikhao. Extra uncommitted files mat dikhana.

  4. 4
    • He asked me to run the app and explain it's features and also checked the edge cases
    Times asked 1
    Official solution

    Simplevenv activate → dependencies → DB create/migrate → flask run. Browser pe localhost dikhao.

    Example

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    flask run
  5. 5
    • Then asked me a few theory questions like
    Times asked 1
    Official solution

    SimpleTheory = concepts: ORM, MVC, auth vs authz, Jinja inheritance, sessions. 1-line def + project example.

  6. 6
    1)what's ORM and what ORM have you used
    Times asked 1
    Official solution

    SimpleORM = Object Relational Mapping. Tables → Python classes. Raw SQL kam likhte ho.

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  7. 7
    2)Frameworks I've used
    Times asked 1
    Official solution

    SimpleStack bolo: Python, Flask, Jinja2, SQLAlchemy, SQLite, HTML/CSS/Bootstrap, maybe Chart.js.

  8. 8
    3)what's RBAC and it's implementation in your code
    Times asked 1
    Official solution

    SimpleRBAC = Role Based Access Control. Roles (admin/user) se permissions milti hain, har user pe alag list nahi.

    Example

    if current_user.role != 'admin':
        flash('Not allowed')
        return redirect(url_for('user.home'))
  9. 9
    Finally, he said your evaluation is over and asked me if had any questions and then wished me All The Best for your Level 2 Viva and it was over
    Times asked 1
    Official solution

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

Advice: Chillest proctor ever, helped me throughout. I was getting a errors in the edge cases but he didn't seem much bothered with those, only wanted to make sure whether I'd done it on my own. No worries about this proctor, he'll be like your friend
  1. 1
    Show the GitHub repository and collaborator.
    Times asked 1
    Official solution

    SimpleGitHub repo public/private policy ke hisaab, MAD-1 collaborator add, commits dikhao.

    Repo → Settings → Collaborators → instructor added.
    Commits: git log / GitHub History — regular commits better, ek dum 1 commit suspicious.
    README + report mein AI usage likha hona chahiye agar use kiya.

  2. 2
    Download the project from the portal, verify the checksum, and run it.
    Times asked 1
    Official solution

    SimpleChecksum file ka hash (jaise SHA256) — file change hui ya nahi verify.

    Portal pe submitted ZIP ka checksum diya hota hai. Local file ka hash nikaalo, match hona chahiye.
    Linux: sha256sum project.zip
    Mismatch = galat file / corrupt download. Examiner integrity check karta hai ki tumhari submitted copy hi run ho rahi hai.

  3. 3
    Demonstrate the application and explain its features.Test edge cases.
    Times asked 1
    Official 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.

  4. 4
    Perform core workflows such as: Login as Admin. Add/Edit Treks. Create and approve Staff. Assign Treks to Staff. Login as Trekker and book a Trek. Change Trek status as Staff.
    Times asked 1
    Official solution

    Yeh project-specific feature add/modify hai. 4 layers touch karo: model, route, template, validation.

    1) Data chahiye to models.py mein column/relationship + DB update (ALTER / migrate / create_all).
    2) Route: GET pe form/page, POST pe request.form se save, flash + redirect.
    3) Template: input name=... Jinja se {{ obj.field }} display.
    4) Rule: duplicate, range, role check backend pe.

    Example naya field 'city':

    user.city = db.Column(db.String(50))
    user.city = request.form.get('city')
    <input name='city'>  ...  {{ user.city }}
  5. 5
    Explain models.py.
    Times asked 21
    Official 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 status

    Example 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.

  6. 6
    Explain the frameworks used in your project.
    Times asked 1
    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.

  7. 7
    What are Flask Blueprints?
    Times asked 2
    Official solution

    SimpleBlueprint Flask app ko modules mein baant ta hai — auth, admin, user alag files.

    admin_bp = Blueprint('admin', __name__, url_prefix='/admin')
    @admin_bp.route('/dashboard')

    def dash(): ...
    app.register_blueprint(admin_bp)

    Bina blueprint: sab routes ek app.py — chhote MAD1 ke liye theek. Alternative: multiple modules import karke app pe route attach, ya create_app factory.
    Bada project: Blueprints = clean controllers.

  8. 8
    Have you implemented Blueprints in your project?
    Times asked 1
    Official solution

    SimpleBlueprint Flask app ko modules mein baant ta hai — auth, admin, user alag files.

    admin_bp = Blueprint('admin', __name__, url_prefix='/admin')
    @admin_bp.route('/dashboard')

    def dash(): ...
    app.register_blueprint(admin_bp)

    Bina blueprint: sab routes ek app.py — chhote MAD1 ke liye theek. Alternative: multiple modules import karke app pe route attach, ya create_app factory.
    Bada project: Blueprints = clean controllers.

  9. 9
    What is ORM? Which ORM have you used?
    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.

  10. 10
    Explain Delete Cascade.
    Times asked 1
    Official solution

    SimpleCascade parent ke saath child pe automatic action (generally delete).

    Company delete → uski drives bhi delete, warna orphan rows / FK error.
    SQLAlchemy: db.relationship('Drive', cascade='all, delete-orphan', backref='company')
    SQL: ForeignKey(..., ondelete='CASCADE')

    Cascade sirf delete nahi: save-update, merge, refresh-expire, expunge, delete-orphan.
    Cascade Update: parent PK change to child FK update (rare, PK mat badlo).
    Parent delete jab children active hon: constraint error, ya cascade se children gayab, ya pehle children handle karo — design choice examiner poochta hai.
    CSS cascading alag topic hai (styles inherit/override).

  11. 11
    What is RBAC (Role-Based Access Control)?
    Times asked 3
    Official 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.

  12. 12
    How have you implemented RBAC in your project?
    Times asked 1
    Official 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.

  13. 13
    Explain HTTP Methods. Difference between POST and PUT.
    Times asked 1
    Official solution

    SimplePOST nayi cheez create karta hai, PUT existing cheez ko replace/update karta hai.

    POST /books → naya book add. Har baar naya ID banega. Idempotent nahi — 2 baar POST = 2 records.
    PUT /books/5 → id=5 wale book ko poora update. Same PUT dubara bhejo to same result (idempotent).

    PUT se create bhi ho sakta hai (agar ID client decide kare), lekin REST convention: create = POST, replace = PUT, partial = PATCH.

    Example

    @app.route('/user', methods=['POST'])          # register naya user
    @app.route('/user/<int:id>', methods=['PUT'])  # poora profile replace

    HTML <form> PUT nahi bhejta, isliye Flask apps mein edit pe bhi POST use hota hai. Examiner ko yeh reason clearly bolo.

  14. 14
    Give an example of POST from your project.
    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'))
  15. 15
    Is POST idempotent? Is PUT idempotent? Explain.
    Times asked 1
    Official solution

    SimplePOST nayi cheez create karta hai, PUT existing cheez ko replace/update karta hai.

    POST /books → naya book add. Har baar naya ID banega. Idempotent nahi — 2 baar POST = 2 records.
    PUT /books/5 → id=5 wale book ko poora update. Same PUT dubara bhejo to same result (idempotent).

    PUT se create bhi ho sakta hai (agar ID client decide kare), lekin REST convention: create = POST, replace = PUT, partial = PATCH.

    Example

    @app.route('/user', methods=['POST'])          # register naya user
    @app.route('/user/<int:id>', methods=['PUT'])  # poora profile replace

    HTML <form> PUT nahi bhejta, isliye Flask apps mein edit pe bhi POST use hota hai. Examiner ko yeh reason clearly bolo.

  16. 16
    Add a new column to display the Assigned Staff in the Trekker's All Bookings page.
    Times asked 1
    Official solution

    Simple 4-step: Model → DB → Form → Route → Template. Yeh sabse common live-coding hai.

    1) models.py: age = db.Column(db.Integer, nullable=True)
    2) DB: SQLite viewer se column, ya DB delete karke create_all, ya ALTER TABLE user ADD COLUMN age INTEGER; production mein Flask-Migrate.
    3) register.html: <input type='number' name='age' min='18' required>
    4) route: user.age = request.form.get('age', type=int); commit
    5) dashboard: {{ user.age }} admin table mein <td>{{ u.age }}</td>

    Print terminal: print('AGE', request.form.get('age'))
    Phone/city same pattern, String(20). Openings on Drive: integer column + form + create_drive route.

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