Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level2_127

Share your experience Add your viva experience here
362 Questions
69 Sets
0 Topics
31 Reviews
Tips for this examiner: Just give your best. Don't need to hesitate.
Be polite and answer the question.

Student reviews

Anonymous MAD1

Proctor is good, he will let you explain without interrupting.

Questions remembered
  1. LEVEL 1 1)Asked to show ID 2)Asked to show git repository and asked to show that you have added the collaborator 3)You can either run checksum or download from the project submission portal
  2. He asked to explain the project a little while running it and specifically asked to show a few functionalities Viva questions-
  3. Explain MVC 2)Open notepad and show i) Jinja loop ii) App route with just POST method
P MAD1

He is very chill gives u full space does not interrupt in between,I even came 2 mins late ,he did not even bring it up .Just be confident and answer with conviction

Questions remembered
  1. -Show your id card
  2. -show your github repo and collaborator
  3. -Download your project from the portal and set it up and demonstrate
  4. -after the demonstration he asked
  5. -what is cascade
  6. -what do you understand by MVC
  7. -Write an jinja if condition in your notepad
  8. Then he said your viva is finished you've answered all the questions and shown ur project successfully best of luck for lvl 2
Pushkar C MAD1

Pretty Chill.Did not ask me to make modifications in my case. Be confident even if its wrong.If you are thorough with your code,viva level 1 is easy to ace.All the best!

Questions remembered
  1. I joined meeting 10 mins before the actual viva starts.Proctor too joined early just 2 mins after I joined.
  2. First he asks you to show your id card.
  3. Then asks you to show GitHub project repo and show whether you have added collaborator or not.
  4. Asks you to demonstrate your project.
  5. He gives you an option either to do checksum or directly download from submission portal(checksum is not preferred imo given the 10 min time constraints).
  6. I was quickly able to setup my project,so viva lasted around 20 mins.
  7. After demo, he asked me to show models.py file.There he asked me:
  8. 1.What is back_populate
  9. 2.What do you mean by mvc architecture in context of this project
  10. 3.Last question, he asked me to write jinja for loop in notepad.
Sheet response MAD1

demonstrate your code with confidence take as much as time you want
my viva happened for 20 minutes ...He is a chill guy be confident and present yourself

Questions remembered
  1. LEVEL 1 VIVA
  2. 1.demonstarte your application
  3. 2.what is MVC?
  4. 3.http methods
  5. 4.if code in jinja template
  6. 5.sql basic queries
Sheet response MAD1

The proctor is very chill , doesn't ask a lot of questions , you are lucky if you get this proctor

Questions remembered
  1. LEVEL-1
  2. show ID
  3. download project from portal
  4. then he asked me to explain the project- didn't interrupt - let me finish
  5. explain MVC
  6. explain ORM
  7. write a jinja for loop
Sheet response MAD1

He is a good proctor usually ask the same questions.Just go through his questions given in this sheet.

Questions remembered
  1. - Download code from portal
  2. - Show GitHub and Collaborater
  3. - Show Your Project (He doesn't interfere so waste time here)
  4. - What is Cascade
  5. - What is MVC
  6. - create a button in html such that only admin can see or access this button using Jinja { if condition}.
Hadez MAD1

just honest with your answers and be calm , proctor is very kind

Questions remembered
  1. 1.show id , github collaborator and download submission from the portal
  2. 2.ask me to do demo
  3. 3.ask me to explain student class in models.py
  4. 4.ask me to write if condition in jinja
  5. 5.ask me to write app.route that uses only post method
  6. i did all that correctly and even i didnt write full route code he said its enough for me thats it for viva 1 goodluck for viva 2
Subham MAD1

Chill guy very polite

Questions remembered
  1. Github repo, ID card, download from portal
  2. Demo (10 mins)
  3. what is back_ref?
  4. MVC
  5. if statement in jinja
  6. app route using POST only
PkD MAD1

Overall he was very kind, Atleast prepare your basics and know you code.

Questions remembered
  1. 1.What is MVC. 2.What is nullable in your model 3.code question - to write a query which user filter.
  2. to write for loop of jinja 5.asked about some functions of my project .
Aman Kumar Verma MAD1

If you understand code properly or like in this sheet your proctor is already taken viva other students so go to the question ask by proctor similar question asked by proctor many time and keep patience you are done with your level 1 viva easily

Questions remembered
  1. My viva level 1 is done today repeated questions is asked by proctor level2_127 like what is cascading write a for loop in jinja what is jinja and explain your model.py and your created dashboard
Hamza MAD1

Just remember syntex of flask route and jinja loop ( if and For) and some basic questions like MVC and you are good to go

Questions remembered
  1. . What is MVC model
  2. . Open blank notepad
  3. . Write flask route for Route which accept GET and POST. ( My syntex was not write I did mistake he didn't said anything asked nest questions)
  4. .write jinja for loop
Sheet response MAD1

Anyways, the proctor is chill and kind one. If you stuck somewhere, he will help you as well

Questions remembered
  1. Show Id
  2. Show github and collaborator
  3. Show demonstration
  4. What is MVC?? (Asked for C in this term specially)
  5. Write Jinja-if Code on notepad.
  6. Write query where username is admin
Shradha MAD1

he was chill, half of the time he didnt speak he spoke only to ask questions or whenever i asked him anything.
be calm.
if you dont get any thing or error take your time and u can ask him also and explain what happened.
All the best be confident in whatever u say.

Questions remembered
  1. My session was 11 30 to 12 00 I went inside the meet by 11 20 and he came by 11 25
  2. he asked to show id
  3. to show github collaborator
  4. to show the demo(I explaine all functionalities, no interruption, u can use this time to waste) (at the start of the demo the website didnt open, i asked i ran the code before but no it's not he said to manually copy the link and paste it , it will run, better to explain your situation rather being confused by yourself)
  5. he asked to show the code, asked model.py, in that he asked what is lazy(I explained lazy=true, and lazy=dynamic which i used in my app)
  6. At last he asked what do you understand by MVC the session was over by 11 50 so it was hardly 20 to 25 mins.
Apurav Kashyap MAD1

The examiner is very kind and supportive. You can focus on the core functionality and also review the previously asked questions from the sheet

Questions remembered
  1. First, he asked me to show my ID card.
  2. Then, he asked me to show my GitHub collaborator access.
  3. After that, he asked me to download the project from the viva portal.
  4. Then, he instructed me to set up and run my project. I took a little more time to set it up, so he asked me to do it faster.
  5. After that, I demonstrated my project and explained its core functionality.
  6. Then, he asked me to write code for a route that accepts the PUT method and also write an if condition in Jinja in Notepad.
  7. At last, he asked me to explain MVC.
- MAD1

proctor is chill

Questions remembered
  1. Demonstration
  2. Authorization vs authentication
  3. Different request methods
  4. GET vs POST
  5. open notepad, n write if loop in jinja
  6. Proctor level2_127
Aravind MAD1

He is very polite and professional. He usually asks the same basic questions, like the Jinja loop code, so be prepared for that. He doesn’t go too deep — just the fundamentals.
At the end, he said I did very well, that my project seemed good (though I know it’s not great), and he also advised me to prepare for the Level 2 Viva.
If you get this examiner as your proctor, consider yourself extremely lucky.

Questions remembered
  1. ID card
  2. Github to verify collaborator
  3. Project demo
  4. Jinja code for loop 5)Code for route with PUT and POST method
  5. What's lazy??
Divyanshu MAD1

Be confident, sir is very chill, he gives u much time to do what he said, so don't panic.

Questions remembered
  1. I'd,
  2. Github collaborator.
  3. All functionality check,
  4. Explain each models ,
  5. Why u use (lazy = True),
  6. Write a for loop in jinja,
  7. Write a route for loading a html page, taking user_id as input ,
Sheet response MAD1

he is a chill guy just follow the sheet for this proctor

Questions remembered
  1. show demo
  2. what is cascade
  3. in notepad write a jinja for loop
  4. in notepad write a simple route that returns hello world that's it
Sumaiya MAD1

proctor was good enough..try to be confident

Questions remembered
  1. Level 1 viva
  2. *show id card
  3. *show github repo collaborator
  4. *show id card
  5. *project demonstration
  6. *asked http methods
  7. *asked all core functionalities
  8. *asked to write jinja for loop on notepad
  9. *asked one line from code
Hermione MAD1

Proctor is very chill...you will be lucky if you get him as your proctor...Remember to ask for feedback

Questions remembered
  1. -Demonstrate your project
  2. -Asked me if I made a function that no 2 patients can book the same slot
  3. -Asked me to write password column in users table with string len of 200 and unique=true
  4. -Asked me where to show where I have used for loop in html
  5. -Asked me to if I have prepared any charts and stuff..which I didn't
  6. -Asked me give info of each column in Doctor table
Sheet response MAD1

He's a chill kinda guy

Questions remembered
  1. 1.He asked to show id and github collaborator
  2. Asked to download the project and set it up
  3. Asked to book two slots with same vehicle no(mine got booked so he said thats an issue..it logically wrong)
  4. Cascading in database, put and post difference and different http method
Sheet response MAD1

proctor is chill just be confident

Questions remembered
  1. ID CHECK
  2. GITHUB COLLAB CHECK
  3. DOWNLOAD PROJECT FROM PORTAL NO CHECKSUM
  4. PROJECT DEMO
  5. SLIGHT GLANCE AT CODE
  6. ASKED TO CREATE NEW LOT
  7. UPDATE NUMBER OF PARKING SPOTS IN THE LOT
  8. DELETE LOT
  9. TEMPLATE INHERITANCE
  10. PUT AND POST
A MAD1

Greet him , Explain with ease , take time. Overall chill and super supportive

Questions remembered
  1. Id card and github repo collaborator
  2. Download the project from portal and demonstrate it
  3. Cascading
  4. Types of request methods and how many
  5. Difference between Put and Post
  6. Login as an admin and edit parking lot
  7. Asked me if i made summary charts , I didnt - Said no worries
.. MAD1

You already know the generic flow of what happens after what (I'd card then Github then code then...)
He might be late in responding to you if you're asking if I shall proceed with next step (name it)
But I'd recommend you to still wait most of the times.

Questions remembered
  1. All processes (from id card to running project) Includes showing collaborator on Github repository.
  2. Can u tell me what request methods we have? (http methods)
  3. What do u mean by cascade? >> have you declared the AI usage in your docs?
Sheet response MAD1

don't rush explain slowly

Questions remembered
  1. 1.authentication vs authorization
  2. 2.cascade menaing in database
anonymus MAD1

Consider yourself lucky if u get this proctor, but sure to greet him...

Questions remembered
  1. Level 1 Viva
  2. 1.Overall the proctor was chill
  3. 2.Asked me to show github profile to see colaborator and id card for verification
  4. 3.Asked to to download my submission from the viva portal for execution
  5. 4.Asked me to execute my project and explain the working(he just let me explain , no cross-question)
  6. 5.asked 3 questions, one about 'what is cascade?', 'wht are the request methods' and what is the diff between post and put'
  7. 6.Wished me well for level 2 viva
... MAD1

Shared viva questions from response sheet: id check; demo; show models.py. explain the reservation table

Questions remembered
  1. id check
  2. demo
  3. show models.py. explain the reservation table
  4. what are the request methods
  5. show routes.py -> admin routes.
  6. exlplain the code flow from login to admin dashboard. gave a feedback and suggestions viva 2 .END
gangleader MAD1

Make sure you are already logged in and have everything ready for fast viva. Proctors are overworked due to large number of student so try not to waste time in opening id or forgetting commands for project. This will save you time and anxiety

Questions remembered
  1. THIS WAS FOR VIVA 1 only (yet to give 2nd viva)
  2. - id verification from documents to download
  3. - portal download so no checksum
  4. - waited for me to install the requirement and start the project demonstration
  5. - what do you understand by MVC . Explain
  6. - open your models.py and explain the User model (table)
  7. - you fulfilled the requirements for the project .
  8. - have a great day . End of viva
anonymus MAD1

chill. show all functionalities correctly.

Questions remembered
  1. this is my level1 viva.
  2. show the id card
  3. demonstration of project
  4. explain the user table with all components in it.(like all fields, relationships, lazy, cascade)
  5. define primary key, @, app.route, crud.
Sheet response MAD1

chill guy, just be honest and upfront about your project.

Questions remembered
  1. It was my L1 Viva with this examiner. the viva flow was like:
  2. 1.) Checksum process
  3. 2.) Start the Project and explain the basic code structure
  4. 3.) Give Project Demo
  5. 4.) Read a bunch of core functionalities and asked me to showcase them one by one.
  6. 5.) Gave a few tips and things to brush up on before the L2 and said best of luck.
Vaibhav MAD1

All Procter's are awesome, chill. You just need to explain your project briefly (all roles and functions)

Questions remembered
  1. So basically it was my "level 1" viva
  2. show your college Id
  3. show checksum
  4. explain project (Name, motive)
  5. I was kinda lucky next and last que was demostrate your prject show all functanilties (i have explain all roles and funcions in about 15 minutes with live db browswer)
  6. My summary section got error, but my Procter was nice, chill he said no worries improve in level 2 viva and also said all the best for level 2

Approved viva sets

  1. 1
    write a function on notepad where it takes two numbers and return their sum.
    Times asked 1
Advice: Nice proctor. Just prepare from sheet Nothing to worry about relax.
  1. 1
    Show Id card and Github repo
    Times asked 1
  2. 2
    Demo of the app
    Times asked 8
  3. 3
    Show mailhog, daily reminder and monthly report
    Times asked 2
  4. 4
    Show api of catching. Where have u implemented it
    Times asked 2
  5. 5
    Regarding jwt token
    Times asked 2
  6. 6
    Code- write a function on notepad where Integer becomes 4 times
    Times asked 1
Advice: Nice proctor. Asked same questions as provided in sheet before.
  1. 1
    Download from portal and run
    Times asked 2
  2. 2
    Give Demo
    Times asked 4
  3. 3
    Explained about Mailhog part
    Times asked 2
  4. 4
    Checked models.py file , asked some basic question
    Times asked 2
  5. 5
    Write a javascript function which accepts a input and return cube of a number , i write two variations of it because I messed up syntax a bit
    Times asked 1
  6. 6
    Overall he was satisfied in the end .. was very calm throughout the viva.
    Times asked 2
Advice: Practice sheet questions only and you are good to go.
  1. 1
    2.GitHub Repo and collaboraters
    Times asked 1
  2. 2
    4.Asked if background mailing jobs had been added
    Times asked 2
  3. 3
    5.Asked if caching had been done
    Times asked 2
  4. 4
    6.Asked about authentication token used
    Times asked 2
  5. 5
    8. Asked me to write JS code to return the squared value of an integer
    Times asked 2
Advice: This was a Level 1 Viva.Most questions were in sheet already. I asked to refer VueJs documentation but he just gave a different question for JavaScript instead.
  1. 1
    Explain Lazy loading
    Times asked 2
  2. 2
    write the app route code for post and get methods
    Times asked 1
Advice: he lets you explain your full project, you can explain whatever you know, he will listen, I explained a bit of code as well so he didn't ask me more questions. refer the response sheet for the questions and be thorough in those.
  1. 1
    Show demo
    Times asked 11
  2. 2
    Code a function in vue that returns Square of a number in notepad
    Times asked 2
Advice: Chill proctor, practice sheet questions and good to go
  1. 1
    Showed my valid ID card and GitHub repository with collaborators.
    Times asked 2
  2. 2
    Ran the placement portal app and demonstrated core functionalities like student/company management and drive approvals.
    Times asked 2
  3. 3
    Triggered emails and showed proof in MailHog inbox.
    Times asked 2
  4. 4
    Selected a user by ID using Python SQLAlchemy ORM and explained the query.
    Times asked 2
Advice: Demonstrate basic JavaScript, ORM queries, Flask routes, Vue directives, and Jinja basics only.
  1. 1
    Celery task show karo kaha implement kiya hai
    Times asked 2
  2. 2
    Write a code in Javascript to take 3 numbers and print the sum of it
    Times asked 2
  3. 3
    What is the percentage of AI used in your project
    Times asked 2
  4. 4
    Write if statement in vuejs
    Times asked 2
Advice: He is calm and chill , know your project and prepare well
  1. 1
    For Level 1
    Times asked 2
  2. 2
    1.ID
    Times asked 2
  3. 3
    2.Git-colabratoar
    Times asked 2
  4. 4
    3.Demo
    Times asked 2
  5. 5
    4.Ask theory questions
    Times asked 2
  6. 6
    4.1. Celery
    Times asked 2
  7. 7
    4.2.redish
    Times asked 2
  8. 8
    4.3.What cache
    Times asked 2
  9. 9
    4.4 what do u use for token in project(JSWT)
    Times asked 2
  10. 10
    5.Coding Part
    Times asked 2
  11. 11
    5.1Make loop in vue.js
    Times asked 2
  12. 12
    5.2.Write 2 routes for Post and Put methods.
    Times asked 2
Advice: They ask theory questions + 2 coding part . Chill guy
  1. 1
    I had Level 1 by this proctor
    Times asked 2
  2. 2
    -Turn on google meet on phone for oppe style viva
    Times asked 2
  3. 3
    - Gthub collaborator
    Times asked 2
  4. 4
    -Run the app
    Times asked 2
  5. 5
    -Do all functionalities work, I had one error two people could book the same doctor but I couldn't correct it, he gave me hints and I tried to approach
    Times asked 2
  6. 6
    - route to add two numbers in notepad taken from browser
    Times asked 2
  7. 7
    -caching and why its implemented
    Times asked 2
  8. 8
    -vue life cycle hooks
    Times asked 2
  9. 9
    - some questions like can the doctor book for 7 days etc
    Times asked 2
  10. 10
    -cascading, lazy loading
    Times asked 2
  11. 11
    -does mail hog work, show the backend tasks like csv files, celery,redis
    Times asked 2
Advice: Very chill proctor, one of the best people/proctor and understanding I had to kill a redis server but forgot the command so I saw in my notebook and explained I haven't done system commands He said okay just keep the refrence book infront of you maybe to verify it was self made notes Just go through the above sheet most of the questions will come from it. I studied the entire sheet of all proctors for better help while prep try to atleast do for the proctor assigned to you and know your code
  1. 1
    Function in jinja which calculates cube of a integer
    Times asked 2
  2. 2
    Showing of code
    Times asked 2
  3. 3
    Best of luck
    Times asked 2
  1. 1
    Write app.route in notepad for get and post only
    Times asked 2
  2. 2
    What is authtication vs autorization
    Times asked 2
  3. 3
    Show Background jobs celery and redis
    Times asked 2
  4. 4
    Did you implement caching if yes show the api/ where did you implement
    Times asked 2
Advice: He is very calm and good proctor!
  1. 1
    Explain the code
    Times asked 1
  2. 2
    write route function
    Times asked 2
  3. 3
    write a special js function to find and print cube roots something
    Times asked 1
Advice: overall he was kindof very rude and didnt even gave a second chance nd asked very out of nowhere quetions be ready to code anything he likes even out of your project i highly doubt that the proctor id of 128 and 127 are exchanged as compared to previous terms, so bach k rehna
  1. 1
    show model.py
    Times asked 2
  2. 2
    what is lazy( wrt models )
    Times asked 2
  3. 3
    what is cascading( wrt models )
    Times asked 1
  4. 4
    write code to implement v-if, v-else
    Times asked 2
  5. 5
    how auth_token was created
    Times asked 2
  1. 1
    Verified ID card
    Times asked 2
  2. 2
    Checked GitHub collaborator
    Times asked 1
  3. 3
    Began the demo — modules were taking time to import, so provided a code walkthrough in the meantime
    Times asked 2
  4. 4
    Showed the relevant code sections (JWT implementation and cache usage)
    Times asked 2
  5. 5
    Opened Notepad and explained a use case for the v-if / v-else directive
    Times asked 2
  6. 6
    Started the demo and showcased all major features, especially MailHog integration and async jobs
    Times asked 2
  7. 7
    Explained the models, including cascade behavior
    Times asked 2
  8. 8
    Overall, he was very patient and pleasant to work with.
    Times asked 2
Advice: practice routes and v-directives on notepad and learn definitions
  1. 1
    What happens when two patients try to book an appointment with same doctor and datetime?
    Times asked 2
  2. 2
    Open Notepad and write the code for if-else in Vue.js
    Times asked 2
  3. 3
    Write the code to select a user by id using ORM.
    Times asked 2
Advice: You should which piece of logic/code is in which file. Examiner gives sufficient time to answer.
  1. 1
    Project: Vehicle Parking App
    Times asked 2
  2. 2
    Both proctors checked core functionalities
    Times asked 2
  3. 3
    And told to explain models
    Times asked 2
  4. 4
    level1:
    Times asked 2
  5. 5
    Q. Authorisation and Authentication
    Times asked 2
  6. 6
    Q. what is used for token based authentication.
    Times asked 2
  7. 7
    Q. Use of caching
    Times asked 1
  8. 8
    level2:
    Times asked 1
  9. 9
    Everything that is asked before, no Code changes asked
    Times asked 2
  10. 10
    Checked if I have parked with a vehicle no. then if I can book with same no. even before releasing it.
    Times asked 2
  11. 11
    new questions were
    Times asked 2
  12. 12
    Q. What is smtp
    Times asked 2
  13. 13
    Q. Webhooks
    Times asked 2
  1. 1
    Show Git hub Repo and Collaborator
    Times asked 2
Advice: Proctor is Chill, just say answers confidently.
  1. 1
    asked to show GitHub repo and collaborators
    Times asked 2
  2. 2
    project demo
    Times asked 4
  3. 3
    perform backend task
    Times asked 2
  4. 4
    asked to show redis if used
    Times asked 2
  5. 5
    what cscade?
    Times asked 2
Advice: Was chill, i also asked for any tips for l2 viva
  1. 1
    This is my level 1 viva
    Times asked 2
  2. 2
    show me the GitHub account and collaborator
    Times asked 2
  3. 3
    Did you filled the form
    Times asked 2
  4. 4
    Show me the curd operations
    Times asked 2
  5. 5
    Explain your project what you have done. during viva I lost the connection and rejoined. He is very clam and nice.
    Times asked 2
Advice: Just give your best. Don't need to hesitate. Be polite and answer the question.
  1. 1
    He asked to explain the project a little while running it and specifically asked to show a few functionalities Viva questions-
    Times asked 1
    Official solution

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

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  2. 2
    Explain MVC 2)Open notepad and show i) Jinja loop ii) App route with just POST method
    Times asked 1
    Official solution

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

    Example

    {% for u in users %}
      <tr><td>{{ loop.index }}</td><td>{{ u.email }}</td></tr>
    {% endfor %}
Advice: Proctor is good, he will let you explain without interrupting.
  1. 1
    -after the demonstration he asked
    Times asked 1
    Official solution

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

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

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

Advice: He is very chill gives u full space does not interrupt in between,I even came 2 mins late ,he did not even bring it up .Just be confident and answer with conviction
  1. 1
    I joined meeting 10 mins before the actual viva starts.Proctor too joined early just 2 mins after I joined.
    Times asked 1
    Official solution

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

  2. 2
    He gives you an option either to do checksum or directly download from submission portal(checksum is not preferred imo given the 10 min time constraints).
    Times asked 1
    Official solution

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

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

  3. 3
    I was quickly able to setup my project,so viva lasted around 20 mins.
    Times asked 1
    Official solution

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

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  4. 4
    2.What do you mean by mvc architecture in context of this project
    Times asked 1
    Official solution

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

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

Advice: Pretty Chill.Did not ask me to make modifications in my case. Be confident even if its wrong.If you are thorough with your code,viva level 1 is easy to ace.All the best!
  1. 1
    1.demonstarte your application
    Times asked 1
    Official solution

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

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

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

  2. 2
    4.if code in jinja template
    Times asked 1
    Official solution

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

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
  3. 3
    5.sql basic queries
    Times asked 1
    Official solution

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

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

    Example

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

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

Advice: demonstrate your code with confidence take as much as time you want my viva happened for 20 minutes ...He is a chill guy be confident and present yourself
  1. 1
    then he asked me to explain the project- didn't interrupt - let me finish
    Times asked 1
    Official solution

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

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  2. 2
    explain ORM
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
Advice: The proctor is very chill , doesn't ask a lot of questions , you are lucky if you get this proctor
  1. 1
    - Download code from portal
    Times asked 1
    Official solution

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

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

  2. 2
    - Show GitHub and Collaborater
    Times asked 1
    Official solution

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

    Example

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

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

  3. 3
    - Show Your Project (He doesn't interfere so waste time here)
    Times asked 1
    Official solution

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

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

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

  4. 4
    - create a button in html such that only admin can see or access this button using Jinja { if condition}.
    Times asked 1
    Official solution

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

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
Advice: He is a good proctor usually ask the same questions.Just go through his questions given in this sheet.
  1. 1
    2.ask me to do demo
    Times asked 1
    Official solution

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

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

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

  2. 2
    5.ask me to write app.route that uses only post method
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  3. 3
    i did all that correctly and even i didnt write full route code he said its enough for me thats it for viva 1 goodluck for viva 2
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: just honest with your answers and be calm , proctor is very kind
  1. 1
    Demo (10 mins)
    Times asked 1
    Official solution

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

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

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

  2. 2
    if statement in jinja
    Times asked 1
    Official solution

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

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
  3. 3
    app route using POST only
    Times asked 1
    Official solution

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

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

    Example

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

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

Advice: Chill guy very polite
  1. 1
    . Open blank notepad
    Times asked 1
    Official solution

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

  2. 2
    . Write flask route for Route which accept GET and POST. ( My syntex was not write I did mistake he didn't said anything asked nest questions)
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: Just remember syntex of flask route and jinja loop ( if and For) and some basic questions like MVC and you are good to go
  1. 1
    Show demonstration
    Times asked 1
    Official solution

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

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

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

  2. 2
    Write Jinja-if Code on notepad.
    Times asked 1
    Official solution

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

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
  3. 3
    Write query where username is admin
    Times asked 1
    Official solution

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

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

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

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

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

Advice: Anyways, the proctor is chill and kind one. If you stuck somewhere, he will help you as well
  1. 1
    My session was 11 30 to 12 00 I went inside the meet by 11 20 and he came by 11 25
    Times asked 1
    Official solution

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

    Example

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

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

  2. 2
    At last he asked what do you understand by MVC the session was over by 11 50 so it was hardly 20 to 25 mins.
    Times asked 1
    Official solution

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

    Example

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

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

Advice: he was chill, half of the time he didnt speak he spoke only to ask questions or whenever i asked him anything. be calm. if you dont get any thing or error take your time and u can ask him also and explain what happened. All the best be confident in whatever u say.
  1. 1
    First, he asked me to show my ID card.
    Times asked 1
    Official solution

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

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

  2. 2
    Then, he asked me to show my GitHub collaborator access.
    Times asked 1
    Official solution

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

    Example

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

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

  3. 3
    After that, he asked me to download the project from the viva portal.
    Times asked 1
    Official solution

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

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

  4. 4
    After that, I demonstrated my project and explained its core functionality.
    Times asked 1
    Official solution

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

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

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

  5. 5
    At last, he asked me to explain MVC.
    Times asked 1
    Official solution

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

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

Advice: The examiner is very kind and supportive. You can focus on the core functionality and also review the previously asked questions from the sheet
  1. 1
    Different request 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.

  2. 2
    GET vs POST
    Times asked 2
    Official solution

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

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  3. 3
    open notepad, n write if loop in jinja
    Times asked 1
    Official solution

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

    Example

    {% for u in users %}
      <tr><td>{{ loop.index }}</td><td>{{ u.email }}</td></tr>
    {% endfor %}
  4. 4
    Proctor level2_127
    Times asked 1
    Official solution

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

Advice: proctor is chill
  1. 1
    Jinja code for loop 5)Code for route with PUT and POST method
    Times asked 1
    Official solution

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

    Example

    {% for u in users %}
      <tr><td>{{ loop.index }}</td><td>{{ u.email }}</td></tr>
    {% endfor %}
Advice: He is very polite and professional. He usually asks the same basic questions, like the Jinja loop code, so be prepared for that. He doesn’t go too deep — just the fundamentals. At the end, he said I did very well, that my project seemed good (though I know it’s not great), and he also advised me to prepare for the Level 2 Viva. If you get this examiner as your proctor, consider yourself extremely lucky.
  1. 1
    I'd,
    Times asked 1
    Official solution

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

  2. 2
    All functionality check,
    Times asked 1
    Official solution

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

  3. 3
    Why u use (lazy = True),
    Times asked 1
    Official solution

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

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

    Example

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

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

  4. 4
    Write a route for loading a html page, taking user_id as input ,
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: Be confident, sir is very chill, he gives u much time to do what he said, so don't panic.
  1. 1
    *asked http methods
    Times asked 1
    Official solution

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

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

    GET exists bina REST ke bhi — browser address bar.

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

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

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

    Example

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

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

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

  2. 2
    *asked one line from code
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: proctor was good enough..try to be confident
  1. 1
    -Demonstrate your project
    Times asked 1
    Official solution

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

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

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

  2. 2
    -Asked me if I made a function that no 2 patients can book the same slot
    Times asked 1
    Official solution

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

  3. 3
    -Asked me to write password column in users table with string len of 200 and unique=true
    Times asked 1
    Official solution

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

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

    Example

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

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

  4. 4
    -Asked me where to show where I have used for loop in html
    Times asked 1
    Official solution

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

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

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

  5. 5
    -Asked me to if I have prepared any charts and stuff..which I didn't
    Times asked 1
    Official solution

    SimpleCounts API, bar/pie, booking ke baad number badle.

    2 colors live task common.

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

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

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

    Example

    new Chart(ctx, {
      type: 'bar',
      data: { labels: ['Jan','Feb'], datasets: [{ data: [12, 19], backgroundColor: ['#36a','#f80'] }] }
    })

    Project example: Admin dashboard.

    Viva tipBooking karke chart update dikhao. Examiner 2 colors maange to backgroundColor array chhota kar do.

  6. 6
    -Asked me give info of each column in Doctor table
    Times asked 1
    Official solution

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

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

    Example

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

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

Advice: Proctor is very chill...you will be lucky if you get him as your proctor...Remember to ask for feedback
  1. 1
    Asked to book two slots with same vehicle no(mine got booked so he said thats an issue..it logically wrong)
    Times asked 1
    Official solution

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

  2. 2
    Cascading in database, put and post difference and different http method
    Times asked 1
    Official solution

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

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

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

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

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

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

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

    Example

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

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

Advice: He's a chill kinda guy
  1. 1
    GITHUB COLLAB CHECK
    Times asked 1
    Official solution

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

    Example

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

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

  2. 2
    SLIGHT GLANCE AT CODE
    Times asked 1
    Official solution

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

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

    Example

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

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

  3. 3
    ASKED TO CREATE NEW LOT
    Times asked 1
    Official solution

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

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

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

Advice: proctor is chill just be confident
  1. 1
    Types of request methods and how many
    Times asked 1
    Official solution

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

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

    Example

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

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

  2. 2
    Asked me if i made summary charts , I didnt - Said no worries
    Times asked 1
    Official solution

    SimpleCounts API, bar/pie, booking ke baad number badle.

    2 colors live task common.

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

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

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

    Example

    new Chart(ctx, {
      type: 'bar',
      data: { labels: ['Jan','Feb'], datasets: [{ data: [12, 19], backgroundColor: ['#36a','#f80'] }] }
    })

    Project example: Admin dashboard.

    Viva tipBooking karke chart update dikhao. Examiner 2 colors maange to backgroundColor array chhota kar do.

Advice: Greet him , Explain with ease , take time. Overall chill and super supportive
  1. 1
    All processes (from id card to running project) Includes showing collaborator on Github repository.
    Times asked 1
    Official solution

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

    Example

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

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

  2. 2
    What do u mean by cascade? >> have you declared the AI usage in your docs?
    Times asked 1
    Official solution

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

    Example

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

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

Advice: You already know the generic flow of what happens after what (I'd card then Github then code then...) He might be late in responding to you if you're asking if I shall proceed with next step (name it) But I'd recommend you to still wait most of the times.
  1. 1
    2.cascade menaing in database
    Times asked 1
    Official solution

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

    Example

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

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

Advice: don't rush explain slowly
  1. 1
    1.Overall the proctor was chill
    Times asked 1
    Official solution

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

  2. 2
    2.Asked me to show github profile to see colaborator and id card for verification
    Times asked 1
    Official solution

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

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

  3. 3
    3.Asked to to download my submission from the viva portal for execution
    Times asked 1
    Official solution

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

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

  4. 4
    4.Asked me to execute my project and explain the working(he just let me explain , no cross-question)
    Times asked 1
    Official solution

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

    Viva tip1 minute elevator pitch ready rakho, phir demo.

Advice: Consider yourself lucky if u get this proctor, but sure to greet him...
  1. 1
    id check
    Times asked 3
    Official solution

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

    Example

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

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

  2. 2
    show routes.py -> admin routes.
    Times asked 1
    Official solution

    SimpleRoute URL ko Python function se map karta hai. Decorator @app.route ya blueprint.route.

    Example

    @app.route('/lots', methods=['GET', 'POST'])
    def lots():
        if request.method == 'POST':
            ...
        return render_template('lots.html', lots=Lot.query.all())
  3. 3
    exlplain the code flow from login to admin dashboard. gave a feedback and suggestions viva 2 .END
    Times asked 1
    Official solution

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

  1. 1
    THIS WAS FOR VIVA 1 only (yet to give 2nd viva)
    Times asked 1
    Official solution

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

  2. 2
    - id verification from documents to download
    Times asked 1
    Official solution

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

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

    Example

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

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

  3. 3
    - portal download so no checksum
    Times asked 1
    Official solution

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

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

  4. 4
    - what do you understand by MVC . Explain
    Times asked 1
    Official solution

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

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

  5. 5
    - you fulfilled the requirements for the project .
    Times asked 1
    Official solution

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

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

    Example

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

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

  6. 6
    - have a great day . End of viva
    Times asked 1
    Official solution

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

Advice: Make sure you are already logged in and have everything ready for fast viva. Proctors are overworked due to large number of student so try not to waste time in opening id or forgetting commands for project. This will save you time and anxiety
  1. 1
    show the id card
    Times asked 1
    Official solution

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

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

  2. 2
    demonstration of project
    Times asked 1
    Official solution

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

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

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

  3. 3
    define primary key, @, app.route, crud.
    Times asked 1
    Official solution

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

    Example

    id = db.Column(db.Integer, primary_key=True)
Advice: chill. show all functionalities correctly.
  1. 1
    It was my L1 Viva with this examiner. the viva flow was like:
    Times asked 1
    Official solution

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

  2. 2
    1.) Checksum process
    Times asked 1
    Official solution

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

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

    Checksum maange to hash. Uncommitted files mat dikhana.

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

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

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

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

    Project example: Submitted zip run. README commands copy.

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

  3. 3
    4.) Read a bunch of core functionalities and asked me to showcase them one by one.
    Times asked 1
    Official solution

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

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

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

Advice: chill guy, just be honest and upfront about your project.
  1. 1
    So basically it was my "level 1" viva
    Times asked 1
    Official solution

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

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

  2. 2
    show checksum
    Times asked 1
    Official solution

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

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

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

  3. 3
    explain project (Name, motive)
    Times asked 1
    Official solution

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

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

  4. 4
    I was kinda lucky next and last que was demostrate your prject show all functanilties (i have explain all roles and funcions in about 15 minutes with live db browswer)
    Times asked 1
    Official solution

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

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

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

Advice: All Procter's are awesome, chill. You just need to explain your project briefly (all roles and functions)
  1. 1
    Have you implemented caching?? May ask what is caching also didn't asked me.
    Times asked 1
    Official solution

    SimpleHaan Redis routes X demo hit miss. Nahi: kaise add karte — decorator + redis + invalidation.

    Don't lie. Examiner code dekhega.

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

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

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

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

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

    Project example: If yes open decorator. If no 4-step plan.

Advice: Nice proctor. Just prepare from sheet Nothing to worry about relax.
  1. 1
    Demo of the app
    Times asked 8
    Official solution

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

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

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

  2. 2
    Show mailhog, daily reminder and monthly report
    Times asked 2
    Official solution

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

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

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

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

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

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

    Example

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

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

  3. 3
    What is catching
    Times asked 1
    Official solution

    SimpleCaching (catching typo): pehli baar DB, result Redis/memory mein; next request tez hit.

  4. 4
    Show api of catching. Where have u implemented it
    Times asked 2
    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.

  5. 5
    Regarding jwt token
    Times asked 2
    Official solution

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

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

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

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

    Example

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

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

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

Advice: Nice proctor. Asked same questions as provided in sheet before.
  1. 1
    Download from portal and run
    Times asked 2
    Official solution

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

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

  2. 2
    Give Demo
    Times asked 4
    Official solution

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

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

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

  3. 3
    Explained about Mailhog part
    Times asked 2
    Official solution

    SimpleMailHog local fake post office — email internet pe nahi jaata, browser mein dikhta hai.

    SMTP 1025, Web UI 8025. Viva demo gold. Credentials nahi.

    Real Gmail SMTP student accounts pe block common — MailHog safer.

    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.

    Example

    MAIL_SERVER=localhost
    MAIL_PORT=1025
    # http://localhost:8025

    Project example: Reminder task → MailHog list → HTML body user name ke saath.

  4. 4
    Checked models.py file , asked some basic question
    Times asked 2
    Official solution

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

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

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  5. 5
    Overall he was satisfied in the end .. was very calm throughout the viva.
    Times asked 2
    Official solution

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

Advice: Practice sheet questions only and you are good to go.
  1. 1
    3.Run the app and show features
    Times asked 1
    Official solution

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

    Example

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    flask run
  2. 2
    4.Asked if background mailing jobs had been added
    Times asked 2
    Official solution

    SimpleSMTP = Simple Mail Transfer Protocol — email bhejne ka standard. Flask-Mail / smtplib se reminders/reports.

    Example

    from flask_mail import Message
    msg = Message('Subject', recipients=[user.email])
    msg.body = 'Hello'
    mail.send(msg)

    Viva tipViva mein MailHog/inbox dikhao. Port 587 TLS common; local pe MailHog 1025.

  3. 3
    5.Asked if caching had been done
    Times asked 2
    Official solution

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

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

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

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

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

    Example

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

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

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

  4. 4
    6.Asked about authentication token used
    Times asked 2
    Official solution

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

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
  5. 5
    7.Write a Vue.JS code to run a for loop and iterate through the students as was shown in my front end ( could not do )
    Times asked 1
    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.

  6. 6
    8. Asked me to write JS code to return the squared value of an integer
    Times asked 2
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: This was a Level 1 Viva.Most questions were in sheet already. I asked to refer VueJs documentation but he just gave a different question for JavaScript instead.
  1. 1
    Explain Lazy loading
    Times asked 2
    Official solution

    Simplelazy loading related objects tab load karta hai jab attribute access karte ho, pehle nahi.

    user = User.query.get(1)  # posts query nahi

    user.posts # ab query

    lazy=True / 'select' default. lazy='joined' eager join. lazy='dynamic' query object.
    uselist=False One-to-One (single object, list nahi). Hataoge to list mil sakti hai.
    Frontend lazy loading images alag cheez hai (viewport mein aaye tab load).

Advice: he lets you explain your full project, you can explain whatever you know, he will listen, I explained a bit of code as well so he didn't ask me more questions. refer the response sheet for the questions and be thorough in those.
  1. 1
    Show demo
    Times asked 11
    Official solution

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

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

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

  2. 2
    Usermixin and rolemixin
    Times asked 1
    Official solution

    SimpleUserMixin RoleMixin Flask-Security interfaces: is_authenticated, roles relation.

    Methods milte. Models inherit.

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

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

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

    Project example: class User(db.Model, UserMixin).

  3. 3
    Code a function in vue that returns Square of a number in notepad
    Times asked 2
    Official solution

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

    Progressive frontend framework. Components, reactivity, directives.

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

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

    Example

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

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

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

Advice: Chill proctor, practice sheet questions and good to go
  1. 1
    Showed my valid ID card and GitHub repository with collaborators.
    Times asked 2
    Official solution

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

    Example

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

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

  2. 2
    Ran the placement portal app and demonstrated core functionalities like student/company management and drive approvals.
    Times asked 2
    Official solution

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

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

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

  3. 3
    Triggered emails and showed proof in MailHog inbox.
    Times asked 2
    Official solution

    SimpleMailHog local fake post office — email internet pe nahi jaata, browser mein dikhta hai.

    SMTP 1025, Web UI 8025. Viva demo gold. Credentials nahi.

    Real Gmail SMTP student accounts pe block common — MailHog safer.

    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.

    Example

    MAIL_SERVER=localhost
    MAIL_PORT=1025
    # http://localhost:8025

    Project example: Reminder task → MailHog list → HTML body user name ke saath.

  4. 4
    Wrote a JavaScript function to calculate the square of two numbers.
    Times asked 1
    Official solution

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

  5. 5
    Selected a user by ID using Python SQLAlchemy ORM and explained the query.
    Times asked 2
    Official solution

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

    Example

    user = User(email='a@b.com')
    db.session.add(user)
    db.session.commit()
    users = User.query.filter_by(role='admin').all()
Advice: Demonstrate basic JavaScript, ORM queries, Flask routes, Vue directives, and Jinja basics only.
  1. 1
    Celery task show karo kaha implement kiya hai
    Times asked 2
    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.

  2. 2
    Write a code in Javascript to take 3 numbers and print the sum of it
    Times asked 2
    Official solution

    SimpleNotepad/jsfiddle: function, map/filter, console.log, debug calmly.

    Examiner JSON de sakta hai. filter score>15. Arrow vs function. Don't over-engineer.

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

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

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

    Example

    function fullName(first, last) {
      return first + ' ' + last
    }
    users.filter(u => u.score > 15)

    Project example: Practice 10 snippets before viva. Online editor internet if allowed.

  3. 3
    What is the percentage of AI used in your project
    Times asked 2
    Official solution

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

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

  4. 4
    Write if statement in vuejs
    Times asked 2
    Official solution

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

    Progressive frontend framework. Components, reactivity, directives.

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

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

    Example

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

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

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

Advice: He is calm and chill , know your project and prepare well
  1. 1
    For Level 1
    Times asked 2
    Official solution

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

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

  2. 2
    1.ID
    Times asked 2
    Official solution

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

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

  3. 3
    2.Git-colabratoar
    Times asked 2
    Official solution

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

  4. 4
    4.Ask theory questions
    Times asked 2
    Official solution

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

  5. 5
    4.1. Celery
    Times asked 2
    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.

  6. 6
    4.2.redish
    Times asked 2
    Official solution

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

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

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

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

    Example

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

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

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

  7. 7
    4.3.What cache
    Times asked 2
    Official solution

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

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

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

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

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

    Example

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

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

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

  8. 8
    4.4 what do u use for token in project(JSWT)
    Times asked 2
    Official solution

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

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

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

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

    Example

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

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

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

  9. 9
    5.Coding Part
    Times asked 2
    Official solution

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

  10. 10
    5.1Make loop in vue.js
    Times asked 2
    Official solution

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

    Progressive frontend framework. Components, reactivity, directives.

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

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

    Example

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

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

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

  11. 11
    5.2.Write 2 routes for Post and Put methods.
    Times asked 2
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: They ask theory questions + 2 coding part . Chill guy
  1. 1
    Function in jinja which calculates cube of a integer
    Times asked 2
    Official solution

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

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
  2. 2
    Showing of code
    Times asked 2
    Official solution

    SimpleCode dikhao to pehle related file: models → route → template. Flow explain karte hue lines padho.

  3. 3
    GitHub repo
    Times asked 3
    Official solution

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

    Example

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

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

  4. 4
    Best of luck
    Times asked 2
    Official solution

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

  1. 1
    Write app.route in notepad for get and post only
    Times asked 2
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  2. 2
    What is authtication vs autorization
    Times asked 2
    Official solution

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

    Authentication: login. Username + password check karke prove karte ho ki tum genuine user ho. Success pe session/token milta hai.
    Authorization: uske baad role check. Admin hi parking lot / venue / drive delete kar sakta hai, normal user nahi.

    MAD2 mein yeh alag layers hain: login API = authentication (JWT milta hai). @roles_required('admin') ya Vue v-if="isAdmin" = authorization.

    Validation alag cheez hai (form sahi bhara hai ya nahi, jaise age 18+). Authentication identity hai, authorization permission, validation input quality.

    Example

    # Authentication
    if user and check_password_hash(user.password, form_password):
        token = create_access_token(identity=user.id)
    
    # Authorization
    if current_user.role != 'admin':
        abort(403)  # logged in ho, lekin allowed nahi

    Project example: Student login = authentication. Student admin dashboard nahi khol sakta = authorization. Frontend button hide sirf UX hai — asli check backend pe hona chahiye.

    Viva tip401 = not logged in / bad token. 403 = logged in, role galat. Examiner yeh difference bahut poochta hai.

  3. 3
    Show Background jobs celery and redis
    Times asked 2
    Official solution

    SimpleRedis box hai, Celery us box se kaam uthane wala worker hai — same cheez nahi.

    Redis: store (cache keys) + queue (broker lists).
    Celery: Python library jo tasks define karti hai, .delay() se queue mein daalti hai, worker execute karta hai.

    Dono localhost pe ho sakte hain. Alag Redis DB index use karo. Redis band = cache miss + Celery stuck.

    Example

    Celery: broker_url='redis://localhost:6379/0'
    Cache:  CACHE_REDIS_URL='redis://localhost:6379/1'

    Project example: export_csv.delay(user_id) Flask se. Worker Redis se task uthata hai, CSV+email. Cache alag keys venues.

    Viva tipAgar possible ho to cache db=1, broker db=0 — keys mix nahi hoti.

  4. 4
    Did you implement caching if yes show the api/ where did you implement
    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.

Advice: He is very calm and good proctor!
  1. 1
    write route function
    Times asked 2
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: overall he was kindof very rude and didnt even gave a second chance nd asked very out of nowhere quetions be ready to code anything he likes even out of your project i highly doubt that the proctor id of 128 and 127 are exchanged as compared to previous terms, so bach k rehna
  1. 1
    show model.py
    Times asked 2
    Official solution

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

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

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  2. 2
    what is lazy( wrt models )
    Times asked 2
    Official solution

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

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

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  3. 3
    write code to implement v-if, v-else
    Times asked 2
    Official solution

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

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

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

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

    Example

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

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

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

  4. 4
    how auth_token was created
    Times asked 2
    Official solution

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

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

  1. 1
    Verified ID card
    Times asked 2
    Official solution

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

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

  2. 2
    Began the demo — modules were taking time to import, so provided a code walkthrough in the meantime
    Times asked 2
    Official solution

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

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

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

  3. 3
    Showed the relevant code sections (JWT implementation and cache usage)
    Times asked 2
    Official solution

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

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

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

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

    Example

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

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

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

  4. 4
    Opened Notepad and explained a use case for the v-if / v-else directive
    Times asked 2
    Official solution

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

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

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

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

    Example

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

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

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

  5. 5
    Started the demo and showcased all major features, especially MailHog integration and async jobs
    Times asked 2
    Official solution

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

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

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

  6. 6
    Explained the models, including cascade behavior
    Times asked 2
    Official solution

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

    Example

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

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

  7. 7
    Overall, he was very patient and pleasant to work with.
    Times asked 2
    Official solution

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

Advice: practice routes and v-directives on notepad and learn definitions
  1. 1
    What happens when two patients try to book an appointment with same doctor and datetime?
    Times asked 2
    Official solution

    SimpleSame slot twice 400. Two users race. Approval workflow. Book appointment verify edges.

    Demo fail then success.

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

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

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

    Project example: book route checks.

    Project example: book route checks.

  2. 2
    Open Notepad and write the code for if-else in Vue.js
    Times asked 2
    Official solution

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

    Progressive frontend framework. Components, reactivity, directives.

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

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

    Example

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

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

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

  3. 3
    Write the code to select a user by id using ORM.
    Times asked 2
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
Advice: You should which piece of logic/code is in which file. Examiner gives sufficient time to answer.
  1. 1
    Project: Vehicle Parking App
    Times asked 2
    Official solution

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

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  2. 2
    Both proctors checked core functionalities
    Times asked 2
    Official solution

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

  3. 3
    And told to explain models
    Times asked 2
    Official solution

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

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

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  4. 4
    level1:
    Times asked 2
    Official solution

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

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

  5. 5
    Q. Authorisation and Authentication
    Times asked 2
    Official solution

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

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
  6. 6
    Q. what is used for token based authentication.
    Times asked 2
    Official solution

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

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
  7. 7
    Everything that is asked before, no Code changes asked
    Times asked 2
    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'))
  8. 8
    Checked if I have parked with a vehicle no. then if I can book with same no. even before releasing it.
    Times asked 2
    Official solution

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

  9. 9
    new questions were
    Times asked 2
    Official solution

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

  10. 10
    Q. What is smtp
    Times asked 2
    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.

  11. 11
    Q. Webhooks
    Times asked 2
    Official solution

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

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

  12. 12
    Q. Difference between like and ilike
    Times asked 1
    Official solution

    SimpleLIKE case-sensitive Postgres. ILIKE insensitive. SQLite LIKE often insensitive.

    Search use ilike.

    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: Venue.name.ilike(f'%{q}%').

    Project example: Venue.name.ilike(f'%{q}%').

  1. 1
    Show Git hub Repo and Collaborator
    Times asked 2
    Official solution

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

    Example

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

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

  2. 2
    Project Demo
    Times asked 3
    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.

  3. 3
    Difference between Authorization and Authentication
    Times asked 1
    Official solution

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

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
  4. 4
    What is Caching, where you have implemented it and what is its use?
    Times asked 1
    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.

Advice: Proctor is Chill, just say answers confidently.
  1. 1
    asked to show GitHub repo and collaborators
    Times asked 2
    Official solution

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

    Example

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

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

  2. 2
    project demo
    Times asked 4
    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.

  3. 3
    perform backend task
    Times asked 2
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  4. 4
    asked to show redis if used
    Times asked 2
    Official solution

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

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

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

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

    Example

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

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

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

  5. 5
    what caching
    Times asked 1
    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.

  6. 6
    what cscade?
    Times asked 2
    Official solution

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

    Example

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

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

Advice: Was chill, i also asked for any tips for l2 viva
  1. 1
    This is my level 1 viva
    Times asked 2
    Official solution

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

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

  2. 2
    Show me your Id card
    Times asked 2
    Official solution

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

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

  3. 3
    show me the GitHub account and collaborator
    Times asked 2
    Official solution

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

    Example

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

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

  4. 4
    Did you filled the form
    Times asked 2
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  5. 5
    Show me the curd operations
    Times asked 2
    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.

  6. 6
    What is MVC ?
    Times asked 1
    Official solution

    SimpleMVC = Model-View-Controller. Code ko 3 hisson mein baant ta hai taaki mix na ho.

    Model: data + DB. models.py — User, Trek, Booking classes.
    View: jo user dekhta hai. templates/*.html + Jinja.
    Controller: beech ka logic. routes / app.py — request lo, model se data, view ko do.

    Example flow (register):
    Browser form POST → Controller register() → User model save → redirect → View dashboard.html

    Draw: Browser → Controller → Model → DB, phir Controller → View → Browser.
    ORM na ho to bhi MVC ho sakta hai — Model raw SQL functions ho sakte hain. Structure matter karta hai, library nahi.
    MVP/MVVM doosri architectures hain; MAD1 mein MVC expected hai.

  7. 7
    Explain your project what you have done. during viva I lost the connection and rejoined. He is very clam and nice.
    Times asked 2
    Official solution

    SimpleJOIN related tables ek result mein. Inner = match only; left = left side sab + match.

    Example

    db.session.query(Booking, User).join(User).filter(User.id == uid).all()
Advice: Just give your best. Don't need to hesitate. Be polite and answer the question.
  1. 1
    Show your ID card.
    Times asked 23
    Official solution

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

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

    Name GitHub/portal se mismatch red flag.

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

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

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

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

    Viva tipPehle se ID haath mein rakho, glare mat aane do. Examiner screenshot/verify karta hai. Iske baad GitHub + project run.

  2. 2
    Show your GitHub repository and collaborator.
    Times asked 16
    Official solution

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

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

    Collaborator settings. Commit dates.

    Example

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

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

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

  3. 3
    Confirm that you submitted the required form.
    Times asked 1
    Official solution

    SimpleHaan submitted portal form/report. Link ready. Checksum if any.

    Don't contradict AI %.

    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: Email confirmation / PDF.

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

  5. 5
    Explain your project and its implementation.
    Times asked 1
    Official solution

    SimpleFeatures tour then architecture then 1 deep dive jobs/cache.

    Project statement first. Don't skip celery if required.

    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 journey + admin + jobs.

  6. 6
    Explain your models.py.
    Times asked 2
    Official solution

    SimpleEach class PK/FK relationships why. Random line ready.

    serialize hide password.

    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: models.py top to bottom 3 min.

  7. 7
    Explain your project code.
    Times asked 1
    Official solution

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

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

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

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

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

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

  8. 8
    Show your login/authentication code.
    Times asked 1
    Official solution

    Simplelogin.vue + backend login + decorator + LS. Show login/authentication code.

    Show where authentication backend.

    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: 4 files.

  9. 9
    Show MailHog integration.
    Times asked 1
    Official solution

    SimpleMailHog local fake post office — email internet pe nahi jaata, browser mein dikhta hai.

    SMTP 1025, Web UI 8025. Viva demo gold. Credentials nahi.

    Real Gmail SMTP student accounts pe block common — MailHog safer.

    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.

    Example

    MAIL_SERVER=localhost
    MAIL_PORT=1025
    # http://localhost:8025

    Project example: Reminder task → MailHog list → HTML body user name ke saath.

  10. 10
    Demonstrate Celery background jobs (daily reminder/monthly report).
    Times asked 1
    Official solution

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

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

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

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

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

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

    Example

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

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

  11. 11
    Explain where Celery and Redis are implemented.
    Times asked 1
    Official solution

    SimpleRedis box hai, Celery us box se kaam uthane wala worker hai — same cheez nahi.

    Redis: store (cache keys) + queue (broker lists).
    Celery: Python library jo tasks define karti hai, .delay() se queue mein daalti hai, worker execute karta hai.

    Dono localhost pe ho sakte hain. Alag Redis DB index use karo. Redis band = cache miss + Celery stuck.

    Example

    Celery: broker_url='redis://localhost:6379/0'
    Cache:  CACHE_REDIS_URL='redis://localhost:6379/1'

    Project example: export_csv.delay(user_id) Flask se. Worker Redis se task uthata hai, CSV+email. Cache alag keys venues.

    Viva tipAgar possible ho to cache db=1, broker db=0 — keys mix nahi hoti.

  12. 12
    Difference between Authentication and Authorization.
    Times asked 20
    Official solution

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

    Authentication: login. Username + password check karke prove karte ho ki tum genuine user ho. Success pe session/token milta hai.
    Authorization: uske baad role check. Admin hi parking lot / venue / drive delete kar sakta hai, normal user nahi.

    MAD2 mein yeh alag layers hain: login API = authentication (JWT milta hai). @roles_required('admin') ya Vue v-if="isAdmin" = authorization.

    Validation alag cheez hai (form sahi bhara hai ya nahi, jaise age 18+). Authentication identity hai, authorization permission, validation input quality.

    Example

    # Authentication
    if user and check_password_hash(user.password, form_password):
        token = create_access_token(identity=user.id)
    
    # Authorization
    if current_user.role != 'admin':
        abort(403)  # logged in ho, lekin allowed nahi

    Project example: Student login = authentication. Student admin dashboard nahi khol sakta = authorization. Frontend button hide sirf UX hai — asli check backend pe hona chahiye.

    Viva tip401 = not logged in / bad token. 403 = logged in, role galat. Examiner yeh difference bahut poochta hai.

  13. 13
    What token-based authentication mechanism have you used?
    Times asked 1
    Official solution

    SimpleJWT HS256 flask-jwt-extended / security token. Named library.

    Which library token generation / token-based.

    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: requirements.txt line.

  14. 14
    How is the authentication token generated?
    Times asked 2
    Official solution

    SimpleLogin success pe server secret se sign. create_access_token / security token.

    Show login route return. DevTools response JSON. jwt.io payload.

    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.

    Example

    token = create_access_token(identity=user.id, additional_claims={'role': user.role})

    Project example: auth.py login. Flask-JWT-Extended.

  15. 15
    Explain UserMixin and RoleMixin.
    Times asked 1
    Official solution

    SimpleUserMixin RoleMixin Flask-Security interfaces: is_authenticated, roles relation.

    Methods milte. Models inherit.

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

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

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

    Project example: class User(db.Model, UserMixin).

  16. 16
    What is caching?
    Times asked 23
    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.

  17. 17
    Where have you implemented caching?
    Times asked 7
    Official solution

    SimpleGET lists/stats @cache.cached. Mutations pe delete. CACHE_TYPE Redis.

    Why each route: public repeated reads. User-private careful.

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

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

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

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

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

    Project example: File+line decorator. redis-cli get key optional.

  18. 18
    Show the cached API/code.
    Times asked 1
    Official solution

    SimpleDecorator + Redis ping + invalidation line + miss/hit demo idea.

    Kaunsi routes, timeout, key_prefix, query_string. POST pe nahi.

    print after set sirf miss. Timeout chhota karke expiry.

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

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

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

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

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

    Project example: resources list GET cached. create_venue delete key.

  19. 19
    What is lazy in SQLAlchemy relationships?
    Times asked 1
    Official solution

    SimpleWhen related load: select extra query, joined JOIN now, dynamic query object.

    lazy in relationships.

    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.

    Example

    bookings = db.relationship('Booking', lazy='dynamic')
    user.bookings.filter_by(status='ok').all()

    Project example: default select. N+1.

  20. 20
    What is cascading (cascade)?
    Times asked 1
    Official solution

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

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

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

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

    Example

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

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

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

  21. 21
    Difference between LIKE and ILIKE.
    Times asked 2
    Official solution

    SimpleLIKE case-sensitive Postgres. ILIKE insensitive. SQLite LIKE often insensitive.

    Search use ilike.

    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: Venue.name.ilike(f'%{q}%').

    Project example: Venue.name.ilike(f'%{q}%').

  22. 22
    Write an ORM query to fetch a user by ID.
    Times asked 1
    Official solution

    Simple

    User.query.get(id) or db.session.get(User,id). Write ORM query fetch user by ID.

    None if missing.

    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: Not 404 unless get_or_404.

  23. 23
    What happens if two users try to book the same appointment/resource simultaneously?
    Times asked 1
    Official solution

    SimpleTwo users same slot: unique + txn. Last IntegrityError 400 just taken.

    Simultaneous book.

    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: unique(user,slot) or seat number unique.

    Project example: unique(user,slot) or seat number unique.

  24. 24
    Show your Celery tasks.
    Times asked 1
    Official solution

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

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

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

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

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

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

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

  25. 25
    Explain background mailing jobs.
    Times asked 1
    Official solution

    SimpleFlask-Mail SMTP Celery. Templates HTML. Verify MailHog/logs.

    Dynamic render_template user=stats.

    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: tasks send + reminder.html.

    Project example: tasks send + reminder.html.

  26. 26
    Write a v-for loop in Vue.
    Times asked 1
    Official solution

    Simplev-for item in items :key. Write v-for loop Vue. Syntax. Notepad.

    key required.

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

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

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

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

    Example

    <li v-for="s in students" :key="s.id">{{ s.name }}</li>

    Project example: li students.

  27. 27
    Write a v-if / v-else example in Vue.
    Times asked 1
    Official solution

    Simplev-if condition v-else. Write v-if / v-else example Vue.

    Same.

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

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

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

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

    Project example: isAdmin.

  28. 28
    Write an if-else statement in Vue.
    Times asked 1
    Official solution

    Simplev-if v-else on p. Write if-else Vue. Write v-if example.

    next sibling else.

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

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

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

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

    Example

    <p v-if="n>0">pos</p><p v-else>not</p>

    Project example: status.

  29. 29
    Write a JavaScript function to: Calculate the square of a number. Calculate the cube of a number. Multiply an integer by 4. Add two or three numbers.
    Times asked 1
    Official solution

    Simplesq n*n cube n**3 *4 add rest. Write JS square cube multiply 4 add two/three.

    Separate functions.

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

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

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

    Example

    const sq=n=>n*n; const cube=n=>n**3; const mul4=n=>n*4; const add=(...a)=>a.reduce((x,y)=>x+y,0)

    Project example: Notepad.

  30. 30
    Write a JavaScript function to compute cube roots.
    Times asked 1
    Official solution

    SimpleMath.cbrt(n) ya n**(1/3). Write JS cube roots.

    Watch negative.

    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: console.log.

    Project example: console.log.

  31. 31
    Write an @app.route example for GET and POST methods.
    Times asked 1
    Official solution

    SimpleOne route methods GET+POST. GET JSON, POST create 201. Write @app.route GET and POST. Simple GET POST endpoints.

    if request.method.

    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

    @app.route('/api/echo', methods=['GET','POST'])
    def echo():
        if request.method=='GET':
            return jsonify(ok=True)
        return jsonify(body=request.get_json()), 201

    Project example: echo API.

  32. 32
    Write a Jinja function/filter to calculate the cube of an integer.
    Times asked 1
    Official solution

    SimpleMAD1 templates. MAD2 mostly Vue; emails still Jinja. {{ n|cube }} custom filter. Write Jinja snippet Notepad.

    extends for block. cube filter.

    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

    {{ value|cube }}
    @app.template_filter('cube')
    def cube(n): return int(n)**3

    Project example: reminder.html.

  33. 33
    What is MVC?
    Times asked 9
    Official solution

    SimpleModel-View-Controller separation of concerns.

    Map folders. Vue is V. Flask routes C. models M.

    MAD2 architecture: Vue SPA (client) → HTTP JSON → Flask API (server) → SQLAlchemy DB. Side path: Flask → Redis broker → Celery worker → MailHog/CSV.

    Client-server alag ports. State: Vue memory + LS token. Persistent: SQLite. Cache: Redis. MVC-ish: models.py, API views, Vue templates.

    Scale: more workers, Postgres, cache, not 'bigger SQLite file'.

    Example

    Vue Booking.vue → POST /api/book → Booking model → jsonify → this.bookings.push

    Project example: See architecture essay.

  34. 34
    What is Lazy Loading?
    Times asked 3
    Official solution

    SimpleLazy = zarurat pe load. Relationship default extra query. Vue route import() code-split.

    lazy='dynamic' query object. noload mat laao. Fast first paint.

    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: user.bookings access pe query. Dashboard joinedload instead.

  35. 35
    Approximately what percentage of your project was built using AI?
    Times asked 1
    Official solution

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

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

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

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

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

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

    Project example: Jo number form/PDF mein hai wahi. Example file jo AI se start kiya, khud debug kiya.

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

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

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

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

  2. 2
    Show GitHub repository.
    Times asked 2
    Official solution

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

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

  3. 3
    Verify GitHub collaborator has been added.
    Times asked 1
    Official solution

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

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

  4. 4
    Run checksum or download the project from the submission 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.

  5. 5
    Set up and run the project.
    Times asked 1
    Official solution

    SimpleExaminer submitted ZIP chahta hai, local extra changes nahi.

    Portal se ZIP download → extract → venv → pip install -r requirements.txt → flask run / python app.py.
    Checksum maange to hash match karke dikhao. Camera/OPPE setup unke instructions.
    Linux/Mac: paths, gunicorn; Windows paths alag ho to relative paths use karo.
    Do browsers: admin + user parallel demo impressive lagta hai.

  6. 6
    Explain the project (name, objective/motivation).
    Times asked 1
    Official solution

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

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

    Example

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

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

  7. 7
    Demonstrate all project functionalities.
    Times asked 1
    Official solution

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

    Suggested flow

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

  8. 8
    Show all core functionalities one by one.
    Times asked 1
    Official solution

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

    Suggested flow

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

  9. 9
    Explain the basic project/code structure.
    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.

  10. 10
    Show the dashboard.
    Times asked 1
    Official solution

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

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

  11. 11
    Explain summary charts (if implemented).
    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 the User table (fields, relationships, lazy loading, cascade, etc.).
    Times asked 1
    Official solution

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

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

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

  13. 13
    Explain another model (e.g., Doctor model) and each column.
    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.

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

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

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

    Example skeleton

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

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

  15. 15
    Explain one line of code from your project.
    Times asked 1
    Official solution

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

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

    Example

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

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

  16. 16
    Explain where you used a for loop in HTML/Jinja.
    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.

  17. 17
    Create a new parking lot.
    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 }}
  18. 18
    Update the number of parking spots in a parking lot.
    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'))
  19. 19
    Delete a parking lot.
    Times asked 1
    Official solution

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

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

  20. 20
    Edit a parking lot as Admin.
    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'))
  21. 21
    Check whether duplicate bookings (same vehicle/patient) are prevented.
    Times asked 1
    Official solution

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

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

  22. 22
    Modify the password column to String(200) with unique=True.
    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'))
  23. 23
    What is a Primary Key?
    Times asked 5
    Official solution

    SimplePrimary Key har row ko uniquely identify karti hai. Unique Key bhi unique hoti hai lekin table ki main ID nahi.

    id = db.Column(db.Integer, primary_key=True)  # auto increment
    email = db.Column(db.String(120), unique=True)

    PK: NOT NULL, ek (ya composite). Index automatically.
    Record fetch: User.query.get(id) PK se tez.
    FK hamesha unique nahi — Many side pe repeat hoti hai. Unique FK = One-to-One.

  24. 24
    What is @app.route?
    Times asked 2
    Official solution

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

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

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

  25. 25
    What is CRUD?
    Times asked 2
    Official solution

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

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

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

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

  26. 26
    Authentication vs Authorization.
    Times asked 10
    Official solution

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

    Authentication: login. Username + password check karke prove karte ho ki tum genuine user ho. Success pe session/token milta hai.
    Authorization: uske baad role check. Admin hi parking lot delete kar sakta hai, normal user nahi.

    Example (Flask):
    # Authentication

    if user and check_password_hash(user.password, form_password):
        session['user_id'] = user.id
    
    # Authorization
    if session.get('role') != 'admin':
        abort(403)  # logged in ho, lekin allowed nahi

    Project example: student login = authentication. Student admin dashboard nahi khol sakta = authorization.
    Validation alag cheez hai (form sahi bhara hai ya nahi, jaise age 18+).

  27. 27
    What is Cascade in databases?
    Times asked 1
    Official solution

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

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

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

  28. 28
    What is Lazy Loading (lazy=True, lazy='dynamic')?
    Times asked 1
    Official solution

    Simplelazy loading related objects tab load karta hai jab attribute access karte ho, pehle nahi.

    user = User.query.get(1)  # posts query nahi

    user.posts # ab query

    lazy=True / 'select' default. lazy='joined' eager join. lazy='dynamic' query object.
    uselist=False One-to-One (single object, list nahi). Hataoge to list mil sakti hai.
    Frontend lazy loading images alag cheez hai (viewport mein aaye tab load).

  29. 29
    What is backref?
    Times asked 12
    Official solution

    Simplebackref relationship ki reverse side automatically bana deta hai.

    class Post(db.Model):
        user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
        user = db.relationship('User', backref='posts')

    Ab post.user milta hai, aur user.posts bhi — Post model pe sirf ek line.
    secondary Many-to-Many junction table ke liye: relationship(..., secondary=likes_table, backref='liked_by').
    Explicit chahiye to back_populates use karo.

  30. 30
    What is back_populates?
    Times asked 3
    Official solution

    Simpleback_populates dono models pe relationship explicitly link karta hai.

    class User(db.Model):
        posts = db.relationship('Post', back_populates='author')
    class Post(db.Model):
        author = db.relationship('User', back_populates='posts')

    Naam match hona chahiye. Readability better, circular confusion kam. backref ka alternative yahi hai.

  31. 31
    What is Template Inheritance?
    Times asked 10
    Official solution

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

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

    base.html:

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

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

  32. 32
    What is MVC Architecture? (especially explain the Controller).
    Times asked 1
    Official solution

    SimpleMVC = Model-View-Controller. Code ko 3 hisson mein baant ta hai taaki mix na ho.

    Model: data + DB. models.py — User, Trek, Booking classes.
    View: jo user dekhta hai. templates/*.html + Jinja.
    Controller: beech ka logic. routes / app.py — request lo, model se data, view ko do.

    Example flow (register):
    Browser form POST → Controller register() → User model save → redirect → View dashboard.html

    Draw: Browser → Controller → Model → DB, phir Controller → View → Browser.
    ORM na ho to bhi MVC ho sakta hai — Model raw SQL functions ho sakte hain. Structure matter karta hai, library nahi.
    MVP/MVVM doosri architectures hain; MAD1 mein MVC expected hai.

  33. 33
    What is Jinja?
    Times asked 4
    Official solution

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

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

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

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

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

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

  34. 34
    What are HTTP Request 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.

  35. 35
    Difference between PUT and POST.
    Times asked 6
    Official solution

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

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

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

    Example

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

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

  36. 36
    What is the @ symbol? (mentioned in context of decorators/routes).
    Times asked 1
    Official solution

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

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

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

  37. 37
    Write a Jinja for loop.
    Times asked 9
    Official solution

    Simple Jinja loop + if — examiner notepad mein likhwaata hai:

    {% for t in treks %}
      <p>{{ t.name }} — {{ t.location }}</p>
    {% else %}
      <p>No treks</p>
    {% endfor %}
    
    {% if user.role == 'admin' %}
      <button>Delete</button>
    {% endif %}

    List filter: {% if x > 10 %}{{ x }}{% endif %}
    Length: {{ items|length }} Upper: {{ name|upper }}
    Table: loop ke andar <tr><td>

  38. 38
    Write a Jinja if condition.
    Times asked 1
    Official solution

    Simple Jinja loop + if — examiner notepad mein likhwaata hai:

    {% for t in treks %}
      <p>{{ t.name }} — {{ t.location }}</p>
    {% else %}
      <p>No treks</p>
    {% endfor %}
    
    {% if user.role == 'admin' %}
      <button>Delete</button>
    {% endif %}

    List filter: {% if x > 10 %}{{ x }}{% endif %}
    Length: {{ items|length }} Upper: {{ name|upper }}
    Table: loop ke andar <tr><td>

  39. 39
    Create an HTML button visible only to Admin using Jinja if.
    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.

  40. 40
    Write a simple route that returns "Hello World".
    Times asked 1
    Official solution

    Simple Hello World — notepad mein yeh likh ke run karke dikhao:

    from flask import Flask
    app = Flask(__name__)
    @app.route('/')
    def home():
        return 'Hello World'
    if __name__ == '__main__':
        app.run(debug=True)
    
    Jinja version: return render_template('hello.html', name='Shubham')

    hello.html: <h1>Hello {{ name }}</h1>
    POST-only: @app.route('/x', methods=['POST'])

  41. 41
    Write a route that renders an HTML page and accepts user_id as a parameter.
    Times asked 1
    Official solution

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

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

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

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

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

  42. 42
    Write an @app.route that accepts only the POST method.
    Times asked 1
    Official solution

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

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

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

  43. 43
    Write a route that accepts the PUT method.
    Times asked 1
    Official solution

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

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

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

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

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

  44. 44
    Write a SQL query to fetch the user with username "admin".
    Times asked 1
    Official solution

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

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

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

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

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

  45. 45
    Have you declared AI usage in your documentation?
    Times asked 1
    Official solution

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

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

  46. 46
    Gave suggestions/tips for Level 2 after the demo.
    Times asked 1
    Official solution

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

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

  47. 47
    Show where you have used charts/summary visualizations.
    Times asked 1
    Official solution

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

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

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