Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor UNKNOWN

Share your experience Add your viva experience here
237 Questions
31 Sets
0 Topics
0 Reviews
Tips for this examiner: very nice proctor

Student reviews

No student reviews for this proctor yet.

Approved viva sets

  1. 1
    Asked whether search bar is working or not
    Times asked 2
  2. 2
    Asked the functioning of create drive form in the company dashboard.
    Times asked 2
  3. 3
    What are CRUD operations?
    Times asked 2
  4. 4
    Explain Vue lifecycle hooks.
    Times asked 2
  5. 5
    Explain Components of Vue.
    Times asked 2
  1. 1
    Proctor id - level2-101
    Times asked 2
  2. 2
    🔹 1. Project + Practical Task
    Times asked 2
  3. 3
    Add a filter option in admin dashboard (UI + functionality)
    Times asked 2
  4. 4
    models.py
    Times asked 2
  5. 5
    Dashboard code
    Times asked 2
  6. 6
    🔹 2. Vue / Frontend Concepts
    Times asked 2
  7. 7
    What are props?
    Times asked 2
  8. 8
    What is emit?
    Times asked 3
  9. 9
    Why do we use emit? (communication child → parent)
    Times asked 2
  10. 10
    Difference idea: props vs emit (implicitly checked)
    Times asked 2
  11. 11
    🔹 3. Backend / Python Concepts
    Times asked 2
  12. 12
    What is a decorator?
    Times asked 3
  13. 13
    🔹 4. Web App Architecture
    Times asked 2
  14. 14
    What is an SPA (Single Page Application)?
    Times asked 2
  15. 15
    🔹 5. Authentication Concepts
    Times asked 2
  16. 16
    What is Authentication?
    Times asked 2
  17. 17
    What is Authorization?
    Times asked 1
  18. 18
    Difference between them
    Times asked 1
  19. 19
    🔹 6. APIs
    Times asked 2
  20. 20
    What are APIs?
    Times asked 1
  21. 21
    🔹 7. System / Networking (Unexpected)
    Times asked 2
  22. 22
    What is VPC (Virtual Private Cloud) (new/unexpected question)
    Times asked 2
  23. 23
    Asked about connections (likely DB connections / API connections / client-server)
    Times asked 2
  24. 24
    🔹 8. General Flow Checks
    Times asked 2
  25. 25
    Show GitHub repo
    Times asked 2
  26. 26
    Run and demo project
    Times asked 2
  27. 27
    Explain code logic while navigating files
    Times asked 2
Advice: 🔹 1. Flexible / Situation-handling Original proctor didn’t come → he stepped in Told you to wait → means he was coordinating, not careless 👉 This shows he was adjusting to the situation, not trying to trap students. 🔹 2. Standard Verification Mode Asked for ID card Asked for GitHub Asked for demo 👉 Very typical checklist — like: “Let me confirm this is your project and you actually worked on it.” 🔹 3. Practical > Theory Focus Gave live task (add filter) Asked to show models.py + dashboard code 👉 This means: He cares more about real understanding than memorized answers Even when filtering didn’t work, he didn’t stop you immediately — that’s important. 🔹 4. Concept-Probing Style He kept asking: props, emit decorator SPA auth vs authorization APIs, REST VPC (stretch question) 👉 Pattern: Start from basic → move to deeper → then throw 1–2 surprise questions Like Hori suddenly asking something unexpected just to see Miyamura’s reaction 😄 🔹 5. Not Aggressive / Not Interrupting Let you try UI part Asked explanations instead of rapid-fire grilling Didn’t panic you further even when filter didn’t work 👉 This is a neutral-to-friendly evaluator, not a strict one 🔹 6. Positive Ending Signal “Feedback was positive” Your gut feeling: pass 👉 Huge sign: Examiners usually don’t give positive signals unless: you showed effort you understood most things
  1. 1
    1.change colour of navbar to blue
    Times asked 2
  2. 2
    2.for what all purposes did u use redis?
    Times asked 2
  3. 3
    3.show me where u used caching
    Times asked 2
  4. 4
    4.did u use jwt or flask security token?
    Times asked 2
  5. 5
    5.how can we trace redis tasks?
    Times asked 2
  6. 6
    6.demonstrate your application
    Times asked 2
  7. 7
    7.did u use session or token in your app?
    Times asked 2
  8. 8
    9.can u manipulate virtual DOM and change the content of original DOM
    Times asked 2
Advice: Have a good knowledge about all that you have implemented in your project.
  1. 1
    1.what is cache 2.prove how cache works 3.what is api
    Times asked 2
  2. 2
    waht is dif between session and token
    Times asked 4
  3. 3
    which one are you used
    Times asked 4
  4. 4
    i used jwt so waht we are using that why not work with only user_id 7.what is difrence betweek schedule best and async beat
    Times asked 4
  5. 5
    make it change like i want to see only one appointment 9.explain cache code 10.demo
    Times asked 4
  6. 6
    what is rbac
    Times asked 4
Advice: very nice proctor
  1. 1
    What is vue?
    Times asked 2
  2. 2
    What is a reactive framework?
    Times asked 4
  3. 3
    What is memoization?
    Times asked 4
  4. 4
    What is a rainbow table?
    Times asked 3
  5. 5
    What is a v-cloak?
    Times asked 2
  6. 6
    how can you access the server without using browser and url?
    Times asked 2
  7. 7
    difference between v-if and v-show?
    Times asked 1
  8. 8
    difference between memoization and caching.
    Times asked 2
  9. 9
    What is celery?
    Times asked 6
  10. 10
    What was the default hashing algorithm in mad1?
    Times asked 3
  11. 11
    What is sha26? Can it be decrypted back? How many hashing algorithms do you know?
    Times asked 2
  12. 12
    What is ajax?
    Times asked 2
  13. 13
    a few questions about the export deck like why didn't I implement that the user can choose where to download the csv file?
    Times asked 2
  14. 14
    Where did you implement caching?
    Times asked 4
  15. 15
    improvement in both implementation and code from mad1 to mad2 project
    Times asked 2
  1. 1
    Can someone please send MAD 2 Sheet. PLEASE!
    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.

  1. 1
    • Demostration of the project from the my sides all the core function and other additions features if any
    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
    • Build a endpoints for listing booking but use the previous booking template for admin
    Times asked 1
    Official solution

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

  3. 3
    • Difference between the endpoints/routes and functions
    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
    • Difference between render_template, redirect, url_for and when they should be used
    Times asked 1
    Official solution

    Simplerender_template Jinja HTML file ko data deke final HTML banata hai.

    Example

    return render_template('dashboard.html', user=user, lots=lots)
  5. 5
    • How You take the value from backend and render on the frontend.
    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
    • Difference between the debug=Ture or false
    Times asked 1
    Official solution

    SimpleDebug: terminal traceback padho, print/logging, Flask debug, browser Network/Console, reproduce minimum steps.

Advice: All questions were from your project and tries to explain the concepts from your code that what you have done in the code. Ex: for values to be displayed on the frontend you have used the jinja variable and in the backend you name the same variable name while rendering the templates send the value what you want to displayed
  1. 1
    The proctor is a pretty strict guy. Handle with care. Just go with his flow.
    Times asked 1
    Official solution

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

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

  3. 3
    Stopped me in between and asked to show the HTML page of the page I was showing him.
    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
    Asked him how does GET and POST requests worked.
    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')
  5. 5
    Told to show where and how I have incorporated them in the page shown.
    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
    What is CRUD?
    Times asked 2
    Official solution

    SimpleCRUD = Create Read Update Delete. Admin pe ek resource ke 4 ops dikhao.

  7. 7
    GET OR POST in CRUD operations.
    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')
  8. 8
    Is the website rendered in client side or server side?
    Times asked 1
    Official solution

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

  9. 9
    Asked if you know sequential inputting.
    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: Invigilator is pretty stern. Just answer his questions. He also asks out of syllabus stuffs to confuse a little. Just went with a I don't know.
  1. 1
    demo of 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.

  2. 2
    how frontend and backend interacts
    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.

  3. 3
    write code in jinja2 if block in notepad
    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
    write code for route to return id
    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'
Advice: be chill, it is a cakewalk
  1. 1
    MAD-2 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.

  2. 2
    Explain your folder structure
    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.

  3. 3
    What is vuex store
    Times asked 1
    Official solution

    SimpleVuex/Pinia ghar ka notice board. Har room (component) same user/token dekhe.

    State data, mutations sync change, actions async API phir commit.

    Local data() sirf us component. Token/user global.

    Pinia Vue 3 official, kam boilerplate. Vuex older MAD2 still common.

    Example

    state: { user: null }
    mutations: { setUser(s, u) { s.user = u } }
    actions: { async login({ commit }, form) {
      const u = await api.login(form); commit('setUser', u)
    }}

    Project example: store user + token login action. Navbar getters isAdmin. Logout clear LS+state.

    Viva tipLocal/Session storage persist ke liye, reactive share ke liye store. Pinia Vue 3 official, Vuex older.

  4. 4
    What is createrouter where we have all the routes.
    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
    What is createwebhashhistory
    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
    Why is createrouter in the bottom and not in the top
    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
    What is state
    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.

  8. 8
    What is server event and web hooks
    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

  9. 9
    What is session, where is server data stored
    Times asked 1
    Official solution

    SimpleMAD1 mein usually session-based auth: login pe session['user_id'], har request pe verify.

    Example

    session['user_id'] = user.id
    uid = session.get('user_id')
    user = User.query.get(uid)

    Viva tipSECRET_KEY set karo warna session insecure. logout pe session.clear().

  10. 10
    What do you use to implement 1-1 and 1-many relationship
    Times asked 1
    Official solution

    Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  11. 11
    What is the status code for unauthorised
    Times asked 1
    Official solution

    SimpleStatus code server ka result: 200 OK, 302 redirect, 400 bad input, 401/403 auth, 404 not found, 500 server error.

  12. 12
    Then he asked me to show it in the terminal, which is simply going to the app, and try accessing the users with the url without giving the credentials. But I was just very much flabbergasted by the questions because I did not expect the questions to be like this and prepared for something like make changes over here and show me how will you implement this. It was very different than expected. My viva got over in just 30 min.
    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.

  1. 1
    please share the questions asap so that it could help those who are geeting any new examineer for that day.....
    Times asked 1
    Official solution

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

  1. 1
    Jinja templating
    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 %}
Advice: Just breathe and relax. The proctors are humans too and they were also students once, just like you. They're not going to eat you. Just be confident in whatever you're saying even if it's wrong.
  1. 1
    2.Show me the dashboard of company.
    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
    3.Write code for Logout button on a notepad.
    Times asked 1
    Official solution

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

  3. 3
    5.What are different methods in your application and what are their use.
    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
    6.Show me how the route is working for a particular action on button click of your 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
    8. download your application from github and run it in vs code.
    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.

Advice: know your code well, if any functionality not implemented , then say it's not implemented , but you should be able to explain, how you can impliment that functionality , at least the logic if not the whole code
  1. 1
    demo of the app
    Times asked 3
    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
    use of uselist=True/uselist=False in sqlalchemy relationships
    Times asked 1
    Official solution

    Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  3. 3
    about cookies and tokens, why are they used, are they hashed or not, etc.
    Times asked 1
    Official solution

    SimpleJWT teen tukde ki signed chitthi: header.payload.signature. Padhi ja sakti hai, badli nahi ja sakti.

    Encoded (Base64) + signed, encrypted nahi (JWE alag). Payload mein password mat daalo — koi jwt.io pe dekh lega.

    Login pe server secret se HMAC (HS256). Har API Authorization: Bearer <token>.
    Expiry exp. Change payload → signature fail → 401.

    Session MAD1 server yaad rakhta. JWT MAD2 client rakhta, server stateless-ish.

    Example

    eyJhbGciOiJIUzI1NiJ9.{"sub":1,"role":"admin"}.signature
    # Authorization: Bearer <token>

    Project example: POST /login → token LS. fetch interceptor header. @jwt_required APIs.

    Viva tipAlgo HS256. Secret env var. jwt.io pe payload dikhao, secret public site pe mat paste.

  4. 4
    write code to create a new patient
    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.

Advice: Stay confident :)
  1. 1
    How to make a new branch in git
    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.

  2. 2
    marshal-with
    Times asked 1
    Official solution

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

  3. 3
    inline and block elements
    Times asked 1
    Official solution

    SimpleBlock poori line leta hai, Inline text ke saath baithta hai.

    Block (div, p, h1, section): width 100%, next element neeche aata hai. Height/width/margin set kar sakte ho.
    Inline (span, a, strong): sirf content jitni jagah. Width/height generally nahi chalti.
    Inline-block: inline ki tarah baithta hai, lekin width/height milti hai.

    Example

    <div>Hello</div><div>World</div> do lines. <span>Hello</span> <span>World</span> ek line.
  4. 4
    basic jinja loops and app routes with parsing URL parameters.
    Times asked 1
    Official solution

    SimpleJinja for loop list render karta hai. loop.index, else branch empty list pe.

    Example

    {% for u in users %}
      <tr><td>{{ loop.index }}</td><td>{{ u.email }}</td></tr>
    {% endfor %}
  5. 5
    They asked me to explain some lines and logic of my code (python and templates)
    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
    Explanation of my DB structure
    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: Be strong in your basics and concepts. Don't get stressed.
  1. 1
    show documention of AL/LLM used
    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
    run the project
    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
  3. 3
    checked core funcanality of demo
    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
    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.

  5. 5
    show ER diagram
    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
    relationship between tables
    Times asked 2
    Official solution

    Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  7. 7
    show the cost calculation part
    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.

  1. 1
    Asked me few code changing ques.
    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
    Database
    Times asked 1
    Official solution

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

Advice: Seems like viva 2
  1. 1
    Types of storages, status code,sir will see the code in routes.py and ask us write a specific part of the 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'
  1. 1
    Regarding db models, relationships
    Times asked 1
    Official solution

    Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  2. 2
    flask-login related
    Times asked 1
    Official solution

    SimpleFlask lightweight Python web framework — routes, request/response, templates. MAD1 ka backend yahi hai.

    Example

    from flask import Flask
    app = Flask(__name__)
    
    @app.route('/')
    def home():
        return 'Hello'

    Viva tipFlask micro hai: jo chahiye (DB, login, forms) khud jodte ho.

  3. 3
    db.rollback() related
    Times asked 1
    Official solution

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

  4. 4
    template inheritence
    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'))
  5. 5
    jinja uses
    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 %}
  6. 6
    http methods
    Times asked 1
    Official solution

    SimpleHTTP verbs REST ke tools. Methods HTTP ke hain, REST unhe convention se use karta hai.

    GET read cacheable. POST create payload. PUT replace. PATCH patch. DELETE remove.

    GET exists bina REST ke bhi — browser address bar.

    HTTP verbs + status REST ki zabaan. GET read, POST create, PUT replace, PATCH partial, DELETE remove. GET typically no body.

    Status: 200 OK, 201 created, 202 accepted (Celery task), 400 bad input, 401 no/bad token, 403 role nahi, 404 missing, 409 conflict (double book), 500 server.

    AJAX/fetch page reload nahi. SPA poori isi pe. Postman se bina Vue ke API prove karo — examiner pasand.

    Example

    GET /api/venues
    POST /api/venues
    PUT /api/venues/1
    DELETE /api/venues/1

    Project example: resources.py methods list. Postman 4-5 calls.

    Viva tipGET typically no body (cacheable). POST/PUT/PATCH haan payload. PUT idempotent, POST nahi.

  7. 7
    Parking lot and spot relationship CRUD
    Times asked 1
    Official solution

    Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  8. 8
    Asked to explain the code in some route
    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.

  9. 9
    At last, demo He asked questions from the code, picked a part and asked to explain line by line, etc. Didn't ask to make any changes and run the demo, he just asked to make changes in the code and show the code, and then delete those changes 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.

Advice: Be crystal clear with the entire code, each and every line. Not just what each line does, but also like what if you replace this particular word with something else, etc.
  1. 1
    Difference between Authentication and Authorization
    Times asked 2
    Official solution

    SimpleAuthentication: tu kaun hai? (login). Authorization: tujhe permission hai? (role check).

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
  2. 2
    Explain GET, POST
    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')
  3. 3
    What technologies did you use for this project?
    Times asked 1
    Official solution

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

  4. 4
    How did you create admin?
    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.

  5. 5
    Demonstrate 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.

Advice: These questions were asked in Level 1 viva, so be prepare with the basics of your project.
  1. 1
    what is orm?
    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
  2. 2
    where is admin hardcore code ?
    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.

  3. 3
    where have you use 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
    what is 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.

  5. 5
    display your project
    Times asked 1
    Official solution

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

Advice: Prepare level even for level 1 .
  1. 1
    Explain the Project file structure.
    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.

  2. 2
    Show project report and E-R diagram.
    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
    Explain how many to many relationship is represented in Data Base? (DBMS) 4)Explain @app.route().
    Times asked 1
    Official solution

    Simpledb.relationship se object graph: lot.spots, booking.user. backref reverse side auto deta hai.

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  4. 4
    Explain how flask works internally.
    Times asked 1
    Official solution

    SimpleFlask lightweight Python web framework — routes, request/response, templates. MAD1 ka backend yahi hai.

    Example

    from flask import Flask
    app = Flask(__name__)
    
    @app.route('/')
    def home():
        return 'Hello'

    Viva tipFlask micro hai: jo chahiye (DB, login, forms) khud jodte ho.

  5. 5
    Where and how did u use boostrap and jinja, explain using some html file?
    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 %}
  6. 6
    Explain primary key and foreign 🔑.
    Times asked 1
    Official solution

    SimplePrimary key row ka unique identity — usually id Integer autoincrement.

    Example

    id = db.Column(db.Integer, primary_key=True)
  7. 7
    Explain the sqlalchemy models.
    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()
  8. 8
    Show how admin can view professional resume file.
    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
    Modifications to my code: (i) Password verification (either back end or front end modification) to restrict length, pw should contain both upper case & lower case and special characters. (ii) Arrange/sort the services which will be displayed to the Admin by alphabetical order.
    Times asked 1
    Official solution

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

Advice: 1) Proctor allowed me to refer to the internet (said preferably not AI like ChatGPT) to make changes to the code. 2) You should be able to explain your code (especially sqlalchemy models) and various libraries used. 3) Also understanding of data base.
  1. 1
    Move the header to the bottom of page.
    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.

  2. 2
    Change background color,font color.
    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
    Client vs server side data validation.
    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')
  4. 4
    There is a category of tobaco product, ask the user to confirm his age is 18+ before allowing him to view tobaco product.
    Times asked 1
    Official solution

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

  5. 5
    Client side storage.
    Times asked 1
    Official solution

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

  6. 6
    What is cookie.
    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.

  1. 1
    Questions: 1)intro about yourself
    Times asked 1
    Official solution

    Simple30 second: naam, degree, project kya hai, stack (Flask + Jinja + SQLAlchemy + SQLite).

    Example

    Main Priya, IITM BS. MAD1 mein parking/ticket app — Flask backend, Jinja templates, session login, SQLite.
  2. 2
    what is your project
    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
    explain project 4)in the login page create a button called which will reset the entered username and password. 5)he said he want the buttons side by side not up and down,so changed the code. 6)diff between http and HTTPS 7)diff between list and tuple 8)what is restful Api 9)what is standard port number in flask 10)can we change port number using the code.
    Times asked 1
    Official solution

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

  1. 1
    Run checksum.
    Times asked 3
    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
    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.

  3. 3
    Delete and edit a few things
    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
    Difference between put and patch
    Times asked 1
    Official solution

    SimplePOST naya janam (har baar naya id). PUT poori photo replace. PATCH sticker chipkao.

    POST create, not idempotent. PUT full update, idempotent. PATCH partial.

    POST ki jagah PUT se REST semantics toot. GET typically no body.

    CRUD map: POST create, GET read, PUT/PATCH update, DELETE delete.

    Pehle 1-line definition, phir related MAD2 layer (Vue SFC / Flask route / models.py / tasks.py / Redis).

    4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.

    Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.

    Example

    POST /api/venues
    PUT  /api/venues/1   {all fields}
    PATCH /api/venues/1 {only name}

    Project example: POST /api/venues create. PUT /venues/1 saari fields. PATCH sirf name.

  5. 5
    Difference between inline and internal css, which has higher priority
    Times asked 1
    Official solution

    Simplestyle = CSS. Inline, <style>, Bootstrap classes, ya Vue scoped CSS.

  6. 6
    What is lazy loading
    Times asked 1
    Official solution

    Simplelazy loading: related objects kab load hon. lazy=True default (access pe query). joined/eager pehle se join.

  7. 7
    Make the app allow only unique username while registering
    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.

  8. 8
    Put restrictions on length of password and make it mandatory to have one special character in 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.

  1. 1
    Asked whether search bar is working or not
    Times asked 2
    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()
  2. 2
    Asked the functioning of create drive form in the company dashboard.
    Times asked 2
    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
    What are CRUD operations?
    Times asked 2
    Official solution

    SimpleCRUD = Create Read Update Delete. Admin pe ek resource ke 4 ops dikhao.

  4. 4
    Explain Vue lifecycle hooks.
    Times asked 2
    Official solution

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

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

  5. 5
    Explain Components of Vue.
    Times asked 2
    Official solution

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

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

  1. 1
    Proctor id - level2-101
    Times asked 2
    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
    🔹 1. Project + Practical Task
    Times asked 2
    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
    Add a filter option in admin dashboard (UI + functionality)
    Times asked 2
    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
    models.py
    Times asked 2
    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)
  5. 5
    Dashboard code
    Times asked 2
    Official solution

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

  6. 6
    🔹 2. Vue / Frontend Concepts
    Times asked 2
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  7. 7
    What are props?
    Times asked 2
    Official solution

    SimpleProps parent ki thali child ko dena. Child thali tod ke parent ki thali na badle — emit bolo.

    Declare props, parent :venue="v". One-way. Mutate mat. Types/required Vue 3.

    List parent, card child — classic viva.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Example

    <VenueCard :venue="v" @select="onSelect" />
    props: ['venue']
    this.$emit('select', this.venue.id)

    Project example: VenueCard :venue. Child $emit('select', id).

  8. 8
    What is emit?
    Times asked 3
    Official solution

    Simpleemit = child parent ko chillata hai: 'delete 5'. Props down, events up.

    this.$emit('delete', id). Parent @delete="removeRow".

    Grandchild: chain emit ya Vuex/provide.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Example

    this.$emit('delete', id)
    // parent: <Child @delete="removeRow" />

    Project example: BookingRow emit cancel → parent list se hata + API DELETE.

  9. 9
    Why do we use emit? (communication child → parent)
    Times asked 2
    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
    Difference idea: props vs emit (implicitly checked)
    Times asked 2
    Official solution

    SimpleProps parent→child values. Emit child→parent signal. Basic communication.

    Difference props and emit.

    Component = reusable UI block (Navbar, Card). Props parent→child data, emit child→parent event. Slots parent HTML inner content.

    computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.

    SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.

    Project example: Card props venue emit select.

  11. 11
    🔹 3. Backend / Python Concepts
    Times asked 2
    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.

  12. 12
    What is a decorator?
    Times asked 3
    Official solution

    Simple@app.route URL ko Python function se jodta hai. @ wala cheez decorator hai.

    @app.route('/hello/<name>', methods=['GET'])
    def hello(name):
        return f'Hello {name}'

    Decorator function ko wrap karke extra behaviour deta hai (route register, login_required).
    Endpoint generally function name. Path /hello/Ram.
    <int:id> type converter — sirf integer. Bina converter string. ID chahiye to int safer.
    methods=['POST'] only POST. Default GET.
    functools.wraps custom decorator mein original function name/docs preserve karta hai.

  13. 13
    🔹 4. Web App Architecture
    Times asked 2
    Official solution

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

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

  14. 14
    What is an SPA (Single Page Application)?
    Times asked 2
    Official solution

    SimpleAJAX page reload ke bina server se data laata hai. Aaj kal fetch() + Promises.

    fetch('/api/users').then(r => r.json()).then(data => { ... })
    Promise: future value (pending/fulfilled/rejected). fetch Promise return karta hai.
    SPA (Vue): ek HTML, baaki routes JS se, partial update. MAD1 generally full page render (Jinja) — submit pe poora refresh.
    async/await Promise ka clean syntax.

  15. 15
    🔹 5. Authentication Concepts
    Times asked 2
    Official solution

    SimpleAuthentication: tu kaun hai? (login). Authorization: tujhe permission hai? (role check).

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
  16. 16
    What is Authentication?
    Times asked 2
    Official solution

    SimpleAuthentication: tu kaun hai? (login). Authorization: tujhe permission hai? (role check).

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
  17. 17
    🔹 6. APIs
    Times asked 2
    Official solution

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

  18. 18
    🔹 7. System / Networking (Unexpected)
    Times asked 2
    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.

  19. 19
    What is VPC (Virtual Private Cloud) (new/unexpected question)
    Times asked 2
    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.

  20. 20
    Asked about connections (likely DB connections / API connections / client-server)
    Times asked 2
    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.

  21. 21
    🔹 8. General Flow Checks
    Times asked 2
    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.

  22. 22
    Show GitHub repo
    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.

  23. 23
    Run and demo project
    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.

  24. 24
    Explain code logic while navigating files
    Times asked 2
    Official solution

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

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

Advice: 🔹 1. Flexible / Situation-handling Original proctor didn’t come → he stepped in Told you to wait → means he was coordinating, not careless 👉 This shows he was adjusting to the situation, not trying to trap students. 🔹 2. Standard Verification Mode Asked for ID card Asked for GitHub Asked for demo 👉 Very typical checklist — like: “Let me confirm this is your project and you actually worked on it.” 🔹 3. Practical > Theory Focus Gave live task (add filter) Asked to show models.py + dashboard code 👉 This means: He cares more about real understanding than memorized answers Even when filtering didn’t work, he didn’t stop you immediately — that’s important. 🔹 4. Concept-Probing Style He kept asking: props, emit decorator SPA auth vs authorization APIs, REST VPC (stretch question) 👉 Pattern: Start from basic → move to deeper → then throw 1–2 surprise questions Like Hori suddenly asking something unexpected just to see Miyamura’s reaction 😄 🔹 5. Not Aggressive / Not Interrupting Let you try UI part Asked explanations instead of rapid-fire grilling Didn’t panic you further even when filter didn’t work 👉 This is a neutral-to-friendly evaluator, not a strict one 🔹 6. Positive Ending Signal “Feedback was positive” Your gut feeling: pass 👉 Huge sign: Examiners usually don’t give positive signals unless: you showed effort you understood most things
  1. 1
    1.change colour of navbar to blue
    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.

  2. 2
    2.for what all purposes did u use redis?
    Times asked 2
    Official solution

    SimpleRedis fridge pe sticky note hai — poori kitchen (database) kholne ki zarurat nahi.

    Redis in-memory key-value store hai. Data RAM mein rehta hai, isliye disk wale SQLite/Postgres se kai guna tez.

    MAD2 mein Redis do kaam karta hai:
    1) Cache — same venue/show/dashboard JSON baar-baar DB se mat nikaalo.
    2) Celery message broker — Flask task queue mein daalta hai, worker uthata hai.

    Source of truth database hi hai. Redis band ho to cache miss ho jaata hai aur Celery queue ruk sakti hai. Crash pe cache gayab ho sakta hai — isliye important data sirf Redis mein mat rakho.

    Example

    import redis
    r = redis.Redis(host='localhost', port=6379, db=0)
    r.set('venues', json.dumps(data), ex=30)
    print(r.get('venues'))

    Project example: GET /api/venues pehle Redis dekho. Miss pe SQLAlchemy query, phir SET with timeout. Celery worker Redis list se daily reminder uthata hai.

    Viva tipCache ke liye db=1, broker ke liye db=0 rakhna smart hai taaki keys mix na hon. Viva mein redis-cli ping → PONG dikhana strong hai.

  3. 3
    3.show me where u used 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.

  4. 4
    4.did u use jwt or flask security token?
    Times asked 2
    Official solution

    SimpleFlask lightweight Python web framework — routes, request/response, templates. MAD1 ka backend yahi hai.

    Example

    from flask import Flask
    app = Flask(__name__)
    
    @app.route('/')
    def home():
        return 'Hello'

    Viva tipFlask micro hai: jo chahiye (DB, login, forms) khud jodte ho.

  5. 5
    5.how can we trace redis tasks?
    Times asked 2
    Official solution

    SimpleRedis fridge pe sticky note hai — poori kitchen (database) kholne ki zarurat nahi.

    Redis in-memory key-value store hai. Data RAM mein rehta hai, isliye disk wale SQLite/Postgres se kai guna tez.

    MAD2 mein Redis do kaam karta hai:
    1) Cache — same venue/show/dashboard JSON baar-baar DB se mat nikaalo.
    2) Celery message broker — Flask task queue mein daalta hai, worker uthata hai.

    Source of truth database hi hai. Redis band ho to cache miss ho jaata hai aur Celery queue ruk sakti hai. Crash pe cache gayab ho sakta hai — isliye important data sirf Redis mein mat rakho.

    Example

    import redis
    r = redis.Redis(host='localhost', port=6379, db=0)
    r.set('venues', json.dumps(data), ex=30)
    print(r.get('venues'))

    Project example: GET /api/venues pehle Redis dekho. Miss pe SQLAlchemy query, phir SET with timeout. Celery worker Redis list se daily reminder uthata hai.

    Viva tipCache ke liye db=1, broker ke liye db=0 rakhna smart hai taaki keys mix na hon. Viva mein redis-cli ping → PONG dikhana strong hai.

  6. 6
    6.demonstrate your application
    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.

  7. 7
    7.did u use session or token in your app?
    Times asked 2
    Official solution

    SimpleMAD1 mein usually session-based auth: login pe session['user_id'], har request pe verify.

    Example

    session['user_id'] = user.id
    uid = session.get('user_id')
    user = User.query.get(uid)

    Viva tipSECRET_KEY set karo warna session insecure. logout pe session.clear().

  8. 8
    9.can u manipulate virtual DOM and change the content of original DOM
    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.

Advice: Have a good knowledge about all that you have implemented in your project.
  1. 1
    1.what is cache 2.prove how cache works 3.what is api
    Times asked 2
    Official solution

    SimpleAPI = interface jisse systems baat karein. Web API usually JSON return karti hai.

    Example

    @app.route('/api/lots')
    def api_lots():
        return jsonify([{'id': l.id, 'name': l.name} for l in Lot.query.all()])
  2. 2
    waht is dif between session and token
    Times asked 4
    Official solution

    SimpleMAD1 mein usually session-based auth: login pe session['user_id'], har request pe verify.

    Example

    session['user_id'] = user.id
    uid = session.get('user_id')
    user = User.query.get(uid)

    Viva tipSECRET_KEY set karo warna session insecure. logout pe session.clear().

  3. 3
    which one are you used
    Times asked 4
    Official solution

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

  4. 4
    i used jwt so waht we are using that why not work with only user_id 7.what is difrence betweek schedule best and async beat
    Times asked 4
    Official solution

    SimpleJWT teen tukde ki signed chitthi: header.payload.signature. Padhi ja sakti hai, badli nahi ja sakti.

    Encoded (Base64) + signed, encrypted nahi (JWE alag). Payload mein password mat daalo — koi jwt.io pe dekh lega.

    Login pe server secret se HMAC (HS256). Har API Authorization: Bearer <token>.
    Expiry exp. Change payload → signature fail → 401.

    Session MAD1 server yaad rakhta. JWT MAD2 client rakhta, server stateless-ish.

    Example

    eyJhbGciOiJIUzI1NiJ9.{"sub":1,"role":"admin"}.signature
    # Authorization: Bearer <token>

    Project example: POST /login → token LS. fetch interceptor header. @jwt_required APIs.

    Viva tipAlgo HS256. Secret env var. jwt.io pe payload dikhao, secret public site pe mat paste.

  5. 5
    make it change like i want to see only one appointment 9.explain cache code 10.demo
    Times asked 4
    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
    what is rbac
    Times asked 4
    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'))
Advice: very nice proctor
  1. 1
    What is vue?
    Times asked 2
    Official solution

    SimpleVue = UI ka smart assistant. Data badlo, screen khud update. MAD1 Jinja har click pe naya HTML.

    Progressive frontend framework. Components, reactivity, directives.

    MAD2 SPA: ek index.html, Vue Router pages, Flask sirf JSON.

    Fayde: easy, SFC, docs. Vs React: templates HTML-like, course sikhata hai. Vs plain JS: baar-baar DOM mat chhedo.

    Example

    <!-- HelloWorld.vue -->
    <template>
      <h1>{{ msg }}</h1>
    </template>
    <script>
    export default { data() { return { msg: 'Hello' } } }
    </script>

    Project example: Navbar.vue + views (Login, Dashboard). data() / setup() reactive. fetch APIs.

    Viva tipFayde: easy, SFC, reactivity. Vs React: chhota learning curve. Vs plain JS: UI state auto-update.

  2. 2
    What is a reactive framework?
    Times asked 4
    Official solution

    SimpleReactive: data change → UI auto. Vue/React. jQuery manual.

    Why Vue. Lose reactivity Vue2 new field. Vue3 proxy better.

    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: Change data, list updates.

  3. 3
    What is memoization?
    Times asked 4
    Official solution

    SimpleMemoize = function(args) ka answer copy. Caching broader (HTTP, Redis, page).

    Fibonacci textbook. Flask @cache.memoize. cached whole view.

    Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.

    MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.

    Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.

    Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.

    Alag: Redis ≠ Memcached (Celery broker nahi). Redis ≠ localStorage (woh browser). redis-cli ping → PONG viva proof.

    Project example: get_user(id) memoize. venues list cached.

  4. 4
    What is a rainbow table?
    Times asked 3
    Official solution

    SimplePrecomputed hash→password tables. Unique salt per user se useless. Slow hash.

    Why hashing + salt viva combo.

    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: Werkzeug salts included in hash string.

  5. 5
    What is a v-cloak?
    Times asked 2
    Official solution

    Simplev-cloak Vue compile hone tak raw {{ }} hide karta hai. CSS: [v-cloak] { display: none; }

  6. 6
    how can you access the server without using browser and url?
    Times asked 2
    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
    difference between memoization and caching.
    Times asked 2
    Official solution

    SimpleMemoize args-aware. cached view/URL. Prefixes differ.

    Same Redis. Different key recipe.

    Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.

    MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.

    Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.

    Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.

    Alag: Redis ≠ Memcached (Celery broker nahi). Redis ≠ localStorage (woh browser). redis-cli ping → PONG viva proof.

    Project example: Two decorators two files explain.

  8. 8
    What is celery?
    Times asked 6
    Official solution

    SimpleCelery background tasks (email, CSV, reports) async chalaata hai. Redis broker/queue + cache.

    User 'Export' click → Celery task queue → Redis message → worker CSV banaata hai → user baad mein download.
    Saath isliye: Celery ko broker chahiye, Redis tez in-memory. MAD2 topic zyada, MAD1 mein optional.
    Priority: task queues/routing. Caching: Redis mein key-value, DB hits kam.
    Pub/Sub: publisher channel pe message, subscribers sunte hain — Redis yeh bhi karta hai.

  9. 9
    What was the default hashing algorithm in mad1?
    Times asked 3
    Official solution

    SimpleMAD1 mein common: Werkzeug generate_password_hash — default usually pbkdf2:sha256. Apna code dikhao.

    Example

    from werkzeug.security import generate_password_hash
    print(generate_password_hash('secret'))  # pbkdf2:sha256:...
  10. 10
    What is sha26? Can it be decrypted back? How many hashing algorithms do you know?
    Times asked 2
    Official solution

    SimpleMAD1 mein common: Werkzeug generate_password_hash — default usually pbkdf2:sha256. Apna code dikhao.

    Example

    from werkzeug.security import generate_password_hash
    print(generate_password_hash('secret'))  # pbkdf2:sha256:...
  11. 11
    What is ajax?
    Times asked 2
    Official solution

    SimpleAJAX page reload ke bina server se data laata hai. Aaj kal fetch() + Promises.

    fetch('/api/users').then(r => r.json()).then(data => { ... })
    Promise: future value (pending/fulfilled/rejected). fetch Promise return karta hai.
    SPA (Vue): ek HTML, baaki routes JS se, partial update. MAD1 generally full page render (Jinja) — submit pe poora refresh.
    async/await Promise ka clean syntax.

  12. 12
    a few questions about the export deck like why didn't I implement that the user can choose where to download the csv file?
    Times asked 2
    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.

  13. 13
    Where did you implement caching?
    Times asked 4
    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.

  14. 14
    improvement in both implementation and code from mad1 to mad2 project
    Times asked 2
    Official solution

    SimpleImprove ideas: caching, better validation, tests, pagination, email reminders, accessibility, mobile UI, logging.

    Viva tip1-2 concrete features bolo jo time milne pe add karte — vague 'AI' mat.

  1. 1
    Which ORM are you using? SQLAlchemy
    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.

  2. 2
    What is SQLAlchemy?
    Times asked 8
    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.

  3. 3
    What is url_for?
    Times asked 1
    Official solution

    Simpleurl_for Flask function/endpoint name se URL generate karta hai, hardcode path nahi.

    url_for('home') → '/'
    url_for('edit_user', id=5) → '/user/5/edit'
    Templates: href="{{ url_for('login') }}"

    Parameter: endpoint ka naam (function name), plus route variables.
    Galat naam: BuildError. Route rename karo to url_for automatic naya path dega — yahi fayda hai.

  4. 4
    What is the difference between request.form.get{ } and request.form[ ] as I used this in my code?
    Times asked 1
    Official solution

    Simplerequest.form POST body se aata hai, request.args URL query se (?q=flask).

    request.form['email'] → key na ho to KeyError (crash)
    request.form.get('email') → key na ho to None (safe). Default: request.form.get('q', '')
    request.args.get('page', 1) → /search?page=2

    Login POST: request.form.get('password')
    Search GET: q = request.args.get('q', '')
    Hamesha .get() prefer karo viva coding mein — crash nahi hoga.

  5. 5
    Asked about which join i used in my code
    Times asked 2
    Official solution

    SimpleJOIN do tables ko related columns se milata hai.

    INNER JOIN: dono taraf match. LEFT JOIN: left ki saari rows, right match na ho to NULL.
    ORM: User.query.join(Booking).filter(Booking.status=='ok').all() ya user.bookings relationship (lazy join).

    Exampleblacklisted company ke drives pe applicants — Application join Drive join Company.

    Viva: jo relationship use ki usko 'ORM join' bolo, raw SQL tab jab examiner explicitly SQL maange.

  6. 6
    Types of join
    Times asked 2
    Official solution

    SimpleJOIN do tables ko related columns se milata hai.

    INNER JOIN: dono taraf match. LEFT JOIN: left ki saari rows, right match na ho to NULL.
    ORM: User.query.join(Booking).filter(Booking.status=='ok').all() ya user.bookings relationship (lazy join).

    Exampleblacklisted company ke drives pe applicants — Application join Drive join Company.

    Viva: jo relationship use ki usko 'ORM join' bolo, raw SQL tab jab examiner explicitly SQL maange.

  7. 7
    Asked question on session
    Times asked 2
    Official solution

    SimpleFlask session request-across data store karta hai, generally signed cookie mein.

    session['user_id'] = user.id
    uid = session.get('user_id')
    session.clear() # logout

    Type: dictionary-like (SecureCookieSession). SECRET_KEY se sign — tamper detect.
    Store kahan: default client cookie. Server-side Redis/filesystem bhi laga sakte ho.
    Browser storage: cookies, localStorage, sessionStorage. Session cookie tab-close pe jaa sakti hai.
    Remember-me: permanent session ya alag token cookie.

  8. 8
    What is template inheritance?
    Times asked 3
    Official solution

    Simpleextends poora layout inherit karta hai, include chhota piece insert karta hai.

    extends: child page base.html ka structure use karti hai, blocks override karti hai. Ek hi parent.
    include: navbar.html / footer.html jahan chaho insert. Kai baar use ho sakta hai.

    base.html:

    {% block content %}{% endblock %}
    
    home.html:
    {% extends 'base.html' %}
    {% block content %}<h1>Home</h1>{% endblock %}
    
    {% include 'navbar.html' %}  → navbar har page pe

    Fayda: header/footer ek jagah, change once — saari pages update. MAD1 mein almost har project use karta hai.

  9. 9
    In search functionality, asked me to search campaigns and then asked me to show the length like how many campaigns are found?
    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.

  10. 10
    CSS head, h3, h5, etc.
    Times asked 1
    Official solution

    SimpleCSS page ko style karti hai — color, layout, font. HTML structure, CSS look.

    h1 { color: navy; } .card { padding: 16px; } #logo { width: 80px; }
    Selectors: element (h3), class (.btn), id (#nav), pseudo (:hover).
    display:flex — ek line/row mein items, justify-content/align-items se center.
    Multiple classes: saari apply, conflict pe specificity/order.
    Responsive: media queries / Bootstrap grid. Bina CSS limited (old tables) — practically CSS chahiye.

  11. 11
    What if a hacker tries using SQL injections in the flask forms?
    Times asked 2
    Official solution

    SimpleSQL Injection user input ko SQL bana ke DB hack. ORM/parameterized queries se bachao.

    Galat: f"SELECT * FROM user WHERE email='{email}'" # email = ' OR 1=1 --
    Sahi: User.query.filter_by(email=email) # bound parameters
    Raw: db.session.execute(text('SELECT * FROM user WHERE id=:id'), {'id': i})
    Extra: least privilege DB user, input validate, error messages generic.

  12. 12
    CSRF
    Times asked 2
    Official solution

    SimpleCSRF = Cross-Site Request Forgery — logged-in user ke browser se attacker site hidden form submit karwati hai.

    FixCSRF token hidden field, server verify. Flask-WTF: {{ form.hidden_tag() }}

    SameSite cookies bhi help. GET pe destructive action mat rakho.

  13. 13
    If I change the url_for(home) to home_page, what will happen?
    Times asked 1
    Official solution

    Simpleurl_for Flask function/endpoint name se URL generate karta hai, hardcode path nahi.

    url_for('home') → '/'
    url_for('edit_user', id=5) → '/user/5/edit'
    Templates: href="{{ url_for('login') }}"

    Parameter: endpoint ka naam (function name), plus route variables.
    Galat naam: BuildError. Route rename karo to url_for automatic naya path dega — yahi fayda hai.

  14. 14
    Cascade delete in db
    Times asked 2
    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).

  15. 15
    What if I login, then close the tab and reopen it? Will I still be logged in?
    Times asked 2
    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.

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