Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level2_79

Share your experience Add your viva experience here
153 Questions
15 Sets
0 Topics
11 Reviews
Tips for this examiner: Chill examiner. Do the Coding well.

Student reviews

sabka masiha MAD1

just follow the sheets

Questions remembered
  1. told me to edit the trek slots to -1 , so i edited and then he asks how can a slot be negative.(so i said sorry for that 😭) 2)in notepad create a route which takes user id and gives total no. bookings he had. 3)tell me about REST principles
  2. what do you know about MVC
  3. difference between CORS and CXS(i forgot)
Expired_Milk MAD1

Good,chill,helpful(made a tiny mistake but he let me correct it by being vague) overall be clear,explain your code properly and good luck.

Questions remembered
  1. show your id_card 2)show your github and show the collaborator(didn't check commits)
  2. download and run the application
  3. demonstrate the application
  4. write a route that takes input in number,if number is even then it makes the background of some other page RED and if its odd then makes the background BLUE
  5. what is ORM,what ORM did you use?
  6. did you use jinja? show me where you used jinja in your code
  7. he asked me to show again the fn where if user,staff are blacklisted they cannot login. if a trek has 0 slots it wont show them in the available trek area. he said"Ok, now i am signing off,good luck for your level 2" i said "thank you sir" he left.
Dikshita Bhandari MAD1

He is very calm and polite

Questions remembered
  1. Write a flask route which renders a html page colour green if the input is even and red if input is odd
  2. What is Cross Site Scripting
  3. What is MVC Architecture
  4. What is HTTP methods
  5. What is CORS
  6. Ask for prevent overbookings
  7. Ask if user or staff blacklisted by admin then they cannot log in to dashboards
  8. Ask for search bar in user dashboard
Sheet response MAD1

I was bit nervous in the meet, but the proctor seemed calm and patient. My advice will be to stay calm, and practice the question that this proctor has asked earlier.

Questions remembered
  1. Asked to show me ID Card
  2. Asked to show the github repo and the collaborator
  3. Asked to download the project from portal and start running it.
  4. Asked to show demonstrate the project.
  5. While I was demonstrating the admin functionality, he asked to show that blacklist a staff and try log in as that staff.
  6. He asked to show that if a trek has available slot 0, then the booking fails.
  7. Asked to write a flask route on notepad, that takes a number on one page and displays it on another page.
  8. Asked me what I know about MVC architecture.
  9. Asked me about REST principle. (Answered only 4 principles, forgot about 2).
  10. Asked me about cross side scripting. (I did not knew, so I said that I am not sure but it may refer to frontend validation and backend validation. He asked if I am sure and I replied that I am not sure).
  11. He asked if I was sure about REST principle, and I said yes.
Sheet response MAD1

Like he was nice, silently observing everything, you'll have to ask him and not wait for him if you are stuck somewhere, really clear with what he wants to see, just know your code and logic should be clear, like in the coding question, I was confused how to change the color?? that was my viva pressure and now it feels like it was easy question, and I messed up!! Try not to be scared and get tunnel visioned, relax simple things will be asked, just answer and if you cannot it's ok!! DO NOT BE SCARED like me, viva is not like an exam it's just there for them to see how much you UNDERSTAND YOUR CODE!! just do that and you'll easily PASS

Questions remembered
  1. I started with the demo of the app
  2. then the next question was "take a input as a number, if it's even show a green screen, if it's odd show red screen and I messed it up!! it had to be done on a notepad, he told me there's flaw in my logic he is not looking at my syntax at all just looking for logic
  3. then asked me about MVC
  4. about Restful which I haven't used and I am not familiar with
  5. then about what I have used to create database like SQLAlchemy and sqlite
  6. what does cascade do can you show me what other things can be done other than delete
  7. then login as user update the profile details
  8. login as admin ban the user and try to login as user again
  9. I guess this is it
Sheet response MAD1

he's so silent. i could not even hear what he was saying. calm and composed man. you can take your time and answer questions, don't take too much pressure.

Questions remembered
  1. Viva L1 - level2_79
  2. demo
  3. told to show blacklisting, searching, updating profile
  4. write a flask route to take input from one page and display in another page
  5. what is MVC
  6. what are the different types of flask templating
  7. what ORM have you used
  8. tell me all you know about REST APIs
  9. what is client side scripting
Sheet response MAD1

Chill, gives time for the coding part. Be responsive while demonstration or coding.

Questions remembered
  1. level2_79 (Level 1 viva actually)
  2. Project demo
  3. Github collaborators
  4. Show staff cannot login without admin approval
  5. Show the user can't login if blocked
  6. Show profile update page, show if it updates the profile
  7. Did you skip any of the requirements in PS.
  8. Open notepad, code an app which takes input from a webpage and displays it in another page.
  9. Show jinja templates in your code
  10. What is ORM?
  11. What re Restful principles?
  12. What is MVC architecture?
Sheet response MAD1

He's very good and kind. Keep trying even if u don't yet know the answer, he'll help a bit.

Do the questions from sheet and website.

Questions remembered
  1. L2_79
  2. Hey he's very good
  3. ( Althought, I messed up)
  4. He'll try to help
  5. He'll give time and everything.
  6. I was given
  7. From one html form take input and write a route which renders input to another html
  8. MVC
  9. Restful principles
  10. Orm purpose
  11. Just do properly the questions in the sheet and website
Sheet response MAD1

just check your webcam 10 mins before viva again. many time we disable or add new software which may impact settings...in my case 5 days ago I had disabled webcam and forgot to turn it on plus had installed one software for screen recording and that came up with virtual camera so wasted 3-4 mins in changing this setup in start of call.

Questions remembered
  1. what is Get - Post & can role of Get and Post be interchanged? what is my opinion
  2. write in notepad code to display my name using route and jinja
  3. explain MVC using my code
  4. had full demo of application
  5. how blacklist concept works and demo in my app
  6. how ovm works
  7. how search works in my app
  8. saw almost full application working and asked basic questions
  9. they need id softcopy on screen photo just be ready with iitm site opened to save time.
  10. also asked me to download code from portal and then show full demo so be ready with sites and pages open. very soft-spoken interviewer and kept cool during my first 3-4 mins setup issue of camera. Overall, its was basic and not stressful at all
Jayshree MAD1

over all he is very chill throught out the viva 😇

Questions remembered
  1. Show id card
  2. Download the project from the portal and run checksumdir asked to show github , repo if i added mad1cs in collaborator or not
  3. Demonstrate project overall features
  4. Then he asked to add a column in admin search result
  5. Asked to open notepad and write a route which will display my name (static)
  6. Asked to register a new staff and login (show that he can't login without approval from admin)
  7. Asked if I left any features in project which already mentioned in PS
  8. Lastly he told " all the best for level 2🥹"
Sheet response MAD1

Chill examiner. Do the Coding well.

Questions remembered
  1. Project demo
  2. In the company dashboard can you change drive name after posting it
  3. Can student change the resume that they have submitted after applying for a job
  4. Coding question - take input from a form and display it in another page
  5. Restful api principles
  6. Vertical horizontal scaling
  7. Mvc architecture
  8. Tier 2 vs tier 3 (I explained all 3)
  9. Then he asked me to open my code
  10. Models page
  11. He asked me what is cascade
  12. Can it be used only for deleting
  13. Why can't it be used for anything else
  14. Have you normalized the data
  15. How much have you normalized
  16. Why not other normal forms

Approved viva sets

  1. 1
    - Show id card
    Times asked 2
  2. 2
    - Download and run project
    Times asked 2
  3. 3
    - then checks collaborator on github
    Times asked 2
  4. 4
    - In between demonstrations he says create a button to display message api endpoint
    Times asked 2
  5. 5
    - then he says change the message
    Times asked 2
  6. 6
    - then ask lifecycle hook
    Times asked 2
  7. 7
    - says show the caching
    Times asked 2
  8. 8
    - what is an asynchronous function
    Times asked 2
  9. 9
    - v-bind , v-if , v-show
    Times asked 2
  10. 10
    - end to end demonstration of authentication
    Times asked 2
  11. 11
    - demonstration of all celery tasks
    Times asked 2
Advice: Don’t worry too much. Even if you can’t answer one question, he will probably ask another, so you still have a chance to pass the criteria
  1. 1
    told me to edit the trek slots to -1 , so i edited and then he asks how can a slot be negative.(so i said sorry for that 😭) 2)in notepad create a route which takes user id and gives total no. bookings he had. 3)tell me about REST principles
    Times asked 1
    Official solution

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

  2. 2
    what do you know about MVC
    Times asked 1
    Official solution

    SimpleMVC: Model=data (SQLAlchemy), View=Jinja HTML, Controller=Flask routes/business logic.

    Flask loosely MVC follow karta hai — routes controllers, templates views, models.py models.

  3. 3
    difference between CORS and CXS(i forgot)
    Times asked 1
    Official solution

    SimpleUngli rakhe to 4-line formula — panic ki jagah structure.

    1) File ka role: model / Flask route / Vue SFC / celery task / config
    2) Input kahan: JSON, params, token, props, $route
    3) Kya kaam: query, cache, validation, .delay()
    4) Output: jsonify, this.items, email, redirect

    Unknown keyword: import, decorator, if, commit — har ka reason. Bluff mat.

    Suggested flow1) Kaunsi layer?
    2) Input?
    3) DB/cache/task?
    4) Response/UI?

    Project example: Booking POST: jwt, seats check, commit, 201, Vue list push.

    Viva tipUnknown keyword: import, decorator, if, commit — har ka reason. Panic mat.

Advice: just follow the sheets
  1. 1
    download and run the application
    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
  2. 2
    write a route that takes input in number,if number is even then it makes the background of some other page RED and if its odd then makes the background BLUE
    Times asked 1
    Official solution

    SimpleLive Flask coding: chhota route likho, save, browser/curl se test. Syntax error terminal mein padho.

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  3. 3
    did you use jinja? show me where you used jinja in your code
    Times asked 1
    Official solution

    SimpleJinja2 Flask ka template engine — HTML ke andar {{ }} variables, {% %} logic.

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
  4. 4
    he asked me to show again the fn where if user,staff are blacklisted they cannot login. if a trek has 0 slots it wont show them in the available trek area. he said"Ok, now i am signing off,good luck for your level 2" i said "thank you sir" he left.
    Times asked 1
    Official solution

    SimpleEnd of viva note — kuch extra nahi. Agar time bache to ek unique feature highlight karo.

Advice: Good,chill,helpful(made a tiny mistake but he let me correct it by being vague) overall be clear,explain your code properly and good luck.
  1. 1
    Write a flask route which renders a html page colour green if the input is even and red if input is odd
    Times asked 1
    Official solution

    SimpleLive Flask coding: chhota route likho, save, browser/curl se test. Syntax error terminal mein padho.

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  2. 2
    Ask for prevent overbookings
    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.

  3. 3
    Ask if user or staff blacklisted by admin then they cannot log in to dashboards
    Times asked 1
    Official solution

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

  4. 4
    Ask for search bar in user dashboard
    Times asked 1
    Official solution

    SimpleSearch: form/query param → ilike filter → results template.

    Example

    q = request.args.get('q', '').strip()
    lots = Lot.query.filter(Lot.name.ilike(f'%{q}%')).all()
Advice: He is very calm and polite
  1. 1
    Asked to show the github repo and the collaborator
    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.

  2. 2
    Asked to show demonstrate the project.
    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.

  3. 3
    While I was demonstrating the admin functionality, he asked to show that blacklist a staff and try log in as that staff.
    Times asked 1
    Official solution

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

  4. 4
    He asked to show that if a trek has available slot 0, then the booking fails.
    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
    Asked to write a flask route on notepad, that takes a number on one page and displays it on another page.
    Times asked 1
    Official solution

    SimpleLive Flask coding: chhota route likho, save, browser/curl se test. Syntax error terminal mein padho.

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  6. 6
    Asked me about REST principle. (Answered only 4 principles, forgot about 2).
    Times asked 1
    Official solution

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

  7. 7
    Asked me about cross side scripting. (I did not knew, so I said that I am not sure but it may refer to frontend validation and backend validation. He asked if I am sure and I replied that I am not sure).
    Times asked 1
    Official solution

    SimpleValidation = input rules: required, email format, length, unique. Frontend UX, backend security — dono.

    Example

    if not email or '@' not in email:
        flash('Invalid email')
        return redirect(request.url)
    if User.query.filter_by(email=email).first():
        flash('Email taken')
  8. 8
    He asked if I was sure about REST principle, and I said yes.
    Times asked 1
    Official solution

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

Advice: I was bit nervous in the meet, but the proctor seemed calm and patient. My advice will be to stay calm, and practice the question that this proctor has asked earlier.
  1. 1
    I started with the demo of the app
    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.

  2. 2
    then the next question was "take a input as a number, if it's even show a green screen, if it's odd show red screen and I messed it up!! it had to be done on a notepad, he told me there's flaw in my logic he is not looking at my syntax at all just looking for logic
    Times asked 1
    Official solution

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

  3. 3
    then asked me about MVC
    Times asked 1
    Official solution

    SimpleMVC: Model=data (SQLAlchemy), View=Jinja HTML, Controller=Flask routes/business logic.

    Flask loosely MVC follow karta hai — routes controllers, templates views, models.py models.

  4. 4
    about Restful which I haven't used and I am not familiar with
    Times asked 1
    Official solution

    SimpleREST: resources + HTTP verbs. GET read, POST create, PUT/PATCH update, DELETE remove. Stateless ideal.

  5. 5
    then about what I have used to create database like SQLAlchemy and sqlite
    Times asked 1
    Official solution

    SimpleSQLAlchemy MAD1 ka common ORM. Flask-SQLAlchemy wrapper se db.Model, db.session.

    Example

    user = User(email='a@b.com')
    db.session.add(user)
    db.session.commit()
    users = User.query.filter_by(role='admin').all()
  6. 6
    what does cascade do can you show me what other things can be done other than delete
    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.

  7. 7
    then login as user update the profile details
    Times asked 1
    Official solution

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

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

  8. 8
    login as admin ban the user and try to login as user again
    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.

  9. 9
    I guess this is it
    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: Like he was nice, silently observing everything, you'll have to ask him and not wait for him if you are stuck somewhere, really clear with what he wants to see, just know your code and logic should be clear, like in the coding question, I was confused how to change the color?? that was my viva pressure and now it feels like it was easy question, and I messed up!! Try not to be scared and get tunnel visioned, relax simple things will be asked, just answer and if you cannot it's ok!! DO NOT BE SCARED like me, viva is not like an exam it's just there for them to see how much you UNDERSTAND YOUR CODE!! just do that and you'll easily PASS
  1. 1
    told to show blacklisting, searching, updating profile
    Times asked 1
    Official solution

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

  2. 2
    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
  3. 3
    tell me all you know about REST APIs
    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.

  4. 4
    what is client side scripting
    Times asked 1
    Official solution

    SimpleClient storage: cookies, localStorage, sessionStorage, IndexedDB. Tokens often localStorage; sessions often cookie.

Advice: he's so silent. i could not even hear what he was saying. calm and composed man. you can take your time and answer questions, don't take too much pressure.
  1. 1
    level2_79 (Level 1 viva actually)
    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
    Github collaborators
    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
    Show the user can't login if blocked
    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
    Show profile update page, show if it updates the profile
    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.

  5. 5
    Did you skip any of the requirements in PS.
    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.

  6. 6
    Open notepad, code an app which takes input from a webpage and displays it in another page.
    Times asked 1
    Official solution

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

  7. 7
    Show jinja templates in your code
    Times asked 1
    Official solution

    SimpleJinja2 Flask ka template engine — HTML ke andar {{ }} variables, {% %} logic.

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
  8. 8
    What is MVC architecture?
    Times asked 1
    Official solution

    SimpleMAD1 typical: Browser → Flask routes → validate/auth → SQLAlchemy → SQLite → Jinja response.

    Suggested flowRequest → Route → Auth check → DB → render_template / redirect

Advice: Chill, gives time for the coding part. Be responsive while demonstration or coding.
  1. 1
    L2_79
    Times asked 1
    Official solution

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

  2. 2
    Hey he's very good
    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.

  3. 3
    ( Althought, I messed up)
    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.

  4. 4
    He'll try to help
    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.

  5. 5
    He'll give time and everything.
    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.

  6. 6
    I was given
    Times asked 1
    Official solution

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

  7. 7
    From one html form take input and write a route which renders input to another html
    Times asked 1
    Official solution

    SimpleLive Flask coding: chhota route likho, save, browser/curl se test. Syntax error terminal mein padho.

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  8. 8
    Orm purpose
    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
  9. 9
    Just do properly the questions in the sheet and website
    Times asked 1
    Official solution

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

Advice: He's very good and kind. Keep trying even if u don't yet know the answer, he'll help a bit. Do the questions from sheet and website.
  1. 1
    what is Get - Post & can role of Get and Post be interchanged? what is my opinion
    Times asked 1
    Official solution

    SimpleGET data read/show karta hai (idempotent). POST create/submit karta hai (form).

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  2. 2
    write in notepad code to display my name using route and jinja
    Times asked 1
    Official solution

    SimpleLive Flask coding: chhota route likho, save, browser/curl se test. Syntax error terminal mein padho.

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  3. 3
    explain MVC using my code
    Times asked 1
    Official solution

    SimpleMVC: Model=data (SQLAlchemy), View=Jinja HTML, Controller=Flask routes/business logic.

    Flask loosely MVC follow karta hai — routes controllers, templates views, models.py models.

  4. 4
    had full demo of application
    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.

  5. 5
    how blacklist concept works and demo in my app
    Times asked 1
    Official solution

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

  6. 6
    how ovm works
    Times asked 1
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  7. 7
    how search works in my app
    Times asked 1
    Official solution

    SimpleSearch: form/query param → ilike filter → results template.

    Example

    q = request.args.get('q', '').strip()
    lots = Lot.query.filter(Lot.name.ilike(f'%{q}%')).all()
  8. 8
    saw almost full application working and asked basic questions
    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.

  9. 9
    they need id softcopy on screen photo just be ready with iitm site opened to save time.
    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: just check your webcam 10 mins before viva again. many time we disable or add new software which may impact settings...in my case 5 days ago I had disabled webcam and forgot to turn it on plus had installed one software for screen recording and that came up with virtual camera so wasted 3-4 mins in changing this setup in start of call.
  1. 1
    Demonstrate project overall features
    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.

  2. 2
    Then he asked to add a column in admin search result
    Times asked 1
    Official solution

    SimpleSearch: form/query param → ilike filter → results template.

    Example

    q = request.args.get('q', '').strip()
    lots = Lot.query.filter(Lot.name.ilike(f'%{q}%')).all()
  3. 3
    Asked to open notepad and write a route which will display my name (static)
    Times asked 1
    Official solution

    SimpleLive Flask coding: chhota route likho, save, browser/curl se test. Syntax error terminal mein padho.

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  4. 4
    Asked to register a new staff and login (show that he can't login without approval from admin)
    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.

  5. 5
    Asked if I left any features in project which already mentioned in PS
    Times asked 1
    Official solution

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

  6. 6
    Lastly he told " all the best for level 2🥹"
    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.

Advice: over all he is very chill throught out the viva 😇
  1. 1
    Project demo
    Times asked 7
    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.

  2. 2
    In the company dashboard can you change drive name after posting it
    Times asked 1
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  3. 3
    Can student change the resume that they have submitted after applying for a job
    Times asked 1
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  4. 4
    Coding question - take input from a form and display it in another page
    Times asked 1
    Official solution

    SimpleLive coding: notepad/editor mein chhota Flask route / Jinja loop / model field. Calm raho, run karke dikhao.

  5. 5
    Tier 2 vs tier 3 (I explained all 3)
    Times asked 1
    Official solution

    SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.

    Viva tipFunction signature + 3-4 important lines + edge case.

  6. 6
    Then he asked me to open my code
    Times asked 1
    Official solution

    SimpleLive Flask coding: chhota route likho, save, browser/curl se test. Syntax error terminal mein padho.

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  7. 7
    Models page
    Times asked 1
    Official solution

    Simplemodels.py = har table ki class: columns, PK/FK, relationships. Yeh Model layer hai.

    Suggested flow1) Classes list karo
    2) Har table ka kaam 1 line
    3) Relationships (1-M / M-M)
    4) Constraints (unique, nullable)

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  8. 8
    He asked me what is cascade
    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.

  9. 9
    Can it be used only for deleting
    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.

  10. 10
    Why can't it be used for anything else
    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.

  11. 11
    Have you normalized the data
    Times asked 1
    Official solution

    SimpleNormalisation: redundant data kam, tables todna. 1NF atomic, 2NF partial dep hatao, 3NF transitive dep hatao.

    Viva tip

    Exampleuser address alag table vs har booking mein dubara store.

  12. 12
    How much have you normalized
    Times asked 1
    Official solution

    SimpleNormalisation: redundant data kam, tables todna. 1NF atomic, 2NF partial dep hatao, 3NF transitive dep hatao.

    Viva tip

    Exampleuser address alag table vs har booking mein dubara store.

  13. 13
    Why not other normal forms
    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
Advice: Chill examiner. Do the Coding well.
  1. 1
    - Show id card
    Times asked 2
    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.

  2. 2
    - Download and run project
    Times asked 2
    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
    - then checks collaborator on github
    Times asked 2
    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.

  4. 4
    - In between demonstrations he says create a button to display message api endpoint
    Times asked 2
    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.

  5. 5
    - then he says change the message
    Times asked 2
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  6. 6
    - then ask lifecycle hook
    Times asked 2
    Official solution

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

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

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

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

    Example

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

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

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

  7. 7
    - says show the caching
    Times asked 2
    Official solution

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

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

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

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

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

    Example

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

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

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

  8. 8
    - what is an asynchronous function
    Times asked 2
    Official solution

    SimpleSync line pe ruk jao (2+2). Async I/O pe wait karte hue baaki kaam chalte (fetch, Celery).

    JS async ≠ Celery async jobs. Context se bolo.

    Why async jobs: slow/scheduled/bulk off request thread.

    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: Login sync hash check fast. Email Celery async. Vue fetch async.

  9. 9
    - v-bind , v-if , v-show
    Times asked 2
    Official solution

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

    v-if false → element exist hi nahi — costly create/destroy, lekin secret HTML DOM mein nahi.
    v-show → hamesha DOM, CSS hide, toggle tez.

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

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

    Example

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

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

    Viva tipSecurity ke liye sirf v-if kaafi nahi — API 403 bhi chahiye.

  10. 10
    - end to end demonstration of authentication
    Times asked 2
    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.

  11. 11
    - demonstration of all celery tasks
    Times asked 2
    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.

Advice: Don’t worry too much. Even if you can’t answer one question, he will probably ask another, so you still have a chance to pass the criteria
  1. 1
    Show your ID card.
    Times asked 23
  2. 2
    Download and run the project.
    Times asked 2
  3. 3
    Show your GitHub repository and collaborator.
    Times asked 16
  4. 4
    Demonstrate the complete application.
    Times asked 33
  5. 5
    Explain the complete authentication flow end-to-end.
    Times asked 1
  6. 6
    Demonstrate all Celery tasks (scheduled and user-triggered).
    Times asked 1
  7. 7
    Show where caching is implemented in the project.
    Times asked 1
  8. 8
    What are Vue Lifecycle Hooks?
    Times asked 5
  9. 9
    What is an asynchronous function?
    Times asked 1
  10. 10
    Explain v-bind.
    Times asked 1
  11. 11
    Difference between v-if and v-show.
    Times asked 10
  12. 12
    Create a button in the frontend that calls a backend API and displays the returned message.
    Times asked 1
  13. 13
    Modify the API/frontend so that the displayed message changes.
    Times asked 1
  1. 1
    Show your student ID card.
    Times asked 3
    Official solution

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

    Pehle se ID haath mein rakho. Glare mat aane do. Examiner screenshot/verify karta hai. Iske baad GitHub + project run.

  2. 2
    Show your GitHub repository and collaborator.
    Times asked 16
    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.

  3. 3
    Download the project from the portal and run it.
    Times asked 6
    Official 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.

  4. 4
    Demonstrate the complete application.
    Times asked 33
    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.

  5. 5
    Show the blacklist functionality (blocked user/staff cannot log in).
    Times asked 1
    Official solution

    SimpleBlacklist flag user/company ko block karta hai — login ya features band.

    user.is_blacklisted = True; db.session.commit()
    Login: if user.is_blacklisted: flash('Blocked'); return
    Student dashboard: blacklisted company ke drives hide — query filter join Company.is_blacklisted==False.
    Demo: admin blacklist → us user se login fail.

  6. 6
    Show staff approval before login.
    Times asked 1
    Official solution

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

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

  7. 7
    Show profile update functionality.
    Times asked 1
    Official solution

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

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

  8. 8
    Show search functionality.
    Times asked 1
    Official 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.

  9. 9
    Show that booking fails when available slots are 0 (prevent overbooking).
    Times asked 1
    Official solution

    SimpleDuplicate/overbook rokne ke liye DB constraint + route check dono.

    Pehle query: Booking.query.filter_by(user_id=uid, trek_id=tid).first()
    Agar exists: flash('Already booked'); return
    Slots: if trek.available <= 0: reject else trek.available -= 1; commit
    Race condition: unique(user_id, trek_id) constraint — do tabs se double click pe bhi ek hi row.
    Blacklist: login pe is_blacklisted check.
    Active drive limit: if Company ke paas status=open drive hai to naya mat banne do.

  10. 10
    Add a new column to the admin search results.
    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.

  11. 11
    Change a dashboard field (e.g., drive name) after posting.
    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'))
  12. 12
    Can a student edit their submitted resume after applying? Explain/show.
    Times asked 1
    Official solution

    SimpleFile upload form multipart, Flask request.files, disk ya DB path store.

    <form method='POST' enctype='multipart/form-data'>
    f = request.files.get('resume')
    f.save(os.path.join('uploads', secure_filename(f.filename)))

    Sensitive docs uploads/ web se seedha serve mat karo, login check ke baad send_from_directory.
    Student resume edit: policy — allowed hai to Update route, nahi to freeze after apply.

  13. 13
    Did you skip any required features from the problem statement?
    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.

  14. 14
    Write a Flask route that displays "Hello/Your Name" using Jinja.
    Times asked 1
    Official solution

    Patternfilter query → template/JSON. Examiner jo entity bole us class ka naam use karo.

    @app.route('/admin/blacklisted')
    def blacklisted():
        rows = User.query.filter_by(is_blacklisted=True).all()
        return render_template('list.html', rows=rows)
    
    JSON: return jsonify([{'id': r.id, 'name': r.name} for r in rows])
    ID se: User.query.get_or_404(id)
    Do filters: .filter(Drive.approved==False, Drive.title=='Data Scientist')

    Join example: students jinhone blacklisted company ke drive pe apply kiya — join Application-Drive-Company.

    PUT@app.route('/x/<int:id>', methods=['PUT']) + request.get_json()

    url param display: @app.route('/show/<int:id>') return render_template('show.html', id=id)
    Form → next page: POST values render_template('out.html', **request.form)
    Count: return str(User.query.filter_by(is_blacklisted=True).count())

  15. 15
    Write a Flask route that takes input from one HTML page and displays it on another page.
    Times asked 1
    Official solution

    Patternfilter query → template/JSON. Examiner jo entity bole us class ka naam use karo.

    @app.route('/admin/blacklisted')
    def blacklisted():
        rows = User.query.filter_by(is_blacklisted=True).all()
        return render_template('list.html', rows=rows)
    
    JSON: return jsonify([{'id': r.id, 'name': r.name} for r in rows])
    ID se: User.query.get_or_404(id)
    Do filters: .filter(Drive.approved==False, Drive.title=='Data Scientist')

    Join example: students jinhone blacklisted company ke drive pe apply kiya — join Application-Drive-Company.

    PUT@app.route('/x/<int:id>', methods=['PUT']) + request.get_json()

    url param display: @app.route('/show/<int:id>') return render_template('show.html', id=id)
    Form → next page: POST values render_template('out.html', **request.form)
    Count: return str(User.query.filter_by(is_blacklisted=True).count())

  16. 16
    Write a Flask route that takes a number and changes the next page's background color based on whether it is even or odd.
    Times asked 1
    Official solution

    SimpleURL parameters se numbers lo, calculate karke return/render.

    @app.route('/sum/<int:a>/<int:b>')
    def add(a, b):
        return f'Hello, sum is {a+b}'

    Product: a*b. Square: n*n. Even/odd: 'even' if n%2==0 else 'odd'.
    Form se: request.form.get('a', type=int). Background color even/odd:
    color = 'green' if n%2==0 else 'red'

    return render_template('page.html', color=color)

    CSS: body { background: {{ color }}; }


    Patternfilter query → template/JSON. Examiner jo entity bole us class ka naam use karo.

    @app.route('/admin/blacklisted')
    def blacklisted():
        rows = User.query.filter_by(is_blacklisted=True).all()
        return render_template('list.html', rows=rows)
    
    JSON: return jsonify([{'id': r.id, 'name': r.name} for r in rows])
    ID se: User.query.get_or_404(id)
    Do filters: .filter(Drive.approved==False, Drive.title=='Data Scientist')

    Join example: students jinhone blacklisted company ke drive pe apply kiya — join Application-Drive-Company.

    PUT@app.route('/x/<int:id>', methods=['PUT']) + request.get_json()

    url param display: @app.route('/show/<int:id>') return render_template('show.html', id=id)
    Form → next page: POST values render_template('out.html', **request.form)
    Count: return str(User.query.filter_by(is_blacklisted=True).count())

  17. 17
    Write a Flask route that returns the total number of bookings for a given user ID.
    Times asked 1
    Official solution

    Patternfilter query → template/JSON. Examiner jo entity bole us class ka naam use karo.

    @app.route('/admin/blacklisted')
    def blacklisted():
        rows = User.query.filter_by(is_blacklisted=True).all()
        return render_template('list.html', rows=rows)
    
    JSON: return jsonify([{'id': r.id, 'name': r.name} for r in rows])
    ID se: User.query.get_or_404(id)
    Do filters: .filter(Drive.approved==False, Drive.title=='Data Scientist')

    Join example: students jinhone blacklisted company ke drive pe apply kiya — join Application-Drive-Company.

    PUT@app.route('/x/<int:id>', methods=['PUT']) + request.get_json()

    url param display: @app.route('/show/<int:id>') return render_template('show.html', id=id)
    Form → next page: POST values render_template('out.html', **request.form)
    Count: return str(User.query.filter_by(is_blacklisted=True).count())

  18. 18
    Explain MVC architecture using your project.
    Times asked 3
    Official 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.html

    Draw: 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.

  19. 19
    Show where Jinja is used in your project.
    Times asked 1
    Official solution

    SimpleJinja2 Flask ka template engine hai. HTML ke andar Python-jaisa data print/loop/if kar sakte ho.

    Bina Jinja har user ke liye alag HTML file. Jinja se ek template + data.

    {{ user.name }} print, {% for x in items %} loop, {% if %} condition, {% extends %} layout.

    Example routereturn render_template('dash.html', treks=treks)

    dash.html: {% for t in treks %}<li>{{ t.name }}</li>{% endfor %}

    HTML files templates/ folder mein isliye kyunki Flask default wahan dhundhta hai. render_template Jinja ko run karta hai.
    Boolean Jinja handle karta hai: {% if user.is_admin %}.

  20. 20
    What are the different types/features of Flask templating?
    Times asked 1
    Official 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.

  21. 21
    What is ORM?
    Times asked 49
    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.

  22. 22
    Which ORM did you use?
    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.

  23. 23
    How does ORM work?
    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.

  24. 24
    What is Cascade in SQLAlchemy?
    Times asked 1
    Official solution

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

    db = SQLAlchemy(app)

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

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

  25. 25
    Can Cascade be used for operations other than delete?
    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).

  26. 26
    Is your database normalized?
    Times asked 3
    Official solution

    SimpleNormalization data ko split karke redundancy aur update-anomalies kam karti hai.

    1NF: atomic values, repeating groups nahi (comma-separated skills mat rakho).
    2NF: 1NF + non-key columns poori PK pe depend (composite keys pe).
    3NF: 2NF + non-key columns ek doosre pe depend na hon (city→state alag table).

    Examplehar booking mein user ka poora address copy vs user_id se User table.

    MAD1 project generally 3NF ke kareeb. Higher NF (BCNF) theoretically, practical apps denormalize speed ke liye (cached counts).
    Leaderboard: alag table better agar history/rank chahiye; sirf count hai to query se bhi ho sakta hai.

  27. 27
    Which normal form have you implemented?
    Times asked 1
    Official solution

    SimpleNormalization data ko split karke redundancy aur update-anomalies kam karti hai.

    1NF: atomic values, repeating groups nahi (comma-separated skills mat rakho).
    2NF: 1NF + non-key columns poori PK pe depend (composite keys pe).
    3NF: 2NF + non-key columns ek doosre pe depend na hon (city→state alag table).

    Examplehar booking mein user ka poora address copy vs user_id se User table.

    MAD1 project generally 3NF ke kareeb. Higher NF (BCNF) theoretically, practical apps denormalize speed ke liye (cached counts).
    Leaderboard: alag table better agar history/rank chahiye; sirf count hai to query se bhi ho sakta hai.

  28. 28
    Why didn't you use higher normal forms?
    Times asked 1
    Official solution

    SimpleNormalization data ko split karke redundancy aur update-anomalies kam karti hai.

    1NF: atomic values, repeating groups nahi (comma-separated skills mat rakho).
    2NF: 1NF + non-key columns poori PK pe depend (composite keys pe).
    3NF: 2NF + non-key columns ek doosre pe depend na hon (city→state alag table).

    Examplehar booking mein user ka poora address copy vs user_id se User table.

    MAD1 project generally 3NF ke kareeb. Higher NF (BCNF) theoretically, practical apps denormalize speed ke liye (cached counts).
    Leaderboard: alag table better agar history/rank chahiye; sirf count hai to query se bhi ho sakta hai.

  29. 29
    What are RESTful principles?
    Times asked 1
    Official solution

    SimpleAPI = Application Programming Interface — do systems predefined rules se baat karti hain. REST API HTTP + JSON use karti hai.

    Controller/route HTML bhi return kar sakta hai. REST API generally JSON return karti hai, frontend alag ho (Vue/Postman).

    Example

    @app.route('/api/users/<int:id>')
    def get_user(id):
        u = User.query.get_or_404(id)
        return jsonify(id=u.id, name=u.name)

    MAD1 HTML apps mein 'API' kabhi-kabhi routes ko hi keh dete hain. Agar Vue nahi to bolo: server-rendered Flask, JSON APIs optional.
    Boolean return: technically jsonify(True) ho sakta hai, lekin meaningful JSON object better. Flask view None return kare to error.
    Test: Postman se GET/POST.
    Parsing: request.get_json() body se, request.args query se.

  30. 30
    What are HTTP methods?
    Times asked 5
    Official solution

    SimpleHTTP methods batate hain request kya karna chahti hai. Common: GET POST PUT PATCH DELETE.

    GETread/fetch. Safe, URL se. Page kholna, search.

    POSTcreate/submit. Form, login.

    PUTpoora replace/update. Idempotent.

    PATCHpartial update.

    DELETEhataana.

    HEAD: sirf headers. OPTIONS: CORS preflight.

    Flask: @app.route('/x', methods=['GET','POST'])
    Agar methods na likho to default sirf GET.
    HTML form native sirf GET/POST. PUT/DELETE JS/fetch ya hidden _method se.
    GET se data fetch ho sakta hai, create nahi karna chahiye. POST se theoretically fetch ho sakta hai lekin cache/semantics galat.
    DELETE fetch ke liye nahi. GET POST ka kaam officially nahi karta — side effects GET pe mat rakho.

  31. 31
    Can the roles of GET and POST be interchanged? Explain your opinion.
    Times asked 1
    Official solution

    SimpleGET data mangta hai (read), POST data bhejta hai (create/submit).

    GETURL mein dikhta hai, bookmark ho sakta hai, browser back/refresh safe hai, data URL query mein jaata hai. Search, page open, login form dikhana.

    POSTbody mein data jaata hai, URL mein password nahi dikhta, refresh pe dubara submit ho sakta hai. Login, register, form save.

    Example

    # page dikhana

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'GET':
            return render_template('login.html')
        # POST: form submit
        email = request.form.get('email')
        ...

    GET se theoretically data bhej sakte ho (?q=flask), lekin create/update ke liye nahi use karna — data log/history mein save ho jaata hai, length limit hoti hai.
    HTML form default GET hota hai; method='POST' likhna zaroori hai login/register pe.

  32. 32
    What is Cross-Site Scripting (XSS)?
    Times asked 1
    Official solution

    SimpleCORS browser rule hai ki kaunsa frontend kis API ko call kar sake. XSS attacker ka JS tumhare page pe chalaata hai.

    CORS: API header Access-Control-Allow-Origin. Vue (localhost:8080) Flask (5000) ko call kare to CORS chahiye. Same Flask+Jinja site pe usually issue nahi.
    XSS: <script> cookie chori. Fix: escape output (Jinja autoescape), user HTML mat render karo.
    CSRF alag: attacker user ke browser se hidden request. Fix: CSRF token (Flask-WTF).

  33. 33
    What is CORS?
    Times asked 8
    Official solution

    SimpleCORS browser rule hai ki kaunsa frontend kis API ko call kar sake. XSS attacker ka JS tumhare page pe chalaata hai.

    CORS: API header Access-Control-Allow-Origin. Vue (localhost:8080) Flask (5000) ko call kare to CORS chahiye. Same Flask+Jinja site pe usually issue nahi.
    XSS: <script> cookie chori. Fix: escape output (Jinja autoescape), user HTML mat render karo.
    CSRF alag: attacker user ke browser se hidden request. Fix: CSRF token (Flask-WTF).

  34. 34
    Difference between CORS and Cross-Site Scripting (XSS).
    Times asked 1
    Official solution

    SimpleCORS browser rule hai ki kaunsa frontend kis API ko call kar sake. XSS attacker ka JS tumhare page pe chalaata hai.

    CORS: API header Access-Control-Allow-Origin. Vue (localhost:8080) Flask (5000) ko call kare to CORS chahiye. Same Flask+Jinja site pe usually issue nahi.
    XSS: <script> cookie chori. Fix: escape output (Jinja autoescape), user HTML mat render karo.
    CSRF alag: attacker user ke browser se hidden request. Fix: CSRF token (Flask-WTF).

  35. 35
    Explain Vertical Scaling vs Horizontal Scaling.
    Times asked 1
    Official solution

    SimpleVertical = same machine ko powerful banao. Horizontal = aur machines add karo.

    Vertical (scale up): RAM/CPU badhao. Simple, lekin ek limit hai, downtime ho sakta hai, single point of failure.
    Horizontal (scale out): 5 servers + load balancer. Sasta long-term, fault tolerant, lekin session/DB sharing sochna padta hai.

    Example10k users aaye to Flask app ke 4 copies chalao nginx peeche, DB alag machine pe.

    Thousands of requests on one machine: caching (Redis), DB indexes, gunicorn workers, phir horizontal.

  36. 36
    Explain Tier-2 vs Tier-3 architecture.
    Times asked 1
    Official solution

    Simple2-tier = client seedha database se baat karta hai. 3-tier = beech mein application server hota hai.

    2-tier: UI + DB. Jaise desktop app directly SQLite. Simple, lekin security/scaling kam.
    3-tier: Presentation (browser) → Application (Flask) → Data (SQLite/MySQL). MAD1 project yahi hai.

    Examplebrowser HTML dikhata hai, Flask business logic (booking, auth), DB data store.

    Fayda: DB expose nahi, logic central, scale alag-alag tiers pe kar sakte ho.

  37. 37
    How does the blacklist mechanism work?
    Times asked 1
    Official solution

    SimpleBlacklist flag user/company ko block karta hai — login ya features band.

    user.is_blacklisted = True; db.session.commit()
    Login: if user.is_blacklisted: flash('Blocked'); return
    Student dashboard: blacklisted company ke drives hide — query filter join Company.is_blacklisted==False.
    Demo: admin blacklist → us user se login fail.

  38. 38
    How does search work in your application?
    Times asked 1
    Official 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.

  39. 39
    How do you prevent overbooking?
    Times asked 1
    Official solution

    SimpleDuplicate/overbook rokne ke liye DB constraint + route check dono.

    Pehle query: Booking.query.filter_by(user_id=uid, trek_id=tid).first()
    Agar exists: flash('Already booked'); return
    Slots: if trek.available <= 0: reject else trek.available -= 1; commit
    Race condition: unique(user_id, trek_id) constraint — do tabs se double click pe bhi ek hi row.
    Blacklist: login pe is_blacklisted check.
    Active drive limit: if Company ke paas status=open drive hai to naya mat banne do.

  40. 40
    Why shouldn't trek slots become negative? How would you validate this?
    Times asked 1
    Official solution

    SimpleValidation galat data rok ti hai — frontend turant, backend must.

    Frontend: required, min='18', maxlength='8', pattern='(?=.*[A-Z]).{8,}'
    Backend example:

    pwd = request.form.get('password','')
    if len(pwd) < 8 or not re.search(r'[A-Z]', pwd) or not re.search(r'[0-9]', pwd):
        flash('Weak password')

    Haan, regex se password rules ho sakte hain.
    Age 18-99, date >= today, slots <= 30 and > 0, confirm password == password, email '@' .
    Duplicate username: User.query.filter_by(email=email).first() or unique=True catch IntegrityError.
    Past date: if date < date.today(): reject. Negative slots: if slots < 0: reject; book pe available > 0 check.

  41. 41
    How would you implement a feature to prevent invalid slot values?
    Times asked 1
    Official 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>')

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