Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level2_142

Share your experience Add your viva experience here
116 Questions
2 Sets
0 Topics
26 Reviews
Tips for this examiner: Be confident explain your project in details, proctor is very chill guy

Student reviews

SD MAD1

prepare well, give good demo

Questions remembered
  1. Demo of entire app with every functionality
  2. how many tables are present in models.py what are they
  3. tell me the frameworks used
  4. what are https methods name and describe
  5. can you swap get and post
  6. what is restful, restful api, what are the features
  7. explain MVC
  8. difference b/w 2 tier and 3 tier architecture
  9. code in notepad - write a route of taking the user email from a form and on clicking submit button, will lead to another page displaying the user's phone number
Bruce Wayne MAD1

He is very polite and dosent interfere.Refer questions asked by him in this sheet thats enough .Even for coding questions he asked the same qn from the sheet but with a minor change in coding part.

Questions remembered
  1. Level1
  2. Asked to show ID card, Github repo
  3. Asked to download project from portal
  4. Demo of app (Asked to show each and every features of app)
  5. Show me your Models (Interested in database )
  6. Theory Questions:
  7. Frameworks used
  8. MVC
  9. HTTPS Methods
  10. 2-Tier VS 3-Tier Architecture
  11. Difference between Delete and Truncate
  12. Coding questions:
  13. Asked me to create a route that accepts email input from HTML form and display whether the email is present in the database or not by using another HTML page (only routes and html no need for models).
N/A MAD1

Chill guy and giving hints

Questions remembered
  1. Show id
  2. Download project and run the application
  3. Can you change the resume? Blacklist any student and try to login that student
  4. Explain models.py
  5. MVC
  6. Create a route to take input and display it on another html page. Create form and display page also
  7. HTTP vs HTTPS
  8. HTTP methods
Sheet response MAD1

Shared viva questions from response sheet: Level1; Asked to show ID card, Github repo; Asked to download project from portal

Questions remembered
  1. Level1
  2. Asked to show ID card, Github repo
  3. Asked to download project from portal
  4. Demo of app (Asked to show each and every features of app)
  5. Show me your Models (Interested in database )
  6. Theory Questions:
  7. MVC
  8. HTTPS Methods
  9. 2-Tier VS 3-Tier Architecture
  10. Coding questions:
  11. Asked me to create a route that accepts input from HTML form and display it by using another HTML page
Sheet response MAD1

Level 1 is easy if base is strong
Know what part of your code does what

Questions remembered
  1. Level 1 Viva
  2. Download submission from portal
  3. Demo
  4. No of tables in models.py and what are they?
  5. Frameworks used
  6. What is Sqlalchemy ?
  7. What is Jinja2?
  8. All purposes of using jinja
  9. Write a basic route in notepad
  10. Then apply password must be of 8 digits with special characters both front end and back end validation
Sheet response MAD1

i feel as if the proctors are looking for anything that could make the student eligible to pass, they are so patient and listening and just learn your project and prove them that you learnt.

Questions remembered
  1. i explained my portal to which he was listening carefully and was silent to an extent where i thought if my meet disconnected.
  2. then he asked me to edit the drive in the company dashboard
  3. to blacklist student from the admin dashboard
  4. he asked me to write a route that prints my name in the notepad
  5. he asked me to go to my models.py and asked me what is MVC and to list the frameworks all used for this project
  6. He asked me what is JINJA used for apart from these he asked me to show the github and show the collaborator, and checksum and id card.
Sheet response MAD1

Shared viva questions from response sheet: -LEVEL 1 VIVA - PLACEMENT PORTAL; Show ID Card; -Run Checksum or download directly from portal and use

Questions remembered
  1. -LEVEL 1 VIVA - PLACEMENT PORTAL
  2. Show ID Card
  3. -Run Checksum or download directly from portal and use
  4. -Explain full project
  5. -Asked to see some features in company side, admin and student side.
  6. -what techstack was used and MVC
  7. -have you implemented ORM
  8. -show your models, how many are there
  9. - asked me to open notepad and write a code for a small app that takes my name and displays it in another page. had to write the app route, input page html and output page html
Sheet response MAD1

learn your project well and be ready to explain your flow

Questions remembered
  1. LEVEL1 viva:
  2. DEMO- Q
  3. first asked to show ID and repo
  4. then checksum or download project from portal and open in editor
  5. then run project and show the demo
  6. asked around 5 general flow questions like- if company blacklisted can they still log in? etc
  7. asked to show all the different roles in detail in the demo
  8. then asked to explain models file
  9. THEORY-Q
  10. asked MVC, RESTful, APIs, use of Jinja2, explain tech stack and why they were used
  11. CODE-Q
  12. frontend validation: change the password requirement to minimum 8 characters
  13. backend validation: ensure there is a special character in the password and show error msg if not present
anonymous MAD1

Friendly guy, be confident and answer, go through the questions in the sheet

Questions remembered
  1. Level 1 Viva:
  2. ID Card, git repo, project download
  3. Full app Demo
  4. what database have used
  5. ORM and what and how ORM is used
  6. MVC architecture and how it is implemented in project
  7. explain your models.py
  8. asked to created a page with input for a text and a submit button - when submit is clicked it should render another page showing the entered text (no code changes asked)
Vignesh N MAD1

The questions asked were mostly from Excel for this proctor. See that and also be thorough with your code and functionalities

Questions remembered
  1. - ID card and collaborator in GitHub
  2. - Demo of project
  3. - I had used remember me feature. So asked how it worked and asked to show demo of it
  4. - MVC Architecture and show where it is implemented
  5. - Create a new route and template to add a input field and submit button so that it will reroute to another page where the input data is displayed
  6. - Asked which ORM and Database was used
  7. - Asked to rate my project from 1-10
Vithyasagar MAD1

Chill guy. Joined late. Very patient. Js be confident with your answer. Prepare the questions in this form alone. He ended by saying all the best for Level2.

Questions remembered
  1. ID Card
  2. Github to check collaborator
  3. Demo of the project
  4. Asked me to book appointments on the same date and time under same doctor so that it can't be booked
  5. Then he asked me to create a new app route with taking a field as input, and with a submit button.
  6. Explain different HTTP Methods
  7. Which ORM you used and why.
  8. Which database you used
  9. Is HTTP stateless or stateful and what is a state He asked me to rate my project on a scale on 1 to 10 That's it
Padma Kumar MAD1

Nice and cool proctor.
Just prepare the questions of this proctor in the viva sheet. It's more than enough.
Make sure to prepare that coding question also because it is asked frequently by this proctor.

Questions remembered
  1. This is my MAD1 project level 1 viva.
  2. First asked me to show the id card and github collab.
  3. Asked me to download the project from the portal.
  4. Full demonstration of the project.
  5. Asked me to write a code for a simple app which takes one input and a submit button in one page, after submitting it will be displayed in another page. That's all. No theory questions for me.
Shruti MAD1

He should have 10 minutes late
I took around 5 to 10 minutes to complete the code but he said being an IIT student we have to completed within 2 to 5 minutes Max
He said to prepare well for viva level 2

Questions remembered
  1. What are the models used show them in the code
  2. Basic crude operations demonstration (just implementation of our project)
  3. Asked to create a route between to HTML pages one to get the input and the other to display the output using submit button
Somya MAD1

Proctor is chill guy, you should have complete understanding of your project and should be able to demonstrate the project completely. Be confident

Questions remembered
  1. Viva level 1 checksum was not working so i downloaded it from portal
  2. Id card, git repo
  3. Demo of the project
  4. MVC framework
  5. write a code to input value and submit button
  6. which orm have you used?
  7. How much percentage did you used AI/LLM?
  8. What kind of help did you took from the AI/LLM?
  9. show the model.py and the jinja templating used?
Sudarshan MAD1

Don't forget basic code flow even in level 1 viva , make sure your laptop won't lagg

Questions remembered
  1. MVC Architecture,DOM,CRUD operations , ORM, What database you have used
  2. Write a code in which you have one page with input and submit button and after filling it should redirect to another page with showing input text on page
Anonymous MAD1

Shared viva questions from response sheet: Show ID Card; Checksum - Mine didn't matched at the moment, it matched when i checked it when preparing, but not then, he asked to download from Viva Portal and run it directly without checksum; Demo of my project

Questions remembered
  1. Show ID Card
  2. Checksum - Mine didn't matched at the moment, it matched when i checked it when preparing, but not then, he asked to download from Viva Portal and run it directly without checksum
  3. Demo of my project
  4. He asked to create a page with 2 input fields ( Integer ) + submit button, on submit, route to new page there show sum of those input fields
Siddharth MAD1

You gotta be prepared for some heavy theoretical questions

Questions remembered
  1. Same questions that students have mentioned earlier in this sheet
Shiva kumar MAD1

Be prepared to make few code changes..

Questions remembered
  1. completed viva L1 in 35 min
  2. showed id card
  3. took project from portal
  4. when implementing he told to edit the parking lot details such that no of spots is 0
  5. but my code doesn't allow to make 0 spots in a lot
  6. so he told to change the code to allow 0 spots
  7. next told to write a route such that a user will give input and submit button.
  8. what ever text input will be given the user can see the text
  9. told to do implement whole project
  10. completed
Sheet response MAD1

The proctor was bit tough and if you got this proctor you have to be very specific to the answer you might feel that he is rude. Just know your project thoroughly.

Questions remembered
  1. REST 2.Principle of rest
  2. can we fetch data using GET method
  3. can we fetch data using POST method
  4. what ORM
  5. Which ORM you have used
  6. Why you have used jinja
  7. What is framework
  8. could you edit the code and make the column instead of rows.
Sheet response MAD1

This proctor was polite and he stuck to the questions as mentioned in previous rows. According to me, he wanted me to be quick and finished the viva within 13-15 minutes


- Know your code
- Be quick and confident. Open ID, GitHub repo , VivaBooking portal beforehand.
- Have reference txt file with all necessary credentials and example data
- Being to the point is good but being a bit explanatory will be helpful. Stick to 3-5 lines
- Learn about GET , POST, DELETE etc requests and can we fetch, modify or send data with each type of request, for this proctor. He will definitely ask one for sure.

Questions remembered
  1. Level 1 Viva
  2. - Show ID
  3. - Show github repo with collaborator
  4. - Asked about AI usage and whether I have mentioned it in report
  5. - Download Submission
  6. - No need for checksum
  7. Asked for following demo (Didn't expect full demo just asked specific things)
  8. - Admin Login
  9. - CRUD of Parking Lot
  10. - View booked spot after user books it
  11. - Admin Summary before and after booking spot
  12. - Registered Users
  13. - User Dashboard
  14. - User : Book and Release spot
  15. - User Summary before and after booking spot
  16. One mistake I made was I booked and released spot in short duration and price per hour was less making total price 0. Asked explanation for it
  17. Code related
  18. - Show models.py
  19. - Show where is admin created in code
  20. - Asked to show where Jinja2 templating was used with specific lines
  21. - That's it did not ask anything else.
  22. Theory Questions
  23. - What is ORM
  24. - What is Jinja2 templating (Asked while explaining the code)
  25. - Can GET request be used to send data
  26. - Can POST request be used to fetch data
  27. - Can we use DELETE request to fetch data (I don't remember this one exactly but it was about DELETE request and about fetching, modifying or sending data)
  28. - What is Flask and when is it preferred
  29. - What frameworks have you used in your project
Sheet response MAD1

Very nice and well-spoken proctor. Just make sure your code works, and you know basic things about your code. Be confident and polite.

Questions remembered
  1. - He asked to show ID card
  2. - He asked to download the submission and run it.
  3. - Asked to look at GitHub collab
  4. - Asked how much AI i've used in my code and whether I wrote it in my report (I didn't write, I apologised and told him I used AI to debug errors)
  5. - Asked me to show CRUD operations.
  6. - Asked me open admit and make a lot, delete and edit a lot.
  7. - Go to user login and book a spot.
  8. - how are you calculating the price
  9. - What is cascade?
  10. - how and where did you make the admin ?
  11. - Can you send data through GET ? is it recommended
  12. - Can you fetch data using POST ? is it recommended
  13. - thank you, that's it from my side.
  14. - finished in 20 mins.
Priyanshu Singh MAD1

Be calm and thorough with your project. Also have the knowledge of MAD1 Theory.

Questions remembered
  1. Level2_142
  2. -Show ID
  3. -Download project from portal or perform checksum
  4. -Show all CRUD operations.
  5. -How you added admin into database.
  6. -How you differentiated User and Admin.
  7. -Show your summary tab.
  8. -How you calculated estimated cost.
  9. -HTTP Methods.
  10. -Why not Django why Flask.
  11. -can we fetch data using POST.
Anagha MAD1

Proctor was chill

Questions remembered
  1. Show ID and checksum
  2. -(If no checksum)Download project from iitm portal and perform crud operation.
  3. -he asked to show specific features like show summary in user /admin dashboard.
  4. -what is cascade ?
  5. -why normalisation , is your db normalised
  6. -Different types of normalisation , and in which NF is your db in ? Explain why
  7. -what is REST? Then restful API ? Why is it stateless
Sriram MAD1

Just be clear with the concept! They are expecting basic understanding of our project!

Questions remembered
  1. Level2_142 1)First ID card Verification & Asked to Start the Checksum
  2. Asked to Perform CRUD operation
  3. related to ORM
  4. Related to Jinja2, and asked to show where I have used in my project
  5. What is Cascade? Asked to say the query, and other than delete what we can do!
  6. how many tables I have used in my project
  7. about MVC, asked to show where I have used it in my Project
Sheet response MAD1

Shared viva questions from response sheet: level1; level2_142; Perform all CRUD operations as an admin. and general demo

Questions remembered
  1. level1
  2. level2_142
  3. Perform all CRUD operations as an admin. and general demo
  4. What is Cascade? Can it only be used for delete?
  5. What database have you used?
  6. What ORM have you used? What is ORM, and why is it used?
  7. Show your models, Jinja2 templates.
  8. Is your database normalized? Explain the different normal forms...
  9. level2:
  10. level1_119
  11. Explain the directories in your project.
  12. What is app.config["SECRET_KEY"]? What happens if it is not there?
  13. What n why app.app_context().push()?
  14. What is app = Flask(__name__)? Why do we use __name__?
  15. What is the datatype of x in your code? (x = XXX.query.filter_by(...))
  16. Pointed out a route and told to explain
  17. then he asked smth with the anchor tag on post n get...
  18. Then In CSS,
  19. what is the difference between # and .
  20. Run the application as Admin.
  21. List them the data in alphabetical order in the table
  22. Format the data in uppercase.
  23. Have you heard of RESTful? What is it? What is an API? (I have not implemented it)
  24. What is MVC?
  25. What is ORM?
Divyansh MAD1

Be confident explain your project in details, proctor is very chill guy

Questions remembered
  1. This is Mad-1 Level-1 viva
  2. Show ID card, Github repo , collaborator.
  3. Asked Detailed explanation about the project.
  4. Uses of cascade in db, is it only used for delete?
  5. what is ORM?
  6. what is restful api? is it stateless or stateful ?

Approved viva sets

  1. 1
    Show your ID card.
    Times asked 22
    Official solution

    SimpleCamera pe college ID — naam photo match. Identity viva ki pehli gate.

    Pehle se haath mein, glare nahi. Examiner screenshot. Phir GitHub + portal ZIP run.

    Name GitHub/portal se mismatch red flag.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Project example: ID dikhao, bolo roll/name, phir screen share repo.

    Viva tipPehle 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.
    Times asked 9
    Official solution

    SimpleRepo = evidence tumne kaam kiya: commits, collaborators, README.

    Regular messages, last-day dump nahi. Private access pehle de do. Main branch submitted ZIP se match.

    Collaborator settings. Commit dates.

    Example

    Settings → Collaborators: apna + teammate (agar allowed).
    Commits: regular messages, last-day dump nahi.

    Project example: Settings → Collaborators. git log --oneline. README run steps.

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

  3. 3
    Download the project from the portal and run it.
    Times asked 6
    Official solution

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

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

    Checksum maange to hash. Uncommitted files mat dikhana.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Suggested flow1) ZIP
    2) Extract
    3) Redis + venv + pip
    4) npm/vite
    5) flask + celery worker + beat

    Project example: Submitted zip run. README commands copy.

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

  4. 4
    Explain your project statement.
    Times asked 1
    Official solution

    SimpleProblem: users book X admin manage Y. Your instance parking/jobs/tickets. Explain project statement.

    1 minute.

    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: README first paragraph.

    Project example: README first paragraph.

  5. 5
    Demonstrate all CRUD operations.
    Times asked 3
    Official solution

    SimpleCRUD 4 operations live: add list edit delete, list refresh.

    REST mapping. Related bookings after delete ready answer.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Example

    POST /api/venues → add
    GET /api/venues → list
    PUT /api/venues/3 → edit
    DELETE /api/venues/3

    Project example: Admin venues. Postman + UI dono.

    Viva tipUpdate ke baad list refresh hoke naya data dikhe. Delete ke baad related bookings kya hoti hain, ready raho.

  6. 6
    Demonstrate the search functionality.
    Times asked 4
    Official solution

    SimpleSearch demo cases.

    See earlier essay.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Example

    q = request.args.get('q', '').strip()
    items = Venue.query.filter(Venue.name.ilike(f'%{q}%')).all()
    return jsonify([v.serialize() for v in items])

    Project example: UI + API.

    Viva tipEmpty search, no-match, case-insensitive (ilike) teen cases dikhao.

  7. 7
    Demonstrate all core features of the application.
    Times asked 1
    Official solution

    SimpleDemo 5–7 min ki kahani: saari roles, koi milestone skip nahi, bolte-bolte dikhao.

    Examiner list tick karta hai. Crash ho to panic nahi — terminal error padho.

    Code tab kholna jab poochhein. Extra uncommitted features mat dikhana agar portal ZIP mein nahi.

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

    Project example: Jo statement/parking/jobs/tickets hai uske user+admin journeys.

    Viva tipBol: 'Yahan overbooking rokta hoon'. Mandatory features pehle, polish baad.

  8. 8
    Demonstrate backend jobs (scheduled and user-triggered).
    Times asked 1
    Official solution

    SimpleButton POST .delay() 202. Poll status. Beat nahi, worker haan.

    Export vs daily reminder difference.

    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: Export CSV button. Network 202.

    Project example: Export CSV button. Network 202.

  9. 9
    Demonstrate CSV export.
    Times asked 2
    Official solution

    SimpleClick → Celery → worker CSV → email/download. Columns verify.

    csv module. Auth required. Don't freeze UI — 202 + poll.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Example

    @celery.task
    def export_venues_csv(user_id):
        rows = Venue.query.all()
        # csv.writer, mail.send
        return 'ok'

    Project example: Admin export venues. MailHog attach ya file open.

    Viva tipNetwork tab mein job trigger API dikhao, phir MailHog/file open karke columns verify karo.

  10. 10
    Demonstrate caching.
    Times asked 1
    Official solution

    SimpleMiss print/DB, hit silent, timeout expiry, write delete.

    Best viva demo Redis.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Example

    @cache.cached(timeout=30, key_prefix='venues')
    def get_venues():
        print('DB queried')
        return jsonify(...)

    Project example: GET twice + POST + GET.

    Viva tipprint() ya SQL echo se miss/hit dikhao. Timeout 10–30s karke expiry bhi demo kar sakte ho.

  11. 11
    Demonstrate daily reminders and monthly reports.
    Times asked 1
    Official solution

    SimpleLive jobs: Redis, worker, beat, crontab abhi, logs + email/CSV.

    Scheduled vs user-triggered dono dikhao. Missing feature honestly.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Suggested flow1) redis
    2) worker
    3) beat
    4) crontab now
    5) logs + MailHog

    Example

    CELERY_BEAT_SCHEDULE = {
      'daily-reminder': {
        'task': 'jobs.daily_reminder',
        'schedule': crontab(hour=18, minute=0),
      },
    }

    Project example: Change schedule current time. MailHog. Export button 202.

  12. 12
    Show how frontend and backend are connected.
    Times asked 1
    Official solution

    SimpleClick → Vue method → fetch → Flask auth → DB → jsonify → Vue state → template. Celery: delay Redis worker email.

    Button until backend completes: include jobs path if export.

    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: Book button sequence 6 steps aloud.

  13. 13
    Extend the deadline of an existing entity (project-specific live change).
    Times asked 1
    Official solution

    SimplePATCH entity.deadline future admin. Extend deadline existing entity.

    Validate date.

    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: admin edit.

    Project example: admin edit.

  14. 14
    Show the generated authentication token.
    Times asked 1
    Official solution

    SimpleLogin Network JSON token. LS. jwt.io payload. Don't paste secret public.

    Show generated authentication token.

    Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"

    Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
    Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).

    MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX — asli deny backend pe.

    Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.

    Project example: Copy token jwt.io.

  15. 15
    Show where the authentication token is generated.
    Times asked 1
    Official solution

    SimpleLogin/register success return create_access_token. Show generated token Network + LS.

    Where tokens generated.

    Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"

    Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
    Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).

    MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX — asli deny backend pe.

    Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.

    Project example: login response.

  16. 16
    Show where the token is stored on the frontend.
    Times asked 1
    Official solution

    SimpleDevTools Application LS. Key name. Logout clears. How JWT stored browser.

    Show where token stored frontend.

    Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"

    Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
    Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).

    MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX — asli deny backend pe.

    Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.

    Project example: Application tab.

  17. 17
    What security mechanism have you used?
    Times asked 2
    Official solution

    SimplePassword hash, JWT, RBAC, CORS whitelist, HTTPS prod, no secrets Vue.

    Least privilege. Don't CORS *.

    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: List 4 you actually coded.

    Project example: List 4 you actually coded.

  18. 18
    Is auth_required() necessary if roles_required() is already used? Can they be combined?
    Times asked 1
    Official solution

    Simpleroles_required usually login imply. Extra auth_required explicit stacking OK.

    Is auth_required necessary if roles_required? Can combine? Yes.

    Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"

    Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
    Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).

    MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX — asli deny backend pe.

    Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.

    Project example: We stacked both admin.

  19. 19
    Vue CLI vs Vue CDN.
    Times asked 6
    Official solution

    SimpleCDN = Vue script tag se, jaise pen drive. CLI/Vite = poori factory (SFC, npm, bundle).

    CDN: no build, chhote apps, exam PC pe Node nahi to bhi chal. Weak: no .vue compile, 3rd-party cache, scale/team.

    CLI/Vite: Single File Components, env, code-split, production dist/. Scalable.

    Examiner 'which + why' — jo use kiya wahi justify, doosra naam rato mat.

    Example

    <!-- CDN -->
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    
    # Vite
    npm run dev
    npm run build

    Project example: CDN: index.html unpkg vue. CLI: package.json, npm run serve / vite.

    Viva tipCDN scalable large teams ke liye weak (no SFC compile, caching 3rd party). Examiner 'which + why' poochta hai — jo use kiya wahi justify karo.

  20. 20
    What are Vue Lifecycle Hooks?
    Times asked 5
    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.

  21. 21
    Explain each lifecycle hook.
    Times asked 1
    Official solution

    SimplebeforeCreate/created init. beforeMount/mounted DOM. beforeUpdate/updated patch. beforeUnmount/unmounted cleanup. setup composition.

    Explain each lifecycle hook. Which used: mounted + unmount cleanup.

    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: Don't claim unused beforeCreate.

  22. 22
    What are Vue Directives?
    Times asked 1
    Official solution

    SimpleDirectives Vue ke special attributes — HTML ko superpower.

    v-if/else/show, v-for, v-bind (:), v-on (@), v-model, v-html (XSS), v-cloak, v-slot.

    :src = v-bind:src. @click = v-on:click.

    Custom directives bhi (v-focus) — course basics kaafi.

    Example

    <p v-if="ok">Yes</p>
    <li v-for="u in users" :key="u.id">{{ u.name }}</li>
    <input v-model="email">
    <img :src="url">

    Project example: List v-for :key. Form v-model. Admin v-if. Image :src.

    Viva tip: src ke liye v-bind:src ka shorthand. @click = v-on:click.

  23. 23
    What is v-model?
    Times asked 4
    Official solution

    Simplev-model do tarfa glue: input likho to data, data badlo to input.

    Shorthand :value + @input. Forms ke liye. Display ke liye {{ }} / v-bind kaafi.

    v-model.number number input. checkbox boolean. select string.

    Directives Vue ke special attributes hain — HTML ko superpower: v-if/v-show, v-for, v-bind (:), v-on (@), v-model.

    v-if DOM se hataata/jodta. v-show sirf CSS display. Rare/permission: v-if. Bar-bar toggle: v-show. v-model two-way form. v-bind one-way JS→attribute.

    :key v-for pe zaroori warna Vue galat reuse. v-html XSS. Secret UI ke liye sirf v-if kaafi nahi — API 403 bhi.

    MAD1 Jinja server HTML. MAD2 yeh directives browser mein reactive.

    Example

    <input v-model="email">
    <!-- same as -->
    <input :value="email" @input="email = $event.target.value">

    Project example: Login email/password v-model, submit pe JSON POST.

  24. 24
    Difference between one-way and two-way binding.
    Times asked 1
    Official solution

    SimpleTwo-way = UI aur data sync. Vue mein v-model. One-way mustache/v-bind.

    Parent→child props one-way. Child change emit se. v-model on component = prop + emit update.

    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: Booking qty input v-model. Seats left sirf {{ available }}.

  25. 25
    What is Vuex?
    Times asked 3
    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.

  26. 26
    What is State Management?
    Times asked 2
    Official solution

    SimpleShared state across components — Vuex/Pinia. Props hell avoid.

    How share globally.

    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: token user cart.

    Project example: token user cart.

  27. 27
    What is an async function?
    Times asked 1
    Official solution

    Simpleasync hamesha Promise. return 1 → Promise.resolve(1).

    What async returns. Incorrect use SyntaxError or unresolved promise.

    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: async mounted.

    Project example: async mounted.

  28. 28
    What does an async function return?
    Times asked 1
    Official solution

    SimpleAlways a Promise.

    Even return 5.

    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: Don't console.log(asyncFn()) expecting 5 without await.

    Project example: Don't console.log(asyncFn()) expecting 5 without await.

  29. 29
    Difference between synchronous and asynchronous functions.
    Times asked 1
    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.

  30. 30
    What is a Promise?
    Times asked 3
    Official solution

    SimplePromise IOU hai: abhi nahi, baad mein value ya error.

    States: pending, fulfilled, rejected. fetch() promise return. then/catch/finally.

    async function hamesha Promise return. await usko unwrap. Galat: await without async; missing await to Promise object milta data nahi.

    JS browser ki language. const rebind nahi, let block. Arrow () => this lexical.

    Promise: pending/fulfill/reject. async/await usko seedha padhne jaisa. try/catch await pe. Yeh Celery nahi — Celery Python worker.

    fetch native AJAX. array.filter/map computed lists. Vue data reactive; plain JS DOM querySelector se manual.

    Example

    fetch('/api/hello')
      .then(r => r.json())
      .then(d => console.log(d))
      .catch(err => console.error(err))

    Project example: fetch venues .then json. Ya async mounted await.

  31. 31
    Explain the stages/states of a Promise.
    Times asked 1
    Official solution

    Simplepending → fulfilled value / rejected error. then catch finally.

    async/await sugar same states.

    JS browser ki language. const rebind nahi, let block. Arrow () => this lexical.

    Promise: pending/fulfill/reject. async/await usko seedha padhne jaisa. try/catch await pe. Yeh Celery nahi — Celery Python worker.

    fetch native AJAX. array.filter/map computed lists. Vue data reactive; plain JS DOM querySelector se manual.

    Project example: Network pending then 200.

    Project example: Network pending then 200.

  32. 32
    What are Higher-Order Functions? Give an example.
    Times asked 1
    Official solution

    SimpleHOF: function in or out. map filter forEach.

    multiply by 70: .map(x => x*70). filter score.

    JS browser ki language. const rebind nahi, let block. Arrow () => this lexical.

    Promise: pending/fulfill/reject. async/await usko seedha padhne jaisa. try/catch await pe. Yeh Celery nahi — Celery Python worker.

    fetch native AJAX. array.filter/map computed lists. Vue data reactive; plain JS DOM querySelector se manual.

    Example

    nums.map(n => n * 70)
    users.filter(u => u.score > 15)

    Project example: Live array tasks.

  33. 33
    What happens if async is used incorrectly?
    Times asked 1
    Official solution

    SimpleForgot await, uncaught reject, setState after unmount, race.

    try/catch. loading flag.

    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: Show a catch you wrote.

    Project example: Show a catch you wrote.

  34. 34
    What happens when a parent record is deleted?
    Times asked 1
    Official solution

    SimpleDepends ondelete: CASCADE children jaate, RESTRICT fail, SET NULL.

    Bookings/venue: business. Soft-delete safer. Doctor deleted similarly.

    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: Explain YOUR models ondelete. Don't guess opposite cascade.

  35. 35
    Explain Cascading (ON DELETE CASCADE).
    Times asked 1
    Official solution

    SimpleCASCADE = parent gaya to bacche bhi. Restrict = pehle bacche sambhalo.

    ON DELETE CASCADE SQL. SQLAlchemy cascade='all, delete-orphan' collection se orphans.
    Opposite auto nahi — child delete se parent nahi marata.

    Venue delete: bookings restrict (safer viva) ya cascade+cancel policy. Examiner design poochta hai.

    ON UPDATE CASCADE PK change — rare. SET NULL, RESTRICT bhi options.

    Example

    shows = db.relationship('Show', cascade='all, delete-orphan', back_populates='venue')

    Project example: Show belongs Venue delete-orphan. Booking venue pe restrict — 'reassign first'.

    Viva tipVenue delete pe bookings: restrict (mat delete) ya cascade+refund policy. Examiner design poochta hai. Cascade UPDATE bhi hota hai (PK change) — rare.

  36. 36
    Can cascading be used for operations other than DELETE?
    Times asked 1
    Official solution

    SimpleON UPDATE CASCADE, SET NULL, RESTRICT besides DELETE.

    Can cascading other operations. Yes.

    ORM objects ko tables se map karta hai — raw SQL kam. SQLAlchemy MAD2 default.

    class User(db.Model) + Column + relationship. query.filter_by / db.session.get. Fayda: portable SQLite→Postgres, injection se safer. Nuksaan: N+1, complex SQL.

    SQLite file, zero server — course friendly. Postgres scale. Relationships: FK, backref, lazy/joinedload, cascade on delete. Constraints unique/not null integrity.

    Bookings source of truth DB, Redis cache copy.

    Project example: We used delete cascade/restrict.

  37. 37
    Show where Celery is configured.
    Times asked 1
    Official solution

    SimpleTask function, beat dict, delay() call, worker+beat terminals, MailHog/CSV.

    App context DB. Args serializable. How many jobs: reminder, monthly, export — gino honestly.

    Celery Python ka distributed task queue — HTTP request ko 10s email/CSV ke liye mat rokna.

    Flow: Flask .delay() → Redis broker → Worker execute. Beat alag process hai (clock): crontab padhke due time pe queue mein daalta hai. Beat khud mail nahi bhejta; Worker haath hai.

    MAD2 typical: daily reminder (Beat), monthly report (Beat), user Export CSV (button, Beat nahi). JS async/await browser event loop hai, Celery server-side process — mix mat karo.

    Demo: tin terminals — redis-server, celery worker, celery beat — plus Flask. MailHog :8025 inbox. Result backend se task SUCCESS poll optional.

    Project example: tasks.py + config schedule + POST export.

  38. 38
    Show the Celery tasks.
    Times asked 1
    Official solution

    SimpleTask function, beat dict, delay() call, worker+beat terminals, MailHog/CSV.

    App context DB. Args serializable. How many jobs: reminder, monthly, export — gino honestly.

    Celery Python ka distributed task queue — HTTP request ko 10s email/CSV ke liye mat rokna.

    Flow: Flask .delay() → Redis broker → Worker execute. Beat alag process hai (clock): crontab padhke due time pe queue mein daalta hai. Beat khud mail nahi bhejta; Worker haath hai.

    MAD2 typical: daily reminder (Beat), monthly report (Beat), user Export CSV (button, Beat nahi). JS async/await browser event loop hai, Celery server-side process — mix mat karo.

    Demo: tin terminals — redis-server, celery worker, celery beat — plus Flask. MailHog :8025 inbox. Result backend se task SUCCESS poll optional.

    Project example: tasks.py + config schedule + POST export.

  39. 39
    Show user-triggered tasks.
    Times asked 1
    Official solution

    SimpleButton POST .delay() 202. Poll status. Beat nahi, worker haan.

    Export vs daily reminder difference.

    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: Export CSV button. Network 202.

    Project example: Export CSV button. Network 202.

  40. 40
    Show scheduled tasks.
    Times asked 1
    Official solution

    SimpleLive jobs: Redis, worker, beat, crontab abhi, logs + email/CSV.

    Scheduled vs user-triggered dono dikhao. Missing feature honestly.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Suggested flow1) redis
    2) worker
    3) beat
    4) crontab now
    5) logs + MailHog

    Example

    CELERY_BEAT_SCHEDULE = {
      'daily-reminder': {
        'task': 'jobs.daily_reminder',
        'schedule': crontab(hour=18, minute=0),
      },
    }

    Project example: Change schedule current time. MailHog. Export button 202.

  41. 41
    Change the cache timeout and demonstrate cache expiry.
    Times asked 1
    Official solution

    Simpletimeout=10, wait, third request phir miss. Restart after change.

    Or cache.delete after update faster.

    Examiner 2 cheezein: simple desi line + tumhare project ki exact file.

    Pehle ID, GitHub, portal ZIP. Phir run: Redis + Flask + worker + beat + Vue. Feature demo: login, RBAC, cache hit/miss, Celery mail, search.

    Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.

    Project example: Decorator timeout chhota temporarily.

  42. 42
    Create a new API that returns "Hello World".
    Times asked 1
    Official solution

    Simplejsonify(message='Hello World'). Create API Hello World. Write Hello World API.

    Simple.

    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

    @app.route('/api/hello')
    def hello():
        return jsonify(message='Hello World')

    Project example: GET /api/hello.

  43. 43
    Create an API that returns the current server time (time.time()).
    Times asked 1
    Official solution

    Simple

    jsonify(server_time=time.time()) epoch. Create API current server time. Display frontend refresh button clock.

    time vs datetime.

    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: GET /api/time Vue button.

  44. 44
    Create an API route and display the response on the frontend.
    Times asked 1
    Official solution

    SimpleFlask jsonify then Vue fetch display. CORS if ports differ. Create API display frontend.

    Connectivity test examiner loves.

    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: /api/hello + Hello.vue.

  45. 45
    Add a new Vue component that: Fetches data from the backend. Displays the response. Includes a button to fetch the data again.
    Times asked 1
    Official solution

    SimpleNew .vue button @click load data items fetch v-for. Route optional.

    Add new Vue component fetches...

    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: components/ApiBox.vue.

  46. 46
    Display a backend message ("Hello") on the frontend.
    Times asked 1
    Official solution

    SimpleGET /api/hello {message} Vue mounted {{ message }}. Fetch Hello World backend display.

    Display backend message Hello.

    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: Simplest full stack proof.

  47. 47
    Display the current server time on the frontend with a Refresh button.
    Times asked 1
    Official solution

    SimplesetInterval mounted clearInterval unmounted. Real-time clock. Display server time refresh optional.

    {{ now.toLocaleTimeString() }}.

    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

    data() { return { now: new Date() } },
    mounted() { this.t = setInterval(() => this.now = new Date(), 1000) }

    Project example: Clock.vue.

  48. 48
    What frameworks have you used in your project?
    Times asked 1
    Official solution

    SimpleHar lib ek line why — list 40 mat.

    Flask, SQLAlchemy, JWT/Security, CORS, Caching+Redis, Celery, Vue+Router, Vuex/Pinia, Axios/fetch, Chart.js, Bootstrap.

    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: requirements.txt + package.json top 6 open karke bolo.

    Viva tipHar lib ek line why: CORS alag origin, Redis tez, Celery async, Chart.js dashboard.

  49. 49
    Explain models.py.
    Times asked 21
    Official solution

    Simplemodels.py tables ki blueprint. Har class ek table, har Column ek field.

    PK id, FK dusri table, relationship dono taraf, serialize() JSON (password mat).
    app factory db.init. resources APIs use models.

    Examiner random line: type, nullable, unique, ondelete.

    Suggested flow1) Har table → class
    2) PK id
    3) FK
    4) relationship()
    5) serialize()

    Example

    class Booking(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
        user = db.relationship('User', back_populates='bookings')

    Project example: User, Role, Venue/Show/Booking (ya Drive/Application). Draw 1-M.

    Viva tipExaminer random line poochhe: column type, FK, constraint. Draw 1-M / M-M on paper mentally.

  50. 50
    Explain resources.py.
    Times asked 1
    Official solution

    SimpleFlask-RESTful Resource GET POST. marshal fields. Alternative plain routes.

    Explain resources.py.

    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: class VenueAPI(Resource).

    Project example: class VenueAPI(Resource).

  51. 51
    How much AI did you use in your project?
    Times asked 1
    Official solution

    SimpleSach % + kahan + kaise verify + kya seekha. Report se contradict mat.

    Boilerplate vs business logic. Examiner process poochta. 'Sab ChatGPT' red flag.

    Verify: docs, run, edge case. Seekha: CORS, JWT exp, beat vs worker.

    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: Jo number form/PDF mein hai wahi. Example file jo AI se start kiya, khud debug kiya.

    Viva tipExaminer 'kya seekha / kaise check kiya' pe marks. 'Sab ChatGPT' red flag. Jo khud debug kiya woh story ready rakho.

  1. 1
    Show your College ID.
    Times asked 16
    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
    Show AI/LLM usage percentage and whether it is mentioned in the report.
    Times asked 1
    Official solution

    SimpleSach bolo. AI se boilerplate/docs theek, logic samajh ke explain karo.

    'Boilerplate aur CSS ke liye AI use kiya, models/routes khud design kiye. Report mein X% mention hai.'
    Line-by-line nahi explain kar paoge to examiner pakad lega. Documentation: official Flask/SQLAlchemy + course lectures.

  4. 4
    Download the project from the Viva Portal or perform checksum.
    Times asked 5
    Official solution

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

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

  5. 5
    Run the application.
    Times asked 8
    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.

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

  7. 7
    Perform all CRUD operations as Admin.
    Times asked 2
    Official solution

    SimpleCRUD = Create, Read, Update, Delete — kisi bhi resource ke 4 basic operations.

    Create: POST, db.session.add(new_user); commit() — register, add trek.
    Read: GET, User.query.all() — dashboard list.
    Update: POST/PUT, user.name = 'Ram'; commit() — edit profile.

    DeletePOST/DELETE, db.session.delete(obj); commit().

    REST mapping: POST create, GET read, PUT/PATCH update, DELETE delete.
    Admin panel mein yeh 4 dikhana viva demo ka common task hai.

  8. 8
    Show all user roles and their functionalities.
    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.

  9. 9
    Show the Summary/Dashboard.
    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.

  10. 10
    Show registered users.
    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.

  11. 11
    Show booking flow and booked records.
    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.

  12. 12
    Explain how the estimated cost/price is calculated.
    Times asked 1
    Official solution

    Examiner code pe ungli rakh ke poochta hai — panic mat karo, 4-line formula bolo.

    1) Yeh file/line kya role hai (model / route / template / config)?
    2) Input kahan se aata hai (form, URL <id>, session, JSON)?
    3) DB pe kya query/write?
    4) Output kya (render_template / redirect / jsonify)?

    Example

    @app.route('/book/<int:id>', methods=['POST']) — logged-in user session se, trek id URL se, Booking add, slots--, redirect history.

    Unknown line: imports (request, url_for, flash), decorators, if checks, commit — har keyword ka reason ready rakho.

  13. 13
    Test project-specific scenarios (e.g., duplicate booking prevention, blacklist login, remember-me feature).
    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.


    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.

  14. 14
    Explain the project directory/folder structure.
    Times asked 1
    Official solution

    SimpleRoutes/controllers URLs handle karte hain. app.py app banata hai, models.py data, templates/ views, static/ CSS-JS.

    Typical structure:
    app.py / __init__.py → Flask app, db.init, register blueprints
    models.py → tables
    routes.py / views → @app.route functions
    templates/ → Jinja HTML
    static/ → css, images
    instance/*.db → SQLite

    Ek route explain karne ka template:
    1) URL + methods 2) Auth/role check 3) Form/query se data 4) Business rule (duplicate, slots) 5) db.session 6) render ya redirect

    Example GET+POST same route: GET form, POST save.
    Data HTML se: form name= → request.form. Data HTML ko: render_template(..., items=query).
    Nayi .py file: import karke use karo, warna Flask ko pata nahi. Folder rename: imports/paths/templates check.

  15. 15
    Explain models.py.
    Times asked 21
    Official solution

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

    Viva mein file khol ke bolo:
    1) Kaunsi classes/tables hain (User, Role-specific, Booking...)
    2) Har table ka kaam 1 line
    3) Relationships: 1-1 / 1-M / M-M, backref, cascade, lazy
    4) Constraints: unique email, nullable, default status

    Example skeleton

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True, nullable=False)
        role = db.Column(db.String(20), default='user')
        bookings = db.relationship('Booking', backref='user', cascade='all, delete-orphan')

    ER diagram: rectangles entities, lines relationships, PK/FK mark. Schema = yahi structure.
    Tables create: db.create_all() ya migrations. SQLite file SQL viewer se dikha sakte ho.

  16. 16
    Show where Admin is created in the code.
    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.

  17. 17
    Explain a specific route.
    Times asked 2
    Official solution

    SimpleRoutes/controllers URLs handle karte hain. app.py app banata hai, models.py data, templates/ views, static/ CSS-JS.

    Typical structure:
    app.py / __init__.py → Flask app, db.init, register blueprints
    models.py → tables
    routes.py / views → @app.route functions
    templates/ → Jinja HTML
    static/ → css, images
    instance/*.db → SQLite

    Ek route explain karne ka template:
    1) URL + methods 2) Auth/role check 3) Form/query se data 4) Business rule (duplicate, slots) 5) db.session 6) render ya redirect

    Example GET+POST same route: GET form, POST save.
    Data HTML se: form name= → request.form. Data HTML ko: render_template(..., items=query).
    Nayi .py file: import karke use karo, warna Flask ko pata nahi. Folder rename: imports/paths/templates check.

  18. 18
    Show where Jinja2 is used in the 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 %}.

  19. 19
    Show where MVC is implemented.
    Times asked 1
    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.

  20. 20
    Which database have you used?
    Times asked 3
    Official solution

    SimpleSQLite file-based chhota DB, MySQL/Postgres server-based production DB.

    SQLite fayde: zero setup, ek .db file, MAD1/dev ke liye perfect, portable.

    Nuksaanconcurrent writes kam, user/password nahi, network access nahi, production scale nahi.

    MySQL: users, permissions, concurrent, replica. App factory mein URI change karke switch: sqlite:///app.db → mysql://...

  21. 21
    How many database tables are used?
    Times asked 1
    Official solution

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

    Viva mein file khol ke bolo:
    1) Kaunsi classes/tables hain (User, Role-specific, Booking...)
    2) Har table ka kaam 1 line
    3) Relationships: 1-1 / 1-M / M-M, backref, cascade, lazy
    4) Constraints: unique email, nullable, default status

    Example skeleton

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True, nullable=False)
        role = db.Column(db.String(20), default='user')
        bookings = db.relationship('Booking', backref='user', cascade='all, delete-orphan')

    ER diagram: rectangles entities, lines relationships, PK/FK mark. Schema = yahi structure.
    Tables create: db.create_all() ya migrations. SQLite file SQL viewer se dikha sakte ho.

  22. 22
    Explain the database models.
    Times asked 2
    Official solution

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

    Viva mein file khol ke bolo:
    1) Kaunsi classes/tables hain (User, Role-specific, Booking...)
    2) Har table ka kaam 1 line
    3) Relationships: 1-1 / 1-M / M-M, backref, cascade, lazy
    4) Constraints: unique email, nullable, default status

    Example skeleton

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True, nullable=False)
        role = db.Column(db.String(20), default='user')
        bookings = db.relationship('Booking', backref='user', cascade='all, delete-orphan')

    ER diagram: rectangles entities, lines relationships, PK/FK mark. Schema = yahi structure.
    Tables create: db.create_all() ya migrations. SQLite file SQL viewer se dikha sakte ho.

  23. 23
    How are User and Admin differentiated?
    Times asked 1
    Official solution

    SimpleRBAC = Role-Based Access Control — permission role se (admin/staff/user), har user pe alag nahi.

    user.role = 'admin'
    if current_user.role != 'admin': abort(403)

    Same login page, role ke hisaab dashboard. Multiple roles: roles table Many-to-Many, ya comma field (behtar normalized table).
    Unapproved staff: is_approved flag, login pe check.
    Flask-Security/UserMixin is_authenticated, is_active, get_id dete hain.

  24. 24
    What is ORM?
    Times asked 39
    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.

  25. 25
    Which ORM have you used?
    Times asked 3
    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.

  26. 26
    Why is ORM used?
    Times asked 2
    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.

  27. 27
    What is Cascade?
    Times asked 4
    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).

  28. 28
    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).

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

  30. 30
    Explain the Normal Forms (1NF, 2NF, 3NF, etc.).
    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.

  31. 31
    What is app.config["SECRET_KEY"]? Why is it required?
    Times asked 1
    Official solution

    SimpleSECRET_KEY Flask ka secret jisse session cookies sign/encrypt hoti hain.

    app.config['SECRET_KEY'] = os.getenv('SECRET_KEY', 'dev-key')

    Iske bina session/flash unreliable ya insecure. Key leak = attacker session forge kar sakta hai.
    Hardcode mat karo production mein — .env / environment variable. Flash messages bhi session use karti hain, isliye SECRET_KEY se related hain.
    Hataane pe session kaam nahi / warning. Change karne pe purane sessions invalid.

  32. 32
    What happens if SECRET_KEY is not defined?
    Times asked 1
    Official solution

    SimpleSECRET_KEY Flask ka secret jisse session cookies sign/encrypt hoti hain.

    app.config['SECRET_KEY'] = os.getenv('SECRET_KEY', 'dev-key')

    Iske bina session/flash unreliable ya insecure. Key leak = attacker session forge kar sakta hai.
    Hardcode mat karo production mein — .env / environment variable. Flash messages bhi session use karti hain, isliye SECRET_KEY se related hain.
    Hataane pe session kaam nahi / warning. Change karne pe purane sessions invalid.

  33. 33
    What is app.app_context().push()? Why is it used?
    Times asked 2
    Official solution

    SimpleApplication context app-level data (config, db), Request context ek HTTP request (request, session).

    Request ke andar Flask khud context push karta hai. Scripts/shell mein db query ke liye:

    with app.app_context():
        User.query.all()

    app.app_context().push() same, lekin with better (cleanup).
    current_app proxy current Flask app ki taraf. Factory pattern mein import app cycle avoid.
    Request context ke bahar request.form error dega.

  34. 34
    What is app = Flask(__name__)?
    Times asked 1
    Official solution

    Simpleapp = Flask(__name__) app banata hai; if __name__ == '__main__' tabhi server start jab file directly run ho.

    app = Flask(__name__)
    if __name__ == '__main__':
        app.run(debug=True, port=5000)

    __name__ module ka naam. Direct run pe '__main__', import pe filename. Import karoge to server auto-start nahi — tests/blueprints ke liye zaroori.
    debug=True: auto-reload + debugger. Production mein band rakho (security).
    Port: app.run(port=8000) ya flask run --port 8000. Default 5000. Haan, change ho sakta hai.

  35. 35
    What is MVC?
    Times asked 8
    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.

  36. 36
    Why do we use __name__?
    Times asked 1
    Official solution

    Simpleapp = Flask(__name__) app banata hai; if __name__ == '__main__' tabhi server start jab file directly run ho.

    app = Flask(__name__)
    if __name__ == '__main__':
        app.run(debug=True, port=5000)

    __name__ module ka naam. Direct run pe '__main__', import pe filename. Import karoge to server auto-start nahi — tests/blueprints ke liye zaroori.
    debug=True: auto-reload + debugger. Production mein band rakho (security).
    Port: app.run(port=8000) ya flask run --port 8000. Default 5000. Haan, change ho sakta hai.

  37. 37
    What is REST?
    Times asked 3
    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.

  38. 38
    What are REST principles?
    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
    What is an API?
    Times asked 8
    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.

  40. 40
    Have you implemented REST APIs?
    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.

  41. 41
    Explain HTTP methods.
    Times asked 3
    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.

  42. 42
    Can GET be used to send/fetch data?
    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.

  43. 43
    Can POST be used to fetch data?
    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.

  44. 44
    Can DELETE be used to fetch data?
    Times asked 1
    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.

  45. 45
    Is HTTP stateless or stateful? What is state?
    Times asked 1
    Official solution

    SimpleHTTP stateless hai — har request independent, server previous request yaad nahi rakhta.

    Isliye login ke baad bhi har request pe kaun ho yeh prove karna padta hai: cookie/session/JWT.
    State = yaad rakhna (user_id, cart). HTTP khud nahi rakhta; Flask session iske upar layer hai.
    Fayda: scale aasan, koi bhi server next request handle kar sake (sticky session ke bina, token use karke).

  46. 46
    What frameworks/technologies have you used?
    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.

  47. 47
    Why did you choose Flask instead of Django?
    Times asked 1
    Official solution

    SimpleFlask lightweight microframework, Django batteries-included.

    Flask: kam rules, SQLAlchemy/Jinja khud jodte ho. MAD1 course isi pe hai, seekhna easy.
    Django: admin, ORM, auth ready. Bada project jaldi, lekin opinionated.
    Course requirement + flexibility ki wajah se Flask.

  48. 48
    Difference between 2-Tier and 3-Tier 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.

  49. 49
    What is Jinja2?
    Times asked 3
    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 %}.

  50. 50
    Why did you use Jinja2?
    Times asked 2
    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 %}.

  51. 51
    Explain an Anchor (<a>) tag with GET/POST behavior.
    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.

  52. 52
    Difference between # and . selectors in CSS.
    Times asked 1
    Official solution

    Simple# ID selector hai (ek unique element), . class selector hai (kai elements).

    #login-btn { color: red; } → id='login-btn'
    .btn { padding: 8px; } → class='btn'

    ID page mein unique hona chahiye. Class reuse hoti hai — saare buttons .btn.
    CSS specificity: ID > class > element. Isliye # wala style . wale ko haarata hai.

    HTML: id JavaScript/getElementById ke liye, class styling groups ke liye.

  53. 53
    What is the datatype of an SQLAlchemy query result? (e.g., x = Model.query.filter_by(...))
    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.


    Simplenullable=False matlab column khali nahi. default seedha value. Query objects lazy hote hain jab tak .all/.first.

    age = db.Column(db.Integer, nullable=True)  # optional
    status = db.Column(db.String(20), default='pending')

    __tablename__ = 'users' # table name override

    User.query.all() → list of User. .first() → User ya None. .get_or_404(id) → User ya 404.
    filter_by(...) Query object return karta hai, execute .all() pe. Type: BaseQuery / list after all().
    db.func.count(User.id) aggregate. Empty table render: loop 0 baar, crash nahi agar code sahi.

  54. 54
    Sort table data alphabetically.
    Times asked 2
    Official solution

    Yeh list filter/sort/display task hai. Query badlo, template same rakh sakte ho.

    rows = Model.query.filter_by(status='approved').order_by(Model.name.asc()).all()

    Jinja: {% for r in rows %}<tr><td>{{ r.name|upper }}</td></tr>{% endfor %}

    {{ rows|length }} count dikhane ke liye.

    Alphabet sort: order_by(Model.name). Status filter: filter_by(status='pending').
    Assigned staff column: relationship se {{ booking.staff.name }}.

  55. 55
    Sort table data alphabetically.
    Times asked 2
    Official solution

    Yeh list filter/sort/display task hai. Query badlo, template same rakh sakte ho.

    rows = Model.query.filter_by(status='approved').order_by(Model.name.asc()).all()

    Jinja: {% for r in rows %}<tr><td>{{ r.name|upper }}</td></tr>{% endfor %}

    {{ rows|length }} count dikhane ke liye.

    Alphabet sort: order_by(Model.name). Status filter: filter_by(status='pending').
    Assigned staff column: relationship se {{ booking.staff.name }}.

  56. 56
    Display table data in uppercase.
    Times asked 1
    Official solution

    Yeh list filter/sort/display task hai. Query badlo, template same rakh sakte ho.

    rows = Model.query.filter_by(status='approved').order_by(Model.name.asc()).all()

    Jinja: {% for r in rows %}<tr><td>{{ r.name|upper }}</td></tr>{% endfor %}

    {{ rows|length }} count dikhane ke liye.

    Alphabet sort: order_by(Model.name). Status filter: filter_by(status='pending').
    Assigned staff column: relationship se {{ booking.staff.name }}.

  57. 57
    Change a row layout into a column layout.
    Times asked 1
    Official solution

    Simpleexaminer UI tweak maangta hai — CSS class ya inline, instantly dikhao.

    Button color: <button class='btn btn-success'> ya style='background:#22c55e;color:#fff'
    Navbar: navbar-dark bg-success / style='background:yellow' / fixed-bottom se neeche.
    Center: .wrap { display:flex; justify-content:center; align-items:center; min-height:100vh; }
    text-align:center heading ke liye. Bootstrap: d-flex justify-content-center, mx-auto, text-center.
    Hover: .btn:hover { opacity:0.8; transform:scale(1.02); }
    Half width: class='col-6' ya width:50%. Row→column: flex-direction:column / col-12 stack.
    Login card: card shadow p-4 mx-auto (max-width:400px).
    Table header green: th { background:green; color:white; } Bold column: td:nth-child(2){font-weight:bold}
    Box shadow: box-shadow: 4px 4px 12px rgba(0,0,0,.3);
    Background image: body { background: url('/static/bg.jpg') center/cover; }
    Reset button: <button type='reset'>Clear</button>
    Move button: ms-auto / position / flex order.
    Jinja dashboard heading: <h1>{{ user.name }}'s Dashboard</h1>

  58. 58
    Create a page with input field(s) and a Submit button that displays the entered data on another page.
    Times asked 1
    Official solution

    Yeh live UI/CSS change hai. Examiner jo element bole uski CSS turant badlo.

    Bootstrap class badlo (btn-primary → btn-success, bg-dark → bg-warning) ya inline style='color:red; background:#eee'.
    Center: d-flex justify-content-center text-center. Navbar neeche: navbar fixed-bottom.

    Example

    <button class='btn btn-success' style='background:#16a34a'>Book</button>

    Pehle browser inspect karke class dhundo, phir template mein change karke refresh.

  59. 59
    Create a route that accepts URL/form parameters and renders another page.
    Times asked 1
    Official solution

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

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

    Example naya field 'city':

    user.city = db.Column(db.String(50))
    user.city = request.form.get('city')
    <input name='city'>  ...  {{ user.city }}
  60. 60
    Create a page to add two numbers and display their sum.
    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 }}; }

  61. 61
    Validate password length on the frontend.
    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.

  62. 62
    Add backend validation requiring a special character in the password.
    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.

  63. 63
    Check whether an email exists in the database and display the result.
    Times asked 1
    Official solution

    Yeh list filter/sort/display task hai. Query badlo, template same rakh sakte ho.

    rows = Model.query.filter_by(status='approved').order_by(Model.name.asc()).all()

    Jinja: {% for r in rows %}<tr><td>{{ r.name|upper }}</td></tr>{% endfor %}

    {{ rows|length }} count dikhane ke liye.

    Alphabet sort: order_by(Model.name). Status filter: filter_by(status='pending').
    Assigned staff column: relationship se {{ booking.staff.name }}.

  64. 64
    Difference between DELETE and TRUNCATE.
    Times asked 1
    Official solution

    SimpleDELETE rows hataata hai, TRUNCATE poori table empty karta hai, DROP table hi mita deta hai.

    DELETE FROM user WHERE id=5; — specific rows, WHERE chal sakta hai, trigger/rollback possible.
    TRUNCATE TABLE user; — saari rows, tez, identity reset, WHERE nahi.
    DROP TABLE user; — table structure bhi gayi.
    ORM: db.session.delete(obj) = DELETE. Table drop rarely Flask se.

  65. 65
    Rate your own project on a scale of 1–10.
    Times asked 1
    Official solution

    Simple2-3 honest improvements + 1 security + 1 UX.

    Example

    password hashing/CSRF tighter, Redis cache, tests, pagination, email verify, rate limit login, better mobile CSS.

    Challenges: relationships/cascade, concurrent booking, Jinja inheritance.
    Rate: 7-8/10 with reason — 10/10 arrogant, 3/10 confidence khatam.
    Security extra: HTTPS, hashed passwords, CSRF, SQL injection (ORM), login attempts, file type check.

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