Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level3_24

Share your experience Add your viva experience here
122 Questions
2 Sets
0 Topics
33 Reviews
Tips for this examiner: Actually he was busy in doing something so 40 min I just explained everything, and 10 min he asked , he was in harry. Initially he was a bit rude but if you will be polite and professional, it would be good

Student reviews

Sheet response MAD1

explain your code well(convincing enough that you have idea about what you have done in project), he is very calm and will help you if you aren't able to answer anything

Questions remembered
  1. same as previous questions mentioned in the sheet
Guts MAD1

with ctrl+f find the proctor you been assigned see all the question he/she asked
they mainly ask the same questions
chill proctor.
just take as much time as you can on demo or he will tell you to explain all the code part

Questions remembered
  1. starts with demo(take as much time as you can in demonstrating your project)
  2. ask me to change the background color of my home page
  3. ask me to put navbar in the middle of the page
  4. ask me to create a new user manually in the database
  5. ask me to explain all the code of routes.py
  6. can flask return boolean values
  7. in how many types you can store data on client side
Sheet response MAD1

Practice your demo of the app thoroughly and narrate evrything you do... Also know your code you will be good...best wishes⭐

Questions remembered
  1. Level 2
  2. He was pretty chill like he were sleeping
  3. Asked me to show id card then proceed
  4. 1st demo of whole app...explain clearly what are you doing like all the things...he wont even utter a word and I was speaking all the time....then he told me to explain the code just the database, app, and one of the html files....not even a single question was asked.
Sheet response MAD1

Very chill proctor. He finished my viva in half an hour. Just explain your code in as detail as possible explaining different concepts and functions. No coding questions or changes were asked.

Questions remembered
  1. Can flask pass boolean values?
  2. why did you use bootstrap and not CSS?
  3. what are the ways you can store data?
  4. what happends if you render an empty table?
Ananjay MAD1

He is chill guy, dont care whats going on. Just yapp as much as you can.
Yapp random things (if over, can say same thing in diff words) just dont stop yourself

Questions remembered
  1. Everything was same as in asked by others (flask boolen, client storage....)
  2. No code change
Sheet response MAD1

Yapp as much as u can

Questions remembered
  1. Level3_24 feedback
  2. Level 2
  3. Same questions as the previous feedback
  4. Yapp till he stops you and ask questions
Sheet response MAD1

Explain all the codes line by line.

Questions remembered
  1. Level 2:-
  2. Show id card
  3. Provide checksum/download file live from the portal
  4. Give a demo
  5. Explain all the codes
  6. Can flask endpoints return boolean?
  7. What will happen when we render an empty table?
  8. (Ans:- header part of table will be there with blank body)
Sheet response MAD1

1. Follow this sheet for your particular proctor.
2. Proctor might not speak for the entire duration of your demonstration and code explanation. He will just instruct you.
3. Practice explaining your code and take as much time as you can for that during the viva.

Best of luck!👍

Questions remembered
  1. Questions:
  2. Can flask routes return the boolean values?
  3. What is git and VCS.
  4. How many ways can we store the data on the client side.
  5. What is cell padding and cell spacing. Overall flow:
  6. Download your project from the portal.
  7. Demonstrate the whole application and explain your code.
  8. Q&A
  9. No live code changes for me.
hierax MAD1

go through the previously asked questions of these proctors and its quite enough. you need to know everything about your code.

Questions remembered
  1. viva went on for 40 minutes
  2. Demo app
  3. Explain project
  4. Explain database schema
  5. what is flask?
  6. what is bootstrap? How many ways data can be stored? Explain http methods
Student MAD1

Very good proctor, I give the answer what he asked.

Questions remembered
  1. Show your ID
  2. Download the project and start demo
  3. Explain the whole code
  4. Can flask route return boolean data type?
  5. git and vcs
  6. rate your project
  7. How many ways data can be stored in user site?
Anish Phadke MAD1

he seemed very rude by his tone right from the beginning. After I initially explained my entire project in about 20 mins, I asked him if there was anything I missed out and he didn't even respond. So, I continued with the demonstration. After about 5 minutes, he asked to explain the models.py part (which I had already explained in detail). Overall, he didn't reciprocate much during the entire viva which made me feel like he was not even present or dissatisfied by my answers. At the end, surprisingly, he said that I explained very well and he left the meeting saying 'Thank you'. The entire viva lasted for 30 mins.

Questions remembered
  1. download your project from the portal and explain
  2. explain the database and models.py line by line
  3. elaborate the use of each and every library used by you
  4. demonstrate the core functionalities
Sheet response MAD1

He only wants you to explain each and every line of the code in an interesting manner. I was the one talking continuously for over 30 minutes in the entire viva. He was chill. Just know every line of your code, and speak as much as you can. All the best !

Questions remembered
  1. - Show ID
  2. - Either download from submission or run checksum
  3. - Asked to present my project
  4. - Asked to elaborate my entire code line by line
  5. - asked me if flask can return boolean type ? (i said it will throw error if sent directly, but we can wrap it in str() for example. He said Perfect !)
  6. - asked what's JSON ?
  7. - no code changes.
  8. - Ended in 33 mins
Sheet response MAD1

I just followed this response sheet, it worked good. Just know some basic Frontend Components to make changes and some basics of the web application.

Questions remembered
  1. Show the complete Web application?
  2. Explain the complete Code?
  3. Change the Back Ground color of the web application?
  4. How to send data from client to server?
  5. Can flask end point send the Boolean type?
Sheet response MAD1

He was somewhat rude and uninterested right from the moment he joined the meet. As if someone was forcing him to take the viva.

Cannot predict the behaviour of the examiner from this sheet. They behave differently with different students at different times. Maybe he was annoyed that I had hijacked his lunch hour.

But he was patient. Did not interrupt. Gave time to figure out things when I got stuck once or twice.

He wants detailed explanation. So explain everything about your app in complete details right from the start. Consume as much time as possible. Then he'll not bother to ask further questions.

Practice the code changes that he asks, from this sheet. He always asks to do the same styling changes.

Questions remembered
  1. LEVEL 2 VIVA
  2. Do checksum and paste in the meet chat
  3. Start the intro of the app
  4. Interrupted few minutes later and said 'after you complete the intro, explain all the code line by line. I'll be back from the restroom. Continue, I'll be listening.'
  5. I explained the whole app in detail in a single flow (including the models) and also explained the code (be it backend or frontend) along with the GUI for some important and complex features.
  6. When I had finally reached the API, he stopped me after few seconds and made me change background colour of the login page to red, and that of the input boxes to green.
  7. When I did it successfully, he said okay great that's it from my side and ended the meet immediately. Didn't bother to hear or respond to my 'Tysm Sir.'
  8. That's it. No questions asked about project or theory.
  9. I had consumed 40 minutes of his time with my explaination. So he didn't go for any questions ig.
  10. Lasted for 45 mins.
Sheet response MAD1

Honestly, great proctor! he motivated me for my last answer and kept telling me good after my responses. Just stay calm, be polite and explain your app in detail. If he thinks you know what you're doing, he won't ask you to code most likely

Questions remembered
  1. - asked me to do checksum
  2. - asked me to present my app first
  3. - can flask return a boolean value?
  4. - what did I use to style my app? When I answered Bootstrap, he asked what's better CSS or Bootstrap
  5. - what happens when you try to return a table that has no values
Daksh MAD1

Keep calm , try to look like you know all of it , in viva 2 they try very hard to break your flow or confidence.

Questions remembered
  1. they dont care about checksum in level 2 , he asked me to give complete into to the app , then explain the entire code , first asked me to change the background color of whole app , then color of a specific box , fir sabhi text ka color blue karwaya , fir input ke boxes tha color white se green karwaya , fir pucha ki style kaise kya ha mene , fir mene bola ki csslink kiya ha sabme , ha vaise badhia ha mera camera on nhi ho rha tha tab usne wait kiya , fir questions- can flask endpoint return Boolean values , how does browswer on client store data , some javascript term was also asked i dont remmeber exactly , mene to json file explain kardi
Sheet response MAD1

Prepare from viva sheet, know your code line to line, revise database concepts.

Questions remembered
  1. Git vs vcs?
  2. Show frontend validation and backend validation in code.
  3. Explain models.py in detail.
  4. Can flask routes return boolean values?
  5. In how many ways the data can be stored in client web browser?
  6. Change background colour of student dashboard to red.
  7. Change block color to yellow.
  8. Change text colour to dark blue.
  9. Change navbar position to bottom of page.
Astitva Agarwal MAD1

The procter was very chill and good very calm and polite
Explain your code in very deep way explain each and every line so that he would not have any questions left with him
You should know your code very well all the routes , models table frontend and backend
Be confident for your code and just review this sheet for questions and topics

Best of luck ! : )

Questions remembered
  1. Level 2
  2. First asked me to show id card
  3. Then i downloaded file infornt of so no need of checksum
  4. He said me give detailed and elaborative demo of you app
  5. Then i showed all the functionalities of my application
  6. He said me to explain all the backend and frontend of code including routes and all the models and terminologies
  7. I explained each and every line of code giving all the explanation of code all the terminologies like orm , why it is used each and evey thing i explained the code for like 50 mins
  8. Then he said me to change the background color and text
  9. The procter was very nice he told me that where i could make my app better
  10. He told me that i was very confident about my code because i explain everything with example and all the edge cases
  11. He asked me to leave i asked few questions regarding my application and communication skills and i left
Sheet response MAD1

Shared viva questions from response sheet: Show me your ID Card; Demonstrate Your Project; Change background color

Questions remembered
  1. Show me your ID Card
  2. Demonstrate Your Project
  3. Change background color
  4. which is more important backend or fronted validation
  5. show your frontend & backend part in your directory
Suraj MAD1

I proctor is nice. He said you can disconnect the call now after the question asked rate your project.
Just stay calm and be polite, try to answer the question in detail.

Questions remembered
  1. First asked to show Id card then asked for checksum and paste in the chat box
  2. Explain about your project everything
  3. Can Api return a Boolean value if yes then explain
  4. Explain the database model of your project in detail
  5. Explain frontend and backend validation
  6. Which is more crucial fronted or backend validation
  7. Rate your project. the viva went around 40 mins
Sheet response MAD1

Give a detailed explanation of the models and routes initially itself.

Questions remembered
  1. 1.change the background color,font color,button background color
  2. 2.Bring the navbar to the bottom of the page
  3. 3.Explain models in detail
  4. 4.Add a new row in the database and make it visible in the application
  5. 5.What are the different ways data can be stored
  6. 6.Project demo (first)
- MAD1

Shared viva questions from response sheet: Showcase your app; Explain your DB; Explain the components in your code

Questions remembered
  1. Showcase your app
  2. Explain your DB
  3. Explain the components in your code
  4. Does Flask return a boolean?
  5. Git version control
  6. Explain js frameworks - Change the color of navbar - Change the color of button - Change the color of font Rate your app. Proctor was very rude just be patient (ends within 45mins). Doesn't repeat himself when you don't hear him. He ends up imagining you don't know despite asking him to repeat himself.
Gurdeep MAD1

Just give a detailed explanation of project

Questions remembered
  1. ●Demonstrate the project in full detail so he will ask less questions
  2. ●Explain all models and users one in detail
  3. ●Vcs vs git
  4. ●Javascript frameworks
  5. ●Practice the changes the background color of home page
  6. ●Change the position of navigation bar from top to bottom
  7. ●I used bootstrap so he asked me about bootstrap
  8. ●Rate your project
Sheet response MAD1

Prepare theory well and be well versed with project. You should be able to manipulate css (background-color)

Questions remembered
  1. level3_24 experience
  2. i demonstrated the project in depth and he had joined the meeting 10 minutes before the time. i demonstrated my project in depth for like 35 minutes . he asked me to give description of data model.
  3. he asked me to make changes in css like change background-color of specific objects
  4. then he asked theory questions like name some js frameworks, what is ajax , can flask endpoint return boolean, how is data stored on client side, vcs vs git,
  5. i was only able to answer a few of them . and atlast he asked me to rate my project.
  6. overall good but i lacked in the theory part
Adarsh Pradhan MAD1

Shared viva questions from response sheet: Questions were same as mentioned by others.; Proctor was good.; He just didn't waste any time, and asked point to point questions.

Questions remembered
  1. Questions were same as mentioned by others.
  2. Proctor was good.
  3. He just didn't waste any time, and asked point to point questions.
  4. Was understanding when some genuine issues occurred.
  5. Nothing negative like what some other people have mentioned here.
  6. Just be ready to explain your code, and how to make changes when asked.
Urjaswi Banerjee MAD1

Shared viva questions from response sheet: This proctor was really good.Maybe he was in a good mood lol.He asked me about 30+ questions and all were from this sheet only and at last he praised my work and asked me to rate out of 5.i said 3.But he said have a little more confidence your work should be 4.5/5.Below are some of the questions he asked:; Webhooks; AJAX

Questions remembered
  1. This proctor was really good.Maybe he was in a good mood lol.He asked me about 30+ questions and all were from this sheet only and at last he praised my work and asked me to rate out of 5.i said 3.But he said have a little more confidence your work should be 4.5/5.Below are some of the questions he asked:
  2. Webhooks
  3. AJAX
  4. Router questions that I don’t remember
  5. Celery worker and beat difference
  6. What does celery worker do and how it works
  7. Cybersecurity questions like dos
  8. Priority mail,caching,orm,sql errors
  9. Asked me to code a bunch of things like changing background,colour of form,interchanging top and footer,change font size all of these will be easy if you are familiar with the html and style in your code(if you used vue cli)
  10. Lazy loading,spa,if app was responsive
  11. Bootstrap,css
  12. Frontend vs backed validation and which is more important.Overall all explain your code and project wellto proctor and be confident.and practice all questions from the sheet.Hope this helps.
N MAD1

know your project

Questions remembered
  1. changes to the template using CSS 2.making changes to navbar
  2. changes to color and more
  3. template inheritance
  4. authorisation and authentication 6 .javascript frameworks
  5. validation and more project demo with explaination
Sheet response MAD1

Shared viva questions from response sheet: What is AJAX in Javascript; What is Javascript framework; How will u input data into the client's web browser - cookies and session variables

Questions remembered
  1. What is AJAX in Javascript
  2. What is Javascript framework
  3. How will u input data into the client's web browser - cookies and session variables
  4. Cell spacing and cell padding
  5. Python HTTP vs Flask HTTP methods
  6. Diff between url_for and redirect_for
  7. If u have a bug in ur app and a user reports it to you, how will u help them?
  8. Add image as bg
  9. Add image + gradient as bg
  10. Explain USER model briefly and make some changes in it such that it is reflected
Iqbal MAD1

Shared viva questions from response sheet: Explain the code 2.change something in the code(bg colour card colour etc) 3.java script frame work 4.ORM and explain in the code 5.cookies and session 6.few questions from database (CRUD) 7.Git and Git version

Questions remembered
  1. Explain the code 2.change something in the code(bg colour card colour etc) 3.java script frame work 4.ORM and explain in the code 5.cookies and session 6.few questions from database (CRUD) 7.Git and Git version
Shriraang MAD1

Shared viva questions from response sheet: Introduce yourself; Give me Demo of your Application; Explain me ORM (no theoretical definitions)

Questions remembered
  1. Introduce yourself
  2. Give me Demo of your Application
  3. Explain me ORM (no theoretical definitions)
  4. Task 1- Change the background image and give a colour
  5. Task 2:
  6. Create a category hard drinks and make some alcohol available on your app
  7. Create a adhaar card upload functionality only when user tries to buy an alcohol, the age of the user should be verified (24 and above) then only product should be added to cart.
Riya MAD1

Shared viva questions from response sheet: If anyone use my app and got an error how would I help them 2.ORM; MVC 4.testing types 5.Database related questions ( I forgot) 6.template inheritance 7.change background color 8.move nav bar to the footer; Python HTTP and flash HTTP

Questions remembered
  1. If anyone use my app and got an error how would I help them 2.ORM
  2. MVC 4.testing types 5.Database related questions ( I forgot) 6.template inheritance 7.change background color 8.move nav bar to the footer
  3. Python HTTP and flash HTTP
  4. VCS and git 11.front end and back end validation, which is more important.
  5. Java script framework.
Shubham MAD1

Shared viva questions from response sheet: Show demo; Show models; Explain one query

Questions remembered
  1. Show demo
  2. Show models
  3. Explain one query
  4. What is orm?
  5. Difference between authentication and authorisation?
  6. What is git versions?
  7. Ask to do some changes in css
  8. What is self padding?
Sheet response MAD1

Shared viva questions from response sheet: Template inheritance; What are Javascript framework; ORM and its pros and cons

Questions remembered
  1. Template inheritance
  2. What are Javascript framework
  3. ORM and its pros and cons
  4. Libraries used in project
  5. What is Cell-spacing and Cell-padding
  6. What is version control system, another name for it?
  7. Frontend and backend validation. Which is more important? Show validation done in code
  8. Describe "User" model used and its column
  9. Explain each table in application and its purpose
  10. Diff between structured and unstructured database
  11. Diff types of testing used
  12. Diff between Python http and Flash http
  13. Types of frontend storage
  14. Can API return bool value?
  15. Why sql is so verbose?

Approved viva sets

  1. 1
    Demonstrate your complete application.
    Times asked 7
    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.

  2. 2
    Explain your entire codebase (backend and frontend).
    Times asked 1
    Official solution

    SimpleTree + 6 file roles. Not every line.

    Same walk_code. Stay structured.

    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: Start models end Vue.

    Project example: Start models end Vue.

  3. 3
    Explain your database/models in detail.
    Times asked 1
    Official solution

    SimpleTables + lines (FK) + 1-M / M-M. Draw mentally, phir models.py.

    Har class: PK, important columns, relationships. Why normalized (no duplicate venue name in every show as only string without FK).

    Indexes search columns. Unique email. Cascade policy bookings pe.

    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: User-Role M-M. User-Booking 1-M. Venue-Show 1-M. Show-Booking 1-M.

  4. 4
    Explain the flow of a feature from frontend to backend (e.g., booking/service flow).
    Times asked 1
    Official solution

    SimpleButton to DB and back 6 steps. Explain flow of a feature frontend to backend.

    Pick booking/service.

    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: Sequence aloud.

    Project example: Sequence aloud.

  5. 5
    Explain every library/package used in your project and why it is needed.
    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.

  6. 6
    Explain every API used in your application.
    Times asked 1
    Official solution

    Simple3–4 routes deep: auth, validation, status, cache? Method body response error.

    Login, list, create. Why each.

    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: Open resources, pick examiner's choice.

  7. 7
    Explain the challenges and learnings from MAD1 and MAD2.
    Times asked 1
    Official solution

    SimpleTypical: CORS, JWT expiry, Celery Windows, cache stale, Vue reactivity. Personal 30s story.

    How solved docs+logs. Difficulties honest.

    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: Pick one real bug.

  8. 8
    Add a new database entry using a Python script or the terminal.
    Times asked 1
    Official solution

    Simpleflask shell obj=Model(); add; commit. Add new database entry Python script or terminal.

    app context.

    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: flask shell.

  9. 9
    Change the background color of the page/body.
    Times asked 1
    Official solution

    Simplebody { background: #f5f5f5 } or wrapper class.

    Specific div vs whole page — suno examiner.

    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: App.vue style or bootstrap bg-light.

    Project example: App.vue style or bootstrap bg-light.

  10. 10
    Change the background color of a specific div/login box.
    Times asked 1
    Official solution

    Simplebody { background: #f5f5f5 } or wrapper class.

    Specific div vs whole page — suno examiner.

    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: App.vue style or bootstrap bg-light.

    Project example: App.vue style or bootstrap bg-light.

  11. 11
    Set a background image.
    Times asked 1
    Official solution

    Simplebody { background-image: url(...); background-size: cover; }. Set a background image.

    static/bg.jpg.

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

    Project example: css.

  12. 12
    Change the font/text color.
    Times asked 1
    Official solution

    Simplebody { color } or navbar color. Change font/text color.

    Specific element if said.

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

    Project example: css.

  13. 13
    Change the button color.
    Times asked 3
    Official solution

    SimpleLive CSS/Vue: sabse chhota change jo dikhe. Logic/API mat todo unless poochhein.

    Inspect element se class dhoondo. btn-success, navbar bottom fixed, center flex.

    Save, refresh, dikhao. Break mat karo layout poora.

    Example

    <button class="btn btn-success">Login</button>
    nav { position: fixed; bottom: 0; width: 100%; }
    .wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

    Project example: Jo button/navbar poocha usi file (Navbar.vue / App.vue / css).

    Viva tipDevTools se element inspect. Logic/API mat todo unless poochhein.

  14. 14
    Change the navbar color.
    Times asked 1
    Official solution

    Simplenav.navbar background or navbar-dark bg-primary / custom CSS.

    Don't change unrelated buttons unless asked.

    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: Inspect nav class.

    Project example: Inspect nav class.

  15. 15
    Move the navbar (center/bottom/footer).
    Times asked 1
    Official solution

    Simpleposition:fixed bottom / flex order / swap footer in App.vue.

    Confirm UX. Save refresh.

    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

    nav { position: fixed; bottom: 0; width: 100%; }

    Project example: Navbar.vue or App.vue css.

  16. 16
    Move the header to the center of the page.
    Times asked 1
    Official solution

    Simpletext-align:center or mx-auto header. Move header center of page.

    css.

    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: h1 class.

    Project example: h1 class.

  17. 17
    Modify a database column and update the application accordingly.
    Times asked 1
    Official solution

    SimpleChange Column type/length SQLite ALTER limited. New column easier. Modify database column update app.

    serialize + form + create_all/migrate.

    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 drop casually.

  18. 18
    What is Vue?
    Times asked 5
    Official solution

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

    Progressive frontend framework. Components, reactivity, directives.

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

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

    Example

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

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

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

  19. 19
    What are JavaScript frameworks?
    Times asked 1
    Official solution

    SimpleVue React Angular UI frameworks. Vue course choice.

    What are JavaScript frameworks.

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

    Project example: Vue.

  20. 20
    What is Vue Router?
    Times asked 3
    Official solution

    SimpleRouter URL ko component se map karta hai. Google Maps for pages.

    routes array path+component. router-view jagah. router-link reload nahi.

    meta.auth + beforeEach guard. Dynamic /venues/:id.

    Nayi page: SFC + routes entry + link.

    Example

    const routes = [
      { path: '/', component: Home },
      { path: '/login', component: Login },
      { path: '/venues/:id', component: VenueDetail, meta: { auth: true } },
    ]

    Project example: routes.js Login, Register, UserHome, AdminHome, 404.

    Viva tipNayi page: component banao, routes array mein path, router-link se jao.

  21. 21
    What are Vue Routes?
    Times asked 1
    Official solution

    SimpleRouter URL ko component se map karta hai. Google Maps for pages.

    routes array path+component. router-view jagah. router-link reload nahi.

    meta.auth + beforeEach guard. Dynamic /venues/:id.

    Nayi page: SFC + routes entry + link.

    Example

    const routes = [
      { path: '/', component: Home },
      { path: '/login', component: Login },
      { path: '/venues/:id', component: VenueDetail, meta: { auth: true } },
    ]

    Project example: routes.js Login, Register, UserHome, AdminHome, 404.

    Viva tipNayi page: component banao, routes array mein path, router-link se jao.

  22. 22
    What are Vuex Mutations and Actions?
    Times asked 1
    Official solution

    SimpleMutations sync diary entry. Actions async kaam phir diary.

    Direct state mutate action se Vuex 4 discouraged. Devtools time-travel mutations.

    Purpose of Actions: API, phir commit. Purpose of Mutations: state change one place.

    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: action fetchVenues → commit setVenues. Mutation sirf array replace.

  23. 23
    What is AJAX?
    Times asked 3
    Official solution

    SimpleAJAX = page reload ke bina server se baat. Technique ka naam, library nahi.

    Purana XMLHttpRequest. Aaj fetch() / Axios. Vue SPA poori AJAX pe chalti hai — JSON aata, v-for render.

    AJAX ≠ jQuery. Fetch native API. Axios library interceptors ke saath.

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

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

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

    Example

    const res = await fetch('/api/venues')
    const data = await res.json()

    Project example: mounted() mein fetch('/api/venues') — yeh AJAX hai.

    Viva tipAJAX technique hai, Fetch modern API hai. Axios library hai uske upar.

  24. 24
    What is Server-Sent Events (SSE)?
    Times asked 1
    Official solution

    SimpleSSE ek tarah ka radio: server bolta rehta, client sunta. Client us pipe pe command nahi bhejta.

    text/event-stream. EventSource browser. Notifications ke liye WebSocket se simple.

    MAD2 optional. Celery complete hone pe poll bhi kaafi.

    HTTP postcard (request-response). WebSocket phone call (dono taraf live). SSE radio (server→client stream). Webhook unka server tumhe POST karta hai (payment).

    MAD2 mostly REST. Live dashboard = poll + Redis cache kaafi. Agar implement nahi kiya to design bolo, jhoot mat.

    Project example: Export status poll GET task_id. SSE nahi kiya to bolo alternative.

  25. 25
    What is an Opaque Request?
    Times asked 1
    Official solution

    SimpleOpaque no-cors fetch, body JS se nahi. Not for JSON APIs. cors mode default.

    What is an Opaque Request.

    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: We don't use no-cors for APIs.

    Project example: We don't use no-cors for APIs.

  26. 26
    What is Flask?
    Times asked 6
    Official solution

    SimpleFlask halka Python web framework. MAD2 REST API. Open source BSD.

    Large apps possible blueprints+gunicorn. Flask(__name__) paths. Dev server not prod.

    create_app factory tests/celery.

    Flask Python micro web framework. Route decorator URL → function. MAD2 mein JSON API: request.get_json(), jsonify, JWT.

    WSGI: server (Werkzeug) app ko call. if __name__ == '__main__' sirf direct run. Factory create_app() test/celery ke liye.

    Blueprint/resources folders. @app.route vs MethodView. Debug=True viva local, prod nahi. CORS alag port Vue ke liye.

    Example

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

    Project example: create_app register db cache cors jwt celery.

    Viva tipOpen source haan. Flask(__name__) root path/templates locate karta hai — hataoge to config confuse.

  27. 27
    Can a Flask endpoint/API return a Boolean value?
    Times asked 1
    Official solution

    SimpleJSON true/false possible. Better {ok:true}. jsonify(True) works.

    Can Flask endpoint return Boolean? Yes.

    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: We return objects.

    Project example: We return objects.

  28. 28
    What happens if a database table is empty? What does the query return?
    Times asked 1
    Official solution

    Simple[] / None. Templates v-if. No error if handled.

    What happens empty table.

    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: Fresh DB demo.

    Project example: Fresh DB demo.

  29. 29
    What is ORM?
    Times asked 39
    Official solution

    SimpleORM = translator. Python object bolo, woh SQL mein baat kare.

    Object Relational Mapper. Class User ↔ table user. Raw SQL kam.

    SQLAlchemy MAD1/MAD2. Fayde: portable SQLite→Postgres, relationships, parameterized queries (injection kam).
    Nuksaan: N+1, hidden SQL, complex reports pe raw better.

    Direct sqlite3 se SQLAlchemy isliye: models, switch DB, safer queries.

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(128), unique=True)
    User.query.filter_by(email='a@b.com').first()

    Project example: models.py db.Model. resources User.query.filter_by. Koi f-string SQL nahi.

    Viva tipFayde: safe-ish, portable (SQLite→Postgres). Nuksaan: complex queries, N+1, leaky abstractions. Direct SQLite se SQLAlchemy isliye: models + injection protection + switch DB.

  30. 30
    Explain your database schema/models.
    Times asked 1
    Official solution

    SimpleTables + lines (FK) + 1-M / M-M. Draw mentally, phir models.py.

    Har class: PK, important columns, relationships. Why normalized (no duplicate venue name in every show as only string without FK).

    Indexes search columns. Unique email. Cascade policy bookings pe.

    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: User-Role M-M. User-Booking 1-M. Venue-Show 1-M. Show-Booking 1-M.

  31. 31
    What type of database errors can occur? (e.g., inserting a string into an integer column)
    Times asked 1
    Official solution

    SimpleIntegrityError duplicate/FK. DataError type. OperationalError lock. Catch 400 not 500.

    Type of database errors.

    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: try commit except IntegrityError rollback.

  32. 32
    What happens if invalid data is inserted into an empty table?
    Times asked 1
    Official solution

    SimpleType/constraint DataError IntegrityError. Validate JSON types before add. Catch 400.

    Invalid data empty table still errors on type.

    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: Post string in integer column.

  33. 33
    How many models have you used?
    Times asked 1
    Official solution

    SimpleCount honestly models.py.

    How many models.

    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: Open file count class db.Model.

  34. 34
    Difference between frontend validation and backend validation.
    Times asked 2
    Official solution

    SimpleFrontend UX turant error. Backend security mandatory. Dono. Backend zyada important.

    Which more important: backend. Client bypass DevTools.

    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

    if len(password) < 8 or not re.search(r'[A-Z]', password):
        return jsonify(msg='weak password'), 400

    Project example: Password regex both. Seats check backend.

  35. 35
    Which validation is more important, frontend or backend?
    Times asked 1
    Official solution

    SimpleBackend more important. Frontend UX. Attacker UI skip karta.

    Never frontend-only overbooking.

    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: Postman bypass Vue still 400.

    Project example: Postman bypass Vue still 400.

  36. 36
    What is Git?
    Times asked 3
    Official solution

    SimpleGit VCS tool. VCS concept. GitHub hosting. SCM another name.

    commit branch merge. Examiner history. Git ≠ GitHub.

    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: git log. collaborators. README.

  37. 37
    What is Version Control?
    Times asked 2
    Official solution

    SimpleGit VCS tool. VCS concept. GitHub hosting. SCM another name.

    commit branch merge. Examiner history. Git ≠ GitHub.

    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: git log. collaborators. README.

  38. 38
    Difference between Git and a Version Control System (VCS).
    Times asked 1
    Official solution

    SimpleVCS category, Git implementation, GitHub remote+PR.

    Difference Git vs VCS vs GitHub three words.

    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: Local git, origin GitHub.

    Project example: Local git, origin GitHub.

  39. 39
    What is another name for a Version Control System?
    Times asked 1
    Official solution

    SimpleGit VCS tool. VCS concept. GitHub hosting. SCM another name.

    commit branch merge. Examiner history. Git ≠ GitHub.

    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: git log. collaborators. README.

  40. 40
    What are Webhooks?
    Times asked 7
    Official solution

    SimpleWebhook = woh tumhe call karta hai. API = tum unhe call karte ho.

    Payment success pe Stripe tumhare /webhooks/payment pe POST. Tum poll nahi karte.

    API pull, webhook push. WebSocket dono taraf live connection. SSE server→client stream.

    MAD2 mostly REST APIs. Webhook theory + example kaafi. Verify signature production mein.

    Example

    @app.route('/webhooks/payment', methods=['POST'])
    def hook():
        event = request.json
        ...

    Project example: Agar implement nahi: 'course REST. Webhook design: POST /webhooks/booking-paid'.

    Viva tipAPI pull, webhook push. WebSocket dono taraf live. SSE server → client stream.

  41. 41
    What is CSRF?
    Times asked 3
    Official solution

    SimpleCSRF = dusri site tumhare cookie se request chalwa de jab tum logged in ho.

    Session+cookie auto-send → CSRF token chahiye.
    JWT Authorization header browser automatically dusri site se nahi lagata — kam risk (unless cookie JWT).

    SameSite cookies help.

    Browser + API ke beech extra darwaze: CORS origin allow, HTTPS encrypt transit, CSRF cookie-auto-send attack, XSS HTML inject, SQL injection raw query.

    MAD2 SPA: Vue :8080 Flask :5000 → Flask-CORS. JWT localStorage XSS se chori ho sakta — v-html user input pe avoid. Password Network tab localhost pe dikhega; prod HTTPS, response mein password echo nahi.

    401 unauthenticated, 403 unauthorized, 400 validation. Hash one-way — SHA decrypt nahi hota. Secret key .env, GitHub pe nahi.

    Project example: Token header APIs. Cookie session nahi to CSRF kam. Phir bhi CORS tight.

  42. 42
    What is XSS?
    Times asked 1
    Official solution

    SimpleXSS untrusted HTML/JS inject. Escape, CSP, mat v-html user content.

    JWT LS steal via XSS. Why v-html movie desc careful.

    Browser + API ke beech extra darwaze: CORS origin allow, HTTPS encrypt transit, CSRF cookie-auto-send attack, XSS HTML inject, SQL injection raw query.

    MAD2 SPA: Vue :8080 Flask :5000 → Flask-CORS. JWT localStorage XSS se chori ho sakta — v-html user input pe avoid. Password Network tab localhost pe dikhega; prod HTTPS, response mein password echo nahi.

    401 unauthenticated, 403 unauthorized, 400 validation. Hash one-way — SHA decrypt nahi hota. Secret key .env, GitHub pe nahi.

    Project example: {{ }} auto escape. v-html only sanitized.

  43. 43
    What is DoS (Denial of Service)?
    Times asked 1
    Official solution

    SimpleDenial of Service flood/expensive queries se down. Rate limit, captcha, scale.

    Course: validation, indexes, cache. Not full WAF.

    Browser + API ke beech extra darwaze: CORS origin allow, HTTPS encrypt transit, CSRF cookie-auto-send attack, XSS HTML inject, SQL injection raw query.

    MAD2 SPA: Vue :8080 Flask :5000 → Flask-CORS. JWT localStorage XSS se chori ho sakta — v-html user input pe avoid. Password Network tab localhost pe dikhega; prod HTTPS, response mein password echo nahi.

    401 unauthenticated, 403 unauthorized, 400 validation. Hash one-way — SHA decrypt nahi hota. Secret key .env, GitHub pe nahi.

    Project example: Don't allow unbounded export without auth.

  44. 44
    Difference between Privacy and Security.
    Times asked 1
    Official solution

    SimplePrivacy personal data minimize. Security attacks rokna CIA. Overlap not same.

    GDPR vs firewall example.

    Browser + API ke beech extra darwaze: CORS origin allow, HTTPS encrypt transit, CSRF cookie-auto-send attack, XSS HTML inject, SQL injection raw query.

    MAD2 SPA: Vue :8080 Flask :5000 → Flask-CORS. JWT localStorage XSS se chori ho sakta — v-html user input pe avoid. Password Network tab localhost pe dikhega; prod HTTPS, response mein password echo nahi.

    401 unauthenticated, 403 unauthorized, 400 validation. Hash one-way — SHA decrypt nahi hota. Secret key .env, GitHub pe nahi.

    Project example: Don't return other users' emails to normal user API.

  45. 45
    What is Redis?
    Times asked 21
    Official solution

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

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

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

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

    Example

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

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

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

  46. 46
    What is Celery?
    Times asked 17
    Official solution

    SimpleCelery = background naukri. HTTP request ko 10 second email bhejne ke liye mat rokna.

    Distributed task queue: aap function ko abhi nahi, worker process mein later/retry/schedule pe chalaate ho.

    MAD2 typical jobs: daily reminder mail, monthly HTML report, user-triggered CSV export.

    Web request 200ms hona chahiye. 10,000 emails request thread mein = timeout. Worker alag CPU pe kaam kare.

    Redis broker chahiye. Beat alag process schedule ke liye.

    Example

    @celery.task
    def daily_reminder():
        for u in User.query.filter_by(active=True):
            send_mail(u.email, 'Book something today!')

    Project example: User Export click → 202 Accepted. Worker CSV + email. Daily 6pm Beat reminder.

    Viva tipWorker + Redis bina Beat ke user-triggered chalega. Scheduled jobs ke liye Beat bhi chahiye.

  47. 47
    What is Caching?
    Times asked 2
    Official solution

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

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

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

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

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

    Example

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

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

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

  48. 48
    What is Point-to-Point Messaging?
    Times asked 1
    Official solution

    SimpleEk producer ek consumer. Celery task typically p2p. Pub/sub broadcast.

    Redis acts as broker between Flask and 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: delay() one worker executes once.

  49. 49
    Difference between Task Queue and Message Queue.
    Times asked 1
    Official solution

    SimpleMessage queue generic. Task queue (Celery) specifically 'yeh function chalao'.

    Redis list FIFO. Priority extra queues.

    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: Celery is task queue on Redis broker.

  50. 50
    What is CSS?
    Times asked 2
    Official solution

    SimpleCSS look. Selectors element .class #id. Box model flex grid.

    Inline vs internal vs external. Specificity inline high.

    Look: Bootstrap utility classes (margin m-3, flex, grid) ya khud CSS. Responsive = media query / Bootstrap breakpoints se mobile.

    Vue scoped style leak nahi. :class binding. Examiner colour/button live change maange to DevTools nahi, source class dikhao.

    CSS ≠ Bootstrap. Bootstrap CSS+JS framework. Inline style last resort.

    Example

    .btn { background: green; }
    .mt-2 { margin-top: .5rem; }  /* bootstrap */
    .my-3 { margin-top+bottom }

    Project example: style section SFC scoped + bootstrap.

    Viva tipResponsive: Bootstrap grid / media queries. Bina CSS possible nahi really — browser default ugly. Flexbox 1D, Grid 2D.

  51. 51
    What is Inline CSS?
    Times asked 1
    Official solution

    Simplestyle="color:red" ek element. Hard reuse high specificity. What is Inline CSS.

    vs internal <style> vs external file.

    Look: Bootstrap utility classes (margin m-3, flex, grid) ya khud CSS. Responsive = media query / Bootstrap breakpoints se mobile.

    Vue scoped style leak nahi. :class binding. Examiner colour/button live change maange to DevTools nahi, source class dikhao.

    CSS ≠ Bootstrap. Bootstrap CSS+JS framework. Inline style last resort.

    Project example: Avoid inline except live tiny.

    Project example: Avoid inline except live tiny.

  52. 52
    Difference between Inline CSS and Internal CSS.
    Times asked 2
    Official solution

    SimpleInline attr. Internal <style> page. External .css reuse. Specificity inline highest.

    Difference Inline and Internal CSS.

    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: SFC style ≈ internal scoped.

  53. 53
    What are the different ways to store data in the browser/client?
    Times asked 1
    Official solution

    Simpledata() local diary. Store school notice board.

    Search query local. Logged-in user store. Persist: store + localStorage together.

    state vs data: similar concept, scope alag.

    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

    // local
    data() { return { q: '' } }
    // global
    this.$store.state.user

    Project example: Login.vue local form fields. this.$store.state.user Navbar.

  54. 54
    Difference between Local Storage, Session Storage, and Cookies.
    Times asked 2
    Official solution

    SimpleLS persist 5MB XSS-readable. SS tab-scoped. Cookies chhote auto-send httpOnly possible.

    JWT LS common student MAD2 — v-html untrusted mat. Logout removeItem.

    Vuex RAM refresh gayab unless rehydrate LS.

    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 localStorage token key. Cookies empty if JWT LS.

    Viva tipJWT ko localStorage common hai MAD2 student projects mein — XSS se bacho (v-html untrusted mat).

  55. 55
    What is SMTP?
    Times asked 3
    Official solution

    SimpleSMTP = email bhejne ka protocol, jaise HTTP web ka.

    Ports: 587 STARTTLS, 465 SMTPS, 25 server-server. Dev: MailHog 1025.

    Flask-Mail wrap. Sync send slow — Celery task se bhejo.

    Fayda: universal. Nuksaan: spam, deliverability (SPF/DKIM), no guarantee like API.

    Example

    app.config['MAIL_SERVER'] = 'localhost'
    app.config['MAIL_PORT'] = 1025
    mail.send(Message('Hi', recipients=['a@b.com'], body='Hello'))

    Project example: MAIL_SERVER=localhost MAIL_PORT=1025. Production later SendGrid/SES.

    Viva tipFayda: universal. Nuksaan: deliverability, spam, sync send slow — isliye Celery + MailHog in dev.

  56. 56
    What are the advantages and disadvantages of SMTP?
    Times asked 1
    Official solution

    Simple

    Faydestandard, har jagah. Nuksaan: spam, auth complex, sync slow.

    Course SMTP + MailHog. Real product: SES/SendGrid + bounce handling.

    Flask-Mail / SMTP se mail. Local MailHog fake server: SMTP 1025, UI 8025 — internet nahi, viva safe.

    Asli send Celery task mein, request thread mein nahi. Beat 6pm reminder, export ke baad CSV attach optional.

    MAIL_SERVER localhost demo. Gmail SMTP student account pe block common. Body mein user name personalization examiner dekhta hai.

    Project example: Celery + Flask-Mail + MailHog. Inbox nahi, UI :8025.

  57. 57
    Rate your application out of 5 and justify your rating.
    Times asked 1
    Official solution

    Simple3.5–4/5 + why: core done, tests/UI missing. 5/5 overclaim.

    Justify. Enjoy frontend vs backend honest.

    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: Weak: celery demo flaky / UI.

    Project example: Weak: celery demo flaky / UI.

  58. 58
    If your application crashes in production, how would you debug and resolve the issue?
    Times asked 1
    Official solution

    SimpleLogs gunicorn/journal, reproduce, hotfix, postmortem. Don't debug only prod.

    If application crashes production.

    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: Flask debug off prod.

    Project example: Flask debug off prod.

  1. 1
    Introduce yourself.
    Times asked 7
    Official solution

    Simple20-30 second intro, phir ID nikaal ke rakhna.

    Example'Namaste, main <Name> hoon, IITM BS degree, MAD-1 project <ProjectName> — Flask, SQLAlchemy, Jinja. Roles: Admin, Staff, User. CRUD, auth, search implement kiye.'

    Interest poochhe to ek genuine cheez (ML, web, cricket) + 1 line. Fake buzzwords mat maaro.
    End mein feedback maangna theek hai: 'Koi improvement suggest karenge?'

  2. 2
    Show ID card.
    Times asked 5
    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.

  3. 3
    Checksum / Download project from portal.
    Times asked 1
    Official solution

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

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

  4. 4
    Give a complete project demo.
    Times asked 2
    Official solution

    SimpleDemo script pehle se practice karo, 5-7 minute, saari roles.

    Suggested flow

    1) Register/login user 2) Admin login — CRUD 3) Approval/blacklist 4) Booking/apply 5) Search 6) Validation edge (slots 0, duplicate) 7) Logout
    Bolte-bolte dikhao: 'Yahan overbooking rokta hoon'. Code tab kholna jab poochhein.
    Crash ho to debug calmly: terminal error, typo, DB path.
    Mandatory features skip mat karna — examiner list tick karta hai.

  5. 5
    Explain your project in detail
    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.

  6. 6
    Rate your project.
    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.

  7. 7
    If a user reports a bug, how would you debug and solve it?
    Times asked 1
    Official solution

    SimpleFlask default port 5000. Change: app.run(port=8000) ya env PORT, ya flask run --port 8000.

    if __name__ == '__main__':
        app.run(debug=True, host='0.0.0.0', port=8000)

    Do apps ek saath: alag ports. Occupied port: error, doosra number try.

  8. 8
    Explain the complete code line by line.
    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.

  9. 9
    Explain frontend and backend code separately.
    Times asked 1
    Official solution

    SimpleFrontend user jo dekhta/click karta hai, Backend server logic + database.

    Frontend: HTML, CSS, Bootstrap, Jinja templates, thoda JS. Browser pe chalta hai.
    Backend: Flask routes, SQLAlchemy, session, validation. Python server pe.
    Data flow: form POST → Flask request.form → DB save → render_template/redirect → HTML dikha.
    MAD1 typical stack: Flask + Jinja + SQLAlchemy + SQLite + Bootstrap.

  10. 10
    Explain routes.py.
    Times asked 3
    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.

  11. 11
    Explain project components/modules.
    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.

  12. 12
    Explain all libraries/packages used in the project.
    Times asked 1
    Official solution

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

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

    Example

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

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

  13. 13
    Show frontend and backend folders in your project.
    Times asked 1
    Official solution

    SimpleFrontend user jo dekhta/click karta hai, Backend server logic + database.

    Frontend: HTML, CSS, Bootstrap, Jinja templates, thoda JS. Browser pe chalta hai.
    Backend: Flask routes, SQLAlchemy, session, validation. Python server pe.
    Data flow: form POST → Flask request.form → DB save → render_template/redirect → HTML dikha.
    MAD1 typical stack: Flask + Jinja + SQLAlchemy + SQLite + Bootstrap.

  14. 14
    Explain User model.
    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.

  15. 15
    Explain all models/tables.
    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.

  16. 16
    Explain the complete application.
    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.

  17. 17
    Explain database schema.
    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.

  18. 18
    Explain the purpose of every table.
    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.

  19. 19
    Explain database relationships.
    Times asked 4
    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.

  20. 20
    Add a new row in the database and show it in the application.
    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 }}
  21. 21
    What happens if an empty table is rendered?
    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.

  22. 22
    Explain ORM (practical explanation, not definition).
    Times asked 1
    Official solution

    SimpleORM = Object Relational Mapping. Database tables ko Python classes/objects se map karta hai, raw SQL kam likhni padti hai.

    Bina ORM: cursor.execute('SELECT * FROM user WHERE id=?', [5])
    ORM se: User.query.get(5) ya db.session.get(User, 5)

    Example model

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)

    FaydePython mein soch sakte ho, SQL injection se protection (parameterized), relationships easy, DB switch thoda aasan.

    Nuksaancomplex queries slow/abstract, seekhne ki layer extra, kabhi raw SQL phir bhi chahiye.

    MAD1: SQLAlchemy (Flask-SQLAlchemy). Tables db.create_all() ya migrations se banti hain.

  23. 23
    Advantages of ORM.
    Times asked 5
    Official solution

    SimpleORM = Object Relational Mapping. Database tables ko Python classes/objects se map karta hai, raw SQL kam likhni padti hai.

    Bina ORM: cursor.execute('SELECT * FROM user WHERE id=?', [5])
    ORM se: User.query.get(5) ya db.session.get(User, 5)

    Example model

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)

    FaydePython mein soch sakte ho, SQL injection se protection (parameterized), relationships easy, DB switch thoda aasan.

    Nuksaancomplex queries slow/abstract, seekhne ki layer extra, kabhi raw SQL phir bhi chahiye.

    MAD1: SQLAlchemy (Flask-SQLAlchemy). Tables db.create_all() ya migrations se banti hain.

  24. 24
    Disadvantages of ORM.
    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.

  25. 25
    Explain frontend validation.
    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.

  26. 26
    Explain backend validation.
    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.

  27. 27
    Which validation is more important?
    Times asked 1
    Official solution

    SimpleFrontend validation UX ke liye, Backend validation security ke liye. Dono chahiye, backend zyada important hai.

    Frontend: HTML required, minlength, JS/regex. User ko turant error dikhta hai. Bypass easy (DevTools / Postman).
    Backend: Flask route mein checks. Asli security yahi hai. Hacker frontend skip karke POST bhej sakta hai.

    Example frontend

    <input type='number' min='18' max='99' required>

    Example backend

    age = int(request.form.get('age') or 0)
    if age < 18 or age >= 100:
        flash('Invalid age')
        return redirect(url_for('register'))

    Viva line'Frontend convenience hai, backend source of truth hai.'

  28. 28
    Show validation implementation in your code.
    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.

  29. 29
    Can a Flask route/endpoint return a Boolean value?
    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.

  30. 30
    What is Flask?
    Times asked 6
    Official solution

    SimpleFlask Python ka micro web framework hai — routes, templates, request/response handle karta hai.

    from flask import Flask
    app = Flask(__name__)
    @app.route('/')
    def home():
        return 'Hello'
    app.run(debug=True)  # default port 5000

    __name__ se Flask ko pata chalta hai templates/static kahan se load karni hai. Hataoge to resource paths toot sakte hain.

    Faydesimple, flexible, MAD1 syllabus. Nuksaan: bade features (admin, auth) khud jodne padte hain.

    app.run() development server start karta hai. Production mein gunicorn/waitress.
  31. 31
    Difference between Python HTTP and Flask HTTP methods.
    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.

  32. 32
    How is data sent from client to server?
    Times asked 1
    Official solution

    Simple flow: Browser → Route (controller) → Model/DB → phir template (view) → Browser.

    Submit example:
    1) HTML form POST /register, name='email'
    2) register() request.form.get('email')
    3) User(email=...) ; db.session.add; commit
    4) redirect dashboard
    5) dashboard query + render_template
    6) Jinja {{ user.email }} / {% for %}

    GET search: /search?q=flask → request.args.get('q') → filter ilike → template list.
    JSON API: jsonify, frontend fetch().

  33. 33
    What is AJAX?
    Times asked 3
    Official solution

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

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

  34. 34
    Name some JavaScript frameworks.
    Times asked 1
    Official solution

    SimpleJavaScript browser pe chalta hai — click, validation, Chart.js, Bootstrap modal.

    Frameworks: Vue, React, Angular. MAD1 mein vanilla JS / Bootstrap JS kaafi.
    Modal: popup overlay. Bootstrap: data-bs-toggle='modal' data-bs-target='#id'.
    Flash hide: setTimeout se alert remove. Form submit confirm: onsubmit='return confirm(...)'.
    Agar project mein JS kam hai to sach bolo, theory example do.

  35. 35
    Types of frontend/client-side storage.
    Times asked 1
    Official solution

    Yeh MAD-1 viva question tumhare project ke context se linked hai. Short answer is structure se do:

    Pehle 1 line definition/purpose, phir tumhare project ka example, phir chhota code/flow.

    Typical Flask flowBrowser request → @app.route controller → SQLAlchemy model/DB → Jinja template response.

    Auth: session['user_id'] + role check. CRUD: add/commit, query.all, field update, delete.
    Live change maange to: related model → route → template, phir browser refresh karke dikhao.

    Example (generic create):
    obj = Model(name=request.form.get('name'))

    db.session.add(obj); db.session.commit()
    return redirect(url_for('list_view'))
  36. 36
    How many ways can data be stored in the browser?
    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.

  37. 37
    What is Version Control System (VCS)?
    Times asked 2
    Official solution

    SimpleVCS history track karta hai, Git ek distributed VCS hai.

    VCS: kaun kab kya change kiya, rollback, branches. Example: Git, SVN.
    Git distributed: har developer ke paas poori copy (commits) hoti hai. Central GitHub sirf remote hosting hai, lekin Git ka model distributed hai.
    SVN centralized: bina server ke history nahi.

    Commands: git status (kya dirty hai), git branch / git checkout -b feature (nayi branch), git rm --cached file (track band, file rahe).
    Fayda: collaboration, backup, experiment branches, viva GitHub collaborator check.
    Git ke bina bhi files rakh sakte ho, lekin history/merge nahi.

  38. 38
    Another name for Version Control System.
    Times asked 1
    Official solution

    SimpleVCS history track karta hai, Git ek distributed VCS hai.

    VCS: kaun kab kya change kiya, rollback, branches. Example: Git, SVN.
    Git distributed: har developer ke paas poori copy (commits) hoti hai. Central GitHub sirf remote hosting hai, lekin Git ka model distributed hai.
    SVN centralized: bina server ke history nahi.

    Commands: git status (kya dirty hai), git branch / git checkout -b feature (nayi branch), git rm --cached file (track band, file rahe).
    Fayda: collaboration, backup, experiment branches, viva GitHub collaborator check.
    Git ke bina bhi files rakh sakte ho, lekin history/merge nahi.

  39. 39
    Difference between Git and VCS.
    Times asked 1
    Official solution

    SimpleVCS history track karta hai, Git ek distributed VCS hai.

    VCS: kaun kab kya change kiya, rollback, branches. Example: Git, SVN.
    Git distributed: har developer ke paas poori copy (commits) hoti hai. Central GitHub sirf remote hosting hai, lekin Git ka model distributed hai.
    SVN centralized: bina server ke history nahi.

    Commands: git status (kya dirty hai), git branch / git checkout -b feature (nayi branch), git rm --cached file (track band, file rahe).
    Fayda: collaboration, backup, experiment branches, viva GitHub collaborator check.
    Git ke bina bhi files rakh sakte ho, lekin history/merge nahi.

  40. 40
    Difference between Cell Padding and Cell Spacing.
    Times asked 3
    Official solution

    Simplecellpadding cell ke andar gap, cellspacing cells ke beech gap.

    cellpadding: text aur cell border ke beech khali jagah (andar).
    cellspacing: do cells ke beech khali jagah (bahar).

    Old HTML: <table cellpadding='10' cellspacing='5'>
    Modern CSS:
    td { padding: 10px; } /* padding */
    table { border-spacing: 5px; } /* spacing */

    border-collapse: collapse spacing hata deta hai, borders mil jaate hain.

  41. 41
    Difference between url_for() and redirect().
    Times asked 2
    Official solution

    Simpleurl_for sirf URL string banata hai, redirect us URL pe browser ko bhejta hai.

    url_for('home') → '/home' (function name se URL nikalta hai)
    redirect(url_for('home')) → browser ko /home pe le jaata hai

    Example

    return redirect(url_for('dashboard'))  # sahi
    return redirect('/dashboard')         # hardcode, route change pe toot jaayega
    
    Agar redirect se url_for hata do to khud path string dena padega: redirect('/dashboard').
    Agar url_for('home') ko url_for('home_page') kar do aur home_page naam ka function nahi hai to BuildError aayega.

    url_for ko function ka naam chahiye, URL path nahi.

  42. 42
    What is Bootstrap?
    Times asked 4
    Official solution

    SimpleBootstrap CSS/JS framework — ready classes se responsive UI.

    <button class='btn btn-primary'>Save</button>

    Red button: btn btn-danger. Navbar, cards, grid (row/col).
    CDN: <link href='https://cdn.jsdelivr.net/npm/bootstrap@5...'> — internet na ho to style toot sakti hai. Local copy safer viva ke liye.
    CSS vs Bootstrap: Bootstrap faster consistent UI, custom CSS fine-control. Dono saath use ho sakte hain.
    aria-current='page' accessibility — current nav item screen readers ko.
    CDN fayda: cache, quick setup. Nuksaan: offline, privacy, version lock.

  43. 43
    Why did you use Bootstrap instead of CSS?
    Times asked 1
    Official solution

    SimpleBootstrap CSS/JS framework — ready classes se responsive UI.

    <button class='btn btn-primary'>Save</button>

    Red button: btn btn-danger. Navbar, cards, grid (row/col).
    CDN: <link href='https://cdn.jsdelivr.net/npm/bootstrap@5...'> — internet na ho to style toot sakti hai. Local copy safer viva ke liye.
    CSS vs Bootstrap: Bootstrap faster consistent UI, custom CSS fine-control. Dono saath use ho sakte hain.
    aria-current='page' accessibility — current nav item screen readers ko.
    CDN fayda: cache, quick setup. Nuksaan: offline, privacy, version lock.

  44. 44
    What is JSON?
    Times asked 1
    Official solution

    SimpleJSON = JavaScript Object Notation — data exchange ka text format.

    {"name": "Ram", "age": 20}
    APIs, localStorage, Chart.js data. Python dict ↔ JSON.
    Structured data: tables, fixed schema (SQL). Unstructured: images, logs, free text. JSON semi-structured.
    SQL structured relational. Mongo unstructured/document.

  45. 45
    Can an API return a Boolean value?
    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.

  46. 46
    Why is SQL verbose?
    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
    Change background color.
    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>

  48. 48
    Change background image.
    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>

  49. 49
    Add background image with gradient.
    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.

  50. 50
    Change navbar color.
    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>

  51. 51
    Change button color.
    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>

  52. 52
    Change font/text color.
    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>

  53. 53
    Change specific object colors.
    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.

  54. 54
    Move navbar from top to bottom.
    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>

  55. 55
    Move navbar to the middle/bottom of the page.
    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>

  56. 56
    Change dashboard colors (background, blocks, text).
    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.

  57. 57
    Change login page background.
    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.

  58. 58
    Change input box colors.
    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
    Modify the User model and reflect the changes.
    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.

  60. 60
    Add a new database row and display it.
    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 }}
  61. 61
    Manually create a new user in the database.
    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 }}
  62. 62
    Add alcohol category/products.
    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 }}
  63. 63
    Aadhaar upload for alcohol purchase.
    Times asked 1
    Official solution

    Yeh MAD-1 viva question tumhare project ke context se linked hai. Short answer is structure se do:

    Pehle 1 line definition/purpose, phir tumhare project ka example, phir chhota code/flow.

    Typical Flask flowBrowser request → @app.route controller → SQLAlchemy model/DB → Jinja template response.

    Auth: session['user_id'] + role check. CRUD: add/commit, query.all, field update, delete.
    Live change maange to: related model → route → template, phir browser refresh karke dikhao.

    Example (generic create):
    obj = Model(name=request.form.get('name'))

    db.session.add(obj); db.session.commit()
    return redirect(url_for('list_view'))
  64. 64
    Verify user age (24+) before adding alcohol to cart.
    Times asked 1
    Official solution

    Yeh MAD-1 viva question tumhare project ke context se linked hai. Short answer is structure se do:

    Pehle 1 line definition/purpose, phir tumhare project ka example, phir chhota code/flow.

    Typical Flask flowBrowser request → @app.route controller → SQLAlchemy model/DB → Jinja template response.

    Auth: session['user_id'] + role check. CRUD: add/commit, query.all, field update, delete.
    Live change maange to: related model → route → template, phir browser refresh karke dikhao.

    Example (generic create):
    obj = Model(name=request.form.get('name'))

    db.session.add(obj); db.session.commit()
    return redirect(url_for('list_view'))
Created for educational purposes only. Questions are based on students' personal experiences and may not reflect actual exam content.