Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level3_13

Share your experience Add your viva experience here
107 Questions
1 Sets
0 Topics
42 Reviews
Tips for this examiner: 70 percent theory based so just revise all concepts and communicate well as he gives you time to explain everything you know in detail and then ask next question from your explanation so be mindful about the terms you use, don't act smart by using heavy terms you don't know. If you can't able to give any answer just tell directly he will change question but don't stretch any topic unneccesary, just take your time and be confident

Student reviews

Harsh MAD1

He was a chill proctor and asked easier question none of it was out of the box

Questions remembered
  1. First asked to demonstrate all the features
  2. Then told me register and give permission and all that went on for 25 minutes then he asked me make changes in code which was to not allow the negative number and no. Starting from 0 and limit the contact length to 10
  3. Asked me to explain first 35 line of app.py since there were not enough lines he asked me to explain routed for admin
  4. Then he asked some theory questions
  5. Explain the db tables and er diagram
  6. Primary and foreign key
  7. Null and not null concept
  8. What did I learn in this project
  9. My viva ended in 50 minutes
A MAD1

Sir is amazing. Remain calm and just thoroughly explain everything. He listens well and lets you speak. The questions were all from the sheet. He said I did well except the one coding question (messed up CSS alignment to center cuz I forgot).

Questions remembered
  1. Asked to show ID and introduce myself
  2. Do the demo and go through the application
  3. Go through models.py and explain the models
  4. Change the background image
  5. Align the text/form to the center
  6. Add password validation (min 8 and max 8 characters, needs uppercase and digit)
  7. What is bootstrap
  8. What is REST API and why do we use it
  9. What is MVC
  10. What is primary key and unique key
  11. What is CSS
  12. What is null and non-null values
dreamer MAD1

sir is giving a very good time to think while code changes like he gave almost 20-25 min for code change . for theory questions - he is repeating the same questions from the sheet,
he is very patient and my viva has completed before 45 minutes

Questions remembered
  1. level2 viva :-
  2. - full demo
  3. - explain your database models
  4. - explain the first 30 lines of app.py with imports
  5. coding :
  6. - delete an specific entry
  7. - delete all entries by single button (delete all) - delete all students by admin
  8. theory :
  9. - what is session (also how did you ensure session with rbac)and secret key
  10. - http requests types
  11. - what is bootstrap
  12. - diff between tuple and dictionary
  13. - diff between unique key and primary key
  14. - what is restAPI
Pablo Escobar MAD1

Shared viva questions from response sheet: Level3 13....nice proctor but very less attentive....after starting demo he may leave meeting and join after 10 minutes...then you perform whatever you want...can ask you for basic routes...some basic questions(see in gsheet it's repeated)....

Questions remembered
  1. Level3 13....nice proctor but very less attentive....after starting demo he may leave meeting and join after 10 minutes...then you perform whatever you want...can ask you for basic routes...some basic questions(see in gsheet it's repeated)....
Anonymous MAD1

Very patient and will give you time to think. Just know your code well.

Questions remembered
  1. to show student Id
  2. demo of the app
  3. explain all models / er diagram
  4. have done password validation? I didn't do asked to code for both frontend and backend password validation and show it's working
  5. ask some theory questions - primary vs unique key , queue and stack , MVC and some more theory questions I didn't remember.
  6. explain all imports
Sheet response MAD1

If you get this proctor, your viva will be very easy.

Questions remembered
  1. Level2
  2. Asked me to introduce myself?
  3. Explain problem statement of the project.
  4. Download the project and explain each functionality (I explained for about 20 minutes and he didn't interrupt.
  5. he asked to add criterion in password, should be atleast 12 characters, one uppercase, one lowercase, one digit and atleast one special character.
  6. Then asked theory questions like. 5.1 GET vs PUT 5.2 List vs Tuple 5.3 Cookies vs Session. 5.4 what are RestAPI's.
  7. Then asked me to explain all the import statements, why have I imported that, what it is and where I have used it in my project.
  8. Ended the viva saying, if you have any question to ask. My viva lasted for about 45 minutes.
Harnoor Singh MAD1

Great proctor , actually tested on things which i think matter and alternative approached were also discussed( like regex which i knew about but didnt know how to implement in code) he gives you the time to do your thing

Questions remembered
  1. er diagram explain kro apne proj ka. 2. password validation implement kro 3. explain all packages and funcyions imported at start of app.py and there uses 4. 5 disadvantages of sqlAlchemy (orm) 6. explain company templates 7. explain models.py 8. what is session 9 . what are crud 10. uses of sqlalchemy (also) 11. had to run the aplication also and explain everything 12. explain the password validation logic (and whether i can use regex or not) 13. what i learnt from the project 14. introduction (at start) 15 . dont remember else
Sheet response MAD1

He was friendly and patient, be clear with the concepts.

Questions remembered
  1. Asked to show id, do checksum or download from dashboard
  2. Then asked to execute all the functionality of the web application (just explain in detail without missing any points)
  3. Then asked to set certain restrictions for password like len>8, a special char,uppercase, lowercase, digit if only has these should be able to login or register and also explain the methodology used.
  4. Asked to explain the models used, with db diagram
  5. Theory questions:
  6. What is bootstrap
  7. Diff btw list and tuple
  8. Diff btw http and https
  9. Diff btw primary and unique key,etc
e7 MAD1

This feedback form is the best resource
relax and go though the que asked in the past
initially I though this would be pretty difficult,
but the proctors are awesome and there are alot of repeated ques for this form
All the best!
also please contribute to this form once your done

Questions remembered
  1. MAD1 viva 2 (Double-click if full note not viewable) first the examiner asked me to show my Id card then he asked to give INTRO about me and the project to which I asked permission to download and open the submission which had project report, then I gave my intro along the project report then explain er diagram which I had in my project report then I gave the app demo, during which I was talking about for ~20min, he didn't ask que while demo, but after demo, he noticed and asked me, does the password has any validation? Then he made me to code it, CODE: Validate the password so that it has minimum 10 letter/char (used minlength [html bootstrap]) and at least one upper, lower, digit and special character.(used backend validation) THEORY : then he asked few theory ques one after another , like rapid-fire(it was fun) (these are not in order)
  2. what is bootstrap (I've used bootstrap, he may ask this even if you don't)
  3. PUT vs GET
  4. list vs tuple
  5. MVC (Model-View-Control)
  6. finally what are the things I've learned after all that the examiner asked, if I have any ques, to which I asked for feedback, which I felt was amazing, he ask if my app had any thing that no other app in world has, (I said no) , so next time I have to make something that sets me apart from other in market. total viva time ~45-50 mins all the best!
Rakesh Vajrapu MAD1

Shared viva questions from response sheet: Just now completed MAD-I Level-2 VIVA Proctor ID: Level 3_13 Feedback of Proctor: He's a very patient and nice proctor ever seen and doesn't over-complicate the students. He asked only normal most repeated questions for all VIVA's. Asked easy code change implementation. God has given me this proctor, because I got MAD-II Level-I Proctor very strict and he almost failed me even I answered all th...

Questions remembered
  1. Just now completed MAD-I Level-2 VIVA Proctor ID: Level 3_13 Feedback of Proctor: He's a very patient and nice proctor ever seen and doesn't over-complicate the students. He asked only normal most repeated questions for all VIVA's. Asked easy code change implementation. God has given me this proctor, because I got MAD-II Level-I Proctor very strict and he almost failed me even I answered all the questions asked. What happened during Viva: Initially, I joined 5 mins late and he patiently waited. Asked Self-Introduction Asked Problem Statement and What was implemented in project? Asked for Demo -> I given demo for 18 minutes and displayed working of each functionality and explored each role. Code Change Question: My Admin Dashboard displays the count of Total Students, Total companies, total applications, total drives, total placed students displayed as cards. He asked me to create a table, consisting of same names as Category and another column as their values. Made a Table using HTML, connected Backend route, and copied-pasted same query retreival code 😅😂. I don't know he even seen it or not. Then, he asked me to make the data and the table center of the Webpage. Unable to make it into center as I am weak in remembering the CSS Properties and syntax. Theory questions asked:
  2. What is Cookie?
  3. What is difference between GET and PUT
  4. What is ORM?
  5. What is Database and how it is implemented?
  6. What you learned from this project? Total Viva Time Taken: 48 minutes
Sheet response MAD1

Seemed to be interested in frontend. Even though I had not used some frontend features, still asked me about them.

Questions remembered
  1. Show ID card
  2. Give introduction to yourself and your app
  3. Explain all functionalities of your app
  4. Run the app and give demo of all functionalities.
  5. Show all models and explain them (columns, constraints, etc.)
  6. What is MVC?
  7. Asked what is bootstrap and it's use even though I had not used any bootstrap in my app.
  8. Change background color on login page to background image.
Hakla MAD1

Shared viva questions from response sheet: He is chill; First he told to introduce myself; And asked to demonstrate

Questions remembered
  1. He is chill
  2. First he told to introduce myself
  3. And asked to demonstrate
  4. And tell to add an image in the background in login page.
  5. And told to explain the app.py line by line in detail.
  6. Then, ask a few theoretical questions like mvc, difference between list and tuples and where have u used, and differ get and put
Nahi bataunga MAD1

Shared viva questions from response sheet: Intro about you; Your learning from problem statement; Demo of project

Questions remembered
  1. Intro about you
  2. Your learning from problem statement
  3. Demo of project
  4. Explain code in app.py file
  5. combine admin and user page sign in option
  6. Create a button which can delete all lots together and show its working
  7. Truncate vs drop in sql
  8. Restapi meaning and use
  9. Explain models file Will give you proper time, for coding, explanation etc.
Padhai me dhyan do...naam jan ke kya karoge MAD1

Shared viva questions from response sheet: He is a good proctor.; As long as you know your project, you can do well.; Asked for the demo initially.

Questions remembered
  1. He is a good proctor.
  2. As long as you know your project, you can do well.
  3. Asked for the demo initially.
  4. Code changes were to check if the password is more than 8 characters, had at least 1 upper and lower, and special case character.
  5. Asked theory questions that are normally asked, such as mvc, tuple vs list, get vs put, Asked me to explain my models.py which I did in detail, also asked about the app.py few details.
Ishita MAD1

Maintain your calm, he will test your knowledge in depth and why you've done whatever you've done, the sheet helps, know your code REALLY WELL

Questions remembered
  1. ID Verification
  2. Introduction
  3. Checksum
  4. Explain the problem statement
  5. App demo
  6. Theory Questions (Not in Order):
  7. Explain the database
  8. What modules have you used? Explain in detail.
  9. How can email validation be done?
  10. What is MVC? Where is MVC in your code?
  11. What is the difference between packages and modules?
  12. What is the difference between list and tuple?
  13. Why have you used jsonify?
  14. What is the difference between CSV and json?
  15. What did you learn from the project?
  16. Code Changes:
  17. Perform password validation: (1 uppercase, 1 lowercase, 1 special char, 1 digit, > 6, < 20)
  18. Change the background image for the signup page
Anonymous MAD1

while giving your demo, try to explain some parts of your code too and prepare the questions from the sheet, and while explaining your demo give answers to these common questions by yourself like I explained MVC while giving my demo itself which creates a good impression

Questions remembered
  1. - he first asked me to give me the demo of the project
  2. - then he asked me er diagram, but I didn't had er diagram of my project so I explained my models.py file
  3. - the he asked me to bring the email label email box password label and password box all in the same line
  4. - and then he asked me about bootstrap and its uses (since I was using bootstrap)
  5. - then he asked me about primary key vs foreign key
  6. - then he asked me about what is rest api
  7. - then he asked me about HTTP vs HTTPS
Muhammad Bilal MAD1

please refer to whatever I have written in Questions asked by the Viva examiner portion.

Questions remembered
  1. Proctor was very calm and nice , he gave me much time to think about the question.He asked the following questions:
  2. 1.He asked me to add one more input field "city" in customer register page, which I did by adding attribute city in user table and changed customer register page and login route.
  3. 2.static vs dynammic web pages.
  4. 3.He asked me to add a background image behind my admin dashboard.
  5. 4.What is restful api?
  6. 5.What is bootstrap and its uses.
  7. 6.He asked me to create a table inside a table.
Matt Murdock MAD1

the code changes were really difficult for me my mind was blank
but the proctor was very kind and humble he tried to helpe me
just chill
and practice on your own code
implenent all the changes that is asked in this sheet on your code for practice

Questions remembered
  1. Asked me to change the login function code in such a way that if an Users tries to login with incorrect password more than 3 times then the user's account should get locked for 24 hrs
  2. asked me to add a delete function so that the admin can select the services and he should be able to delete the selected services
  3. asked me to change the background image in theory he asked me primary key VS foreign Key http Vs https list and tuple and dictionary
Sheet response MAD1

He is very patient. No time limit for code changes

Questions remembered
  1. For Level2 :
  2. 1.Introduce yourself
  3. 2.demo
  4. 3.er diagram
  5. Changes in code: do password validation where password should be min 12 length and should consist of a uppercase,lowercase,digit and special character
  6. Viva:
  7. 1.list vs tuple
  8. 2.dictionary
  9. 3.rest api
Optimus prime MAD1

Prepare all questions or ur proctor because they ask many repeated questions.But if ur luck is not good then proctor may change 🥲. But still focus first on ur proctor.

Questions remembered
  1. What is bootstrap
  2. What is MVC ?show it in ur code
  3. What is difference b/w foreign key and primary key
  4. What is difference b/w primary key and unique key
  5. What is difference in list and tuple
  6. Make a reset button on login page which helps to update email and password
  7. Change background
  8. Change bar graph to pie chart
Piyush Gupta MAD1

Although viva was good and proctor was great 👍🏻

Questions remembered
  1. Tell me about yourself
  2. Demo of project
  3. Change the button to link
  4. Change admin page background image
  5. What is http and https
  6. What is protocol
  7. What is get and post
  8. Some 2-3 More question of these topic only
Rishabh MAD1

Be Relaxed . Proctor is cool. . Know what you have done in your project. Good Luck ❤️

Questions remembered
  1. Introduction
  2. Demo
  3. MVC
  4. DIFFERENCE. Verification Validation
  5. Authentication Authorization
  6. Get Put
  7. RESTApi
  8. Flask
  9. Explain your models
  10. ORM
  11. ORDER BY ,GROUP BY with eg
  12. Code Changes. Frontend verification in username and password and some display related things.
Jaswanth Prasanna V MAD1

Proctor was chill just practice these sheet questions

Questions remembered
  1. Explanation
  2. Demo
  3. About models.py
  4. About app.py
  5. About Er diagram
  6. Viva question
  7. Primary key
  8. Css
  9. Bootstrap
  10. What is dictionary
  11. Difference between list and tuple
  12. MVC
  13. Coding questions
  14. Change your chart to pie chart
  15. Change the color of your chart
  16. Add a button called approve all professionals to approve all of them at once
  17. Didn't ask me about api because he had network issues
Keerthi MAD1

just cool prepare theory questions in detail the proctor asking what else if we give one line ans.

Questions remembered
  1. project demo
  2. show your models
  3. create a button called clear it will clear the form data username and password
  4. what is dictionary
  5. difference btw list and tuple
  6. what is primary key and unique key
  7. why we use bootstrap
Gayathri Srinivasan MAD1

Shared viva questions from response sheet: 1.Small intro abt me; 2.Quick demo of project; 3.Asked to implement few changes:

Questions remembered
  1. 1.Small intro abt me
  2. 2.Quick demo of project
  3. 3.Asked to implement few changes:
  4. - Admin can only accept/reject professionals. He asked to add "Delete" button to delete professionals from the table.
  5. - Asked for "Accept All", "Delete All" button in admin dashboard to accept/reject all professionals at once
  6. To implement these changes it took 35-40 mins.
  7. 4.Questions about:
  8. - Lists vs Tuple
  9. - Dictionary
  10. - Lambda function
  11. - Get and Post requests
  12. - What database tables I have used and relationship among them
  13. Completed viva in 45-50 mins.
Dev Gupta MAD1

The proctor is very patient, and cool. He didn't ask to complete the code modification in certain timeframe. Take your time. He kept asking, and I kept answering. He was impressed. At last, he stopped, and praised me.

So, the moral of the story is:
1. You should know each and every part of your code, like your child.
2. The proctor will definitely ask for modifications in your code.
3. Theory - REST APIs, Models, Relationships are must.

Questions remembered
  1. Go through your application.
  2. Create a single login route for all types of users (admin, customers, and professionals).
  3. Add a button on Admin dashboard that will redirect the admin to customer login page.
  4. A brief about the relationships between Models.
  5. Explain different python modules you created in your project (routes.py, models.py, utility.py, etc)
  6. What is REST API.
  7. Difference between Frontend and Backend. Which is more important?
  8. What all tools/frameworks you used in developing your application.
  9. What was the most difficult part for you when you were creating your application.
  10. How dictionaries store data in memory.
  11. How can you read key-value in a dictionary. (like dict.items(), or enumerate())
  12. What is namespace. Are you using namespace in your code.
Vaibhav MAD1

All proctors are amazing, just go through your project and database properly and why u are using them, what unique things that they are possesing and all the best!

Questions remembered
  1. “Level 2 viva”
  2. - College Id
  3. - Checksum
  4. - Self Intro
  5. - Demonstration of your project
  6. - Show me login page, login as admin
  7. - Set a background image(my logo) particularly in a login box(which i have made)
  8. - Bootstrap (i have not used bootstrap in project)
  9. - Why you have not use bootstrap?
  10. - Why you use css?, How you added?
  11. - Explain your database? (+ER diagram)
  12. - Why you have use sqllite?
  13. - Why you have use Flask? (i have also said structure is bit easy)
  14. - Show me your Structure and Explain?
  15. - What you have learn from this project?
Lokabhiram Chintada MAD1

He is super cool😎. Prepare all the questions in this response sheet.

Questions remembered
  1. Into and Demo
  2. Code changes ( change password constraint such that password should be in between 8 and 16, atleast one uppercase, one lowercase and one special character)
  3. About model and ERD Diagram
  4. What is MVC
  5. What is RESTful API
  6. Difference between list and tuple
  7. Difference between GET and PUT
  8. What is primary key
  9. Difference between unique key and primary key
  10. What did you learn from this project
Sheet response MAD1

Explain your database and make your demo in an efficient manner. if you take more time for any code change demo that he asks you to do, u can reduce the theory questions ;)

Questions remembered
  1. Restful API
  2. List vs Tuple
  3. What is Dictionary
  4. Code change to implement user login from single page
  5. Explain Database and relations
  6. Primary key, Unique Key
  7. http vs https
  8. session vs cookies
  9. authentication vs authorisation
Ripunjay Kumar MAD1

Bs ye gform question sb pdh lo aur apne code ke bare mai pta hona chahiye

Questions remembered
  1. REST Api
  2. Get Vs Put
  3. Asked me to implement search functionality(So I should be able to search edu1 edu2 edu3 pr edu1234 but not sectionedu when I search for edu )
  4. Explain database (Aisa explain Kiya ki unhe question krne ka mauka hi nhi mila)
Bhavya Patel MAD1

Be ready with the theory and some core concepts like security features

Questions remembered
  1. Intro, demo
  2. explain your model and constraint on it Code change
  3. what if hacker hacks your database? Implement password security feature
  4. add delete button to remove a particular search result
  5. change port to 8000
  6. what change do you need to make if you want want to run your app on linux/mac
  7. add constraints so that user makes strong password Theory
  8. get/put/post
  9. MVC
  10. restful API
  11. what are session and cookies
  12. authentication vs authorisation. How have you implemented authorisation ?
Harsh MAD1

See the previous questions sheet, GPT the answers, modify them for youself and use them.

Questions remembered
  1. Intro Detailed demo of proj
  2. Tuple vs Dictionary
  3. What is index
  4. Database explanation
  5. Why use Bootstrap
  6. How have I implemented Security in the site
  7. What is try and catch
  8. Code - how to deal if user searches for * after initial text like - 'hap*'
Varad MAD1

If you know about your code and the things used from bootstrap or somewhere else then you are good to go.

Questions remembered
  1. Checksum
  2. Demo
  3. Change Rating from radio button to the stars, (that of Amazon like)
  4. Explain Models
  5. Explain Controllers
  6. List and Tuple difference
  7. What and Why primary keys
  8. What and Why Bootstrap
AK MAD1

be relaxed ... know your app and why you have done things in a particular way

Questions remembered
  1. intro yourself and show checksum
  2. demo the app
  3. demonstrate specific functionality Questions
  4. make some changes (in admin page .. make a button to log into user. When i said cannot be done due to security .. he said make a button to route to user login. I demonstrated that
  5. what challenges did you face in making the app?
  6. why flask - benefits
  7. difference between 2 tier / 3 tier apps (i spoke about client-server and MVC models)
  8. explain MVC
  9. show your database and what constraints are there in that. explain
  10. REST APIs .. why used and advantages
  11. static vs dynamic pages
  12. What all types of testing you did and why? what apart from unit testing? PLEASE NOTE - questions are not provided in the order he asked.
Dhairy MAD1

Shared viva questions from response sheet: tell me about yourself; Demo; Create a discount redeem form in or before checkout

Questions remembered
  1. tell me about yourself
  2. Demo
  3. Create a discount redeem form in or before checkout
  4. Explain Model
  5. Explain code in route.py
  6. What is bootstrap, and use
  7. Rest api
  8. What is class in bootstrap
  9. Primary key vs foreign key this is all I can recall,
Rituparno Sen MAD1

Shared viva questions from response sheet: My viva was around 45 min; The mentor first asked to give a short intro; Then asked what was my understanding of the problem statement

Questions remembered
  1. My viva was around 45 min
  2. The mentor first asked to give a short intro
  3. Then asked what was my understanding of the problem statement
  4. Went on to see demo
  5. Checked every functionality thouroughly
  6. Asked to make changes in my code so that one can apply a promo code or get a special discount if purchased items are above a certain threshold
  7. Asked question regarding apis ? What is rest ?
  8. Some questions related to response codes
  9. Some questions related to database
  10. Why we use sqlite?
  11. What are some differences between sqlite and MySQL etc.
  12. Overall the proctor is very patient and cool
Sheet response MAD1

Shared viva questions from response sheet: Short introduction; what you understand from the problem statement; What Libraries used

Questions remembered
  1. Short introduction
  2. what you understand from the problem statement
  3. What Libraries used
  4. What is bootstrap and how did you used it
  5. implement a Bootstrap Page
  6. What are restful api
  7. difference between authentication and authorization
  8. what did you use for security and how
  9. What is mvc and show in your code
  10. what is CRUD
  11. explain your application and demo
  12. add delete functionality to delete orders
Rushabh Shah MAD1

Shared viva questions from response sheet: Difference between list and tuple,; Difference between primary key and foreign key

Questions remembered
  1. Difference between list and tuple,
  2. Difference between primary key and foreign key
Rithik Agarwal MAD1

Shared viva questions from response sheet: Detailed walkthrough of the app, then asked if I had any additional features.; Asked me to create a delete button where I can select multiple products to delete from a particular section.; Truncate user table through db browser

Questions remembered
  1. Detailed walkthrough of the app, then asked if I had any additional features.
  2. Asked me to create a delete button where I can select multiple products to delete from a particular section.
  3. Truncate user table through db browser
  4. Create a clear button in the login page upon click which the username and password will reset.
  5. Explain why I have used certain codes and why was it necessary to the app.
  6. What is bootstrap.
  7. HTTP methods
  8. Why Flask was used for the app (Advantages of using Flask)
  9. Difference between lists and tuples.
  10. What is mutable and immutable.
  11. What is view in SQL. Chill proctor, was over in about 35 mins
Akhilesh Singh MAD1

Shared viva questions from response sheet: Viva finished in around 35 minutes.; Proctor asked about myself.; Asked what I understood from project statement.

Questions remembered
  1. Viva finished in around 35 minutes.
  2. Proctor asked about myself.
  3. Asked what I understood from project statement.
  4. Then go through demo.
  5. I did not include search for admin. So he asked to add it.
  6. All Http requests?
  7. Response code 501?
  8. Asked to change port of flask app.
  9. Why Bootstrap?
Sukaniya MAD1

Shared viva questions from response sheet: Nice proctor gave time and space to think and answer; Bootstrap and its uses; Delete all user from sqlite database - DELETE FROM USER shows error as i have foreign key constraint on it.

Questions remembered
  1. Nice proctor gave time and space to think and answer
  2. Bootstrap and its uses
  3. Delete all user from sqlite database - DELETE FROM USER shows error as i have foreign key constraint on it.
  4. I have constraint not to have 2 users with the the same name in my code but forgot to handle it... He told me to handle then and there itself... It took some time but worked. He told me to think simple way for that. I don't know what that simple way is.
  5. restful api - why you haven't used api in your application??
  6. types of constraints in sql
  7. what is null and not null?
  8. exception handling and it types (totally blank about arithmetic exceptions as i haven't expect these questions)
  9. what is flask advantages and disadvantages
  10. i have used bar chart for summary. He told me to change it pie chart. He allow me to see the documentation. It worked 😀
  11. jinja template and show that in your code
Griss Harris Dennis MAD1

Shared viva questions from response sheet: About Project; Bootstrap; Difference between list and tuple

Questions remembered
  1. About Project
  2. Bootstrap
  3. Difference between list and tuple
  4. Session
  5. what is restful api
  6. Proctor asked me to create a button called reset on login page.on clicking the button after entering username and password, it deletes the username and password in the User table.

Approved viva sets

  1. 1
    Tell me about yourself.
    Times asked 6
    Official solution

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

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

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

  2. 2
    Explain the project/problem statement.
    Times asked 1
    Official solution

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

    Suggested flow

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

  3. 3
    Give a complete demo of your application.
    Times asked 2
    Official solution

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

    Suggested flow

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

  4. 4
    Explain all functionalities of your application.
    Times asked 1
    Official solution

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

    Suggested flow

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

  5. 5
    What additional features have you implemented?
    Times asked 1
    Official solution

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

    Example

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

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

  6. 6
    What challenges did you face while building the project?
    Times asked 1
    Official solution

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

    Example

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

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

  7. 7
    What did you learn from this project?
    Times asked 1
    Official solution

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

    Example

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

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

  8. 8
    Create a Reset/Clear button on the login page to clear username and password.
    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.

  9. 9
    Delete all users from the database (handling foreign key constraints).
    Times asked 1
    Official solution

    SimpleForeign Key doosri table ki PK ko refer karti hai, relationship + referential integrity.

    user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)

    Invalid user_id insert nahi hoga. FK unique nahi hona zaroori — One-to-Many mein same user_id kai rows.
    FK + PK same column: 1-1 sharing, jaise AdminProfile.id = FK to user.id.
    Should FK always unique? Nahi. Tab One-to-One chahiye ho tab unique.

  10. 10
    Handle duplicate usernames using database constraints/validation.
    Times asked 1
    Official solution

    SimpleConstraints rules hain jo galat data rok te hain. Referential integrity FK valid parent ko point kare.

    PK, FK, UNIQUE, NOT NULL, CHECK (age >= 18). ORM Column flags yahi map karte hain.
    SQL = language tables se baat. Database organized data store.
    SQL View: saved query, table jaisi dikhti hai, data copy nahi.
    Cluster: kai DB servers together (HA/scale) — MAD1 SQLite single file.
    Entity mapping: class User → table user, attributes → columns.

  11. 11
    Change a Bar Chart to a Pie Chart.
    Times asked 1
    Official solution

    SimpleChart.js frontend library. Backend counts bhejta hai, JS graph banata hai.

    stats = {'booked': 10, 'cancelled': 2}

    render_template('summary.html', stats=stats)
    new Chart(ctx, {type:'bar', data:{labels:[...], datasets:[{data:[...]}]}})

    Dynamic: har load pe query. Pie vs bar: Chart type change. Colors: backgroundColor array.
    Swap graphs: HTML do canvas ki jagah badlo.

  12. 12
    Change chart colors.
    Times asked 1
    Official solution

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

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

    Example

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

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

  13. 13
    Add admin search functionality.
    Times asked 1
    Official solution

    SimpleSearch box GET form, backend query filter, results template mein.

    q = request.args.get('q', '').strip()
    results = Doctor.query.filter(Doctor.name.ilike(f'%{q}%')).all() if q else []
    return render_template('search.html', results=results, q=q)

    Jinja: {{ results|length }} matches. Empty: 'No results'.
    JS-only filter: saara data pehle load, client filter — chhote lists. Bada data: server search.
    Search generally GET (shareable URL). Count: len(results) ya db.func.count.

  14. 14
    Create a Delete All button.
    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.

  15. 15
    Delete multiple selected records.
    Times asked 1
    Official solution

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

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

  16. 16
    Delete a specific searched record.
    Times asked 1
    Official solution

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

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

  17. 17
    Add a discount/promo code feature during checkout.
    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
    Change rating input from radio buttons to star ratings.
    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.

  19. 19
    Add a button to redirect Admin to the User/Login page.
    Times asked 1
    Official solution

    Simpleredirect browser ko naya URL pe GET karne ko kehta hai (generally 302).

    return redirect(url_for('dashboard'))

    Login/register/delete ke baad use karo taaki refresh duplicate POST na kare.
    Doosra page dikhana hai with new request — redirect. Same request pe HTML — render_template.

  20. 20
    Create a single login page for multiple user roles.
    Times asked 1
    Official solution

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

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

    Example naya field 'city':

    user.city = db.Column(db.String(50))
    user.city = request.form.get('city')
    <input name='city'>  ...  {{ user.city }}
  21. 21
    Implement password validation: Minimum/maximum length Uppercase Lowercase Number Special character
    Times asked 1
    Official solution

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

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

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

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

  22. 22
    Add password security (hashing/protection).
    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 }}
  23. 23
    Add a new field (e.g., City) to the registration form and database.
    Times asked 1
    Official solution

    Simple 4-step: Model → DB → Form → Route → Template. Yeh sabse common live-coding hai.

    1) models.py: age = db.Column(db.Integer, nullable=True)
    2) DB: SQLite viewer se column, ya DB delete karke create_all, ya ALTER TABLE user ADD COLUMN age INTEGER; production mein Flask-Migrate.
    3) register.html: <input type='number' name='age' min='18' required>
    4) route: user.age = request.form.get('age', type=int); commit
    5) dashboard: {{ user.age }} admin table mein <td>{{ u.age }}</td>

    Print terminal: print('AGE', request.form.get('age'))
    Phone/city same pattern, String(20). Openings on Drive: integer column + form + create_drive route.

  24. 24
    Change background color/image of pages.
    Times asked 1
    Official solution

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

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

  25. 25
    Create a table inside another table.
    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 }}
  26. 26
    Display dashboard summary in an HTML table.
    Times asked 1
    Official solution

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

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

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

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

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

  27. 27
    Change Flask application port.
    Times asked 1
    Official solution

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

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

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

  28. 28
    Make the project compatible with Linux/Mac.
    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'))
  29. 29
    Implement search functionality with proper matching.
    Times asked 1
    Official solution

    SimpleSearch box GET form, backend query filter, results template mein.

    q = request.args.get('q', '').strip()
    results = Doctor.query.filter(Doctor.name.ilike(f'%{q}%')).all() if q else []
    return render_template('search.html', results=results, q=q)

    Jinja: {{ results|length }} matches. Empty: 'No results'.
    JS-only filter: saara data pehle load, client filter — chhote lists. Bada data: server search.
    Search generally GET (shareable URL). Count: len(results) ya db.func.count.

  30. 30
    Approve all professionals using one button.
    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.

  31. 31
    Why did you use Flask?
    Times asked 1
    Official solution

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

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

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

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

    app.run() development server start karta hai. Production mein gunicorn/waitress.
  32. 32
    Advantages and disadvantages of Flask.
    Times asked 1
    Official solution

    SimpleFlask halka aur flexible hai, lekin bade features khud jodne padte hain.

    Faydesimple syntax, MAD1/docs abundant, jo chahiye woh library (SQLAlchemy, Login).

    NuksaanDjango jaisa ready admin/auth nahi, structure khud decide, badi team mein inconsistency.

    Example10 line Hello World vs Django startproject. Course isliye Flask sikhata hai.

  33. 33
    Explain your project structure.
    Times asked 3
    Official solution

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

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

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

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

  34. 34
    Explain app.py.
    Times asked 3
    Official solution

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

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

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

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

  35. 35
    Explain routes.py.
    Times asked 3
    Official solution

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

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

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

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

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

  37. 37
    Explain controllers.
    Times asked 1
    Official solution

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

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

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

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

  38. 38
    Explain utility/helper modules.
    Times asked 1
    Official solution

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

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

    Example

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

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

  39. 39
    Explain imported packages/modules in app.py.
    Times asked 1
    Official solution

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

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

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

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

  40. 40
    Explain your database schema.
    Times asked 3
    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.

  41. 41
    Explain the ER diagram.
    Times asked 1
    Official solution

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

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

    Example skeleton

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

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

  42. 42
    Explain relationships between models.
    Times asked 3
    Official solution

    SimpleRelationships tables ko jodti hain taaki related data object se mil jaaye.

    One-to-Many: User → kai Posts. posts = relationship('Post', backref='author'). FK post.user_id.
    One-to-One: User → Profile. uselist=False + unique FK. Profile.user_id unique.
    Many-to-Many: Student ↔ Drive. Junction/secondary table (student_id, drive_id).

    Example 1-1:

    class Profile(db.Model):
        user_id = db.Column(db.Integer, db.ForeignKey('user.id'), unique=True)
        user = db.relationship('User', back_populates='profile', uselist=False)

    1-M ko 1-1: child FK pe unique=True + uselist=False.
    Parent-child: parent PK, child FK. Junction table extra columns bhi rakh sakti hai (applied_on).

  43. 43
    Explain database constraints.
    Times asked 1
    Official solution

    SimpleConstraints rules hain jo galat data rok te hain. Referential integrity FK valid parent ko point kare.

    PK, FK, UNIQUE, NOT NULL, CHECK (age >= 18). ORM Column flags yahi map karte hain.
    SQL = language tables se baat. Database organized data store.
    SQL View: saved query, table jaisi dikhti hai, data copy nahi.
    Cluster: kai DB servers together (HA/scale) — MAD1 SQLite single file.
    Entity mapping: class User → table user, attributes → columns.

  44. 44
    Why SQLite?
    Times asked 1
    Official solution

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

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

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

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

  45. 45
    SQLite vs MySQL.
    Times asked 1
    Official solution

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

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

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

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

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

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

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

    Example model

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

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

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

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

  47. 47
    Advantages/disadvantages of SQLAlchemy.
    Times asked 1
    Official solution

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

    db = SQLAlchemy(app)

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

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

  48. 48
    Uses of SQLAlchemy.
    Times asked 1
    Official solution

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

    db = SQLAlchemy(app)

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

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

  49. 49
    Explain CRUD operations.
    Times asked 4
    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.

  50. 50
    Difference between TRUNCATE and DROP.
    Times asked 1
    Official solution

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

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

  51. 51
    Difference between PRIMARY KEY and FOREIGN KEY.
    Times asked 1
    Official solution

    SimplePrimary Key row ki unique ID hai, Foreign Key doosri table ki Primary Key ko point karti hai.

    Primary Key: unique + not null. Har table mein hota hai. Example: user.id = 5
    Foreign Key: relationship banati hai. post.user_id = 5 matlab yeh post user 5 ki hai.

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
    class Post(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        user_id = db.Column(db.Integer, db.ForeignKey('user.id'))

    FK Primary Key bhi ho sakti hai (1-to-1 profile table). FK unique ho to One-to-One, nahi to One-to-Many.

  52. 52
    Difference between PRIMARY KEY and UNIQUE KEY.
    Times asked 1
    Official solution

    SimplePrimary Key table ki main identity hai (ek hi), Unique Key extra unique column ho sakta hai (kai).

    PK: NOT NULL + UNIQUE, sirf ek clustered identity. Example: id
    Unique: duplicate nahi, lekin NULL allow ho sakta hai. Example: email, username

    UNIQUE + NOT NULL + AUTO_INCREMENT PK jaisa behave karta hai, lekin table ki official PK nahi. Relationships/FK generally PK ko refer karti hain.
    Isliye alag Primary Key rakhna better hai.

  53. 53
    Types of SQL constraints.
    Times asked 1
    Official solution

    SimpleConstraints rules hain jo galat data rok te hain. Referential integrity FK valid parent ko point kare.

    PK, FK, UNIQUE, NOT NULL, CHECK (age >= 18). ORM Column flags yahi map karte hain.
    SQL = language tables se baat. Database organized data store.
    SQL View: saved query, table jaisi dikhti hai, data copy nahi.
    Cluster: kai DB servers together (HA/scale) — MAD1 SQLite single file.
    Entity mapping: class User → table user, attributes → columns.

  54. 54
    What are NULL and NOT NULL?
    Times asked 1
    Official solution

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

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

    __tablename__ = 'users' # table name override

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

  55. 55
    What is a SQL View?
    Times asked 1
    Official solution

    SimpleConstraints rules hain jo galat data rok te hain. Referential integrity FK valid parent ko point kare.

    PK, FK, UNIQUE, NOT NULL, CHECK (age >= 18). ORM Column flags yahi map karte hain.
    SQL = language tables se baat. Database organized data store.
    SQL View: saved query, table jaisi dikhti hai, data copy nahi.
    Cluster: kai DB servers together (HA/scale) — MAD1 SQLite single file.
    Entity mapping: class User → table user, attributes → columns.

  56. 56
    What is a RESTful API?
    Times asked 4
    Official solution

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

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

    Example

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

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

  57. 57
    Why did you use REST APIs?
    Times asked 1
    Official solution

    Definition style question: 1 line simple Hinglish + project example + mini code.

    Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'

    Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'

    Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.

  58. 58
    Why didn't you use APIs in your application?
    Times asked 1
    Official solution

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

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

    Example

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

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

  59. 59
    Advantages of REST APIs.
    Times asked 1
    Official solution

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

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

    Example

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

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

  60. 60
    HTTP request methods (GET, POST, PUT, DELETE, etc.).
    Times asked 1
    Official solution

    SimpleGET read karta hai, PUT existing resource replace/update karta hai.

    GET /users/1 → data lao, side-effect nahi. PUT /users/1 → poora user update, idempotent.
    PUT vs FETCH: FETCH HTTP method nahi, JS fetch() function hai jo GET/PUT/POST kuch bhi bhej sakta hai.
    Search GET, edit-save PUT/POST. GET se create mat karo.

  61. 61
    Difference between GET and PUT.
    Times asked 2
    Official solution

    SimpleGET read karta hai, PUT existing resource replace/update karta hai.

    GET /users/1 → data lao, side-effect nahi. PUT /users/1 → poora user update, idempotent.
    PUT vs FETCH: FETCH HTTP method nahi, JS fetch() function hai jo GET/PUT/POST kuch bhi bhej sakta hai.
    Search GET, edit-save PUT/POST. GET se create mat karo.

  62. 62
    HTTP response codes.
    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'))
  63. 63
    What is status code 501?
    Times asked 1
    Official solution

    SimpleStatus code number batata hai request ka result.

    200 OK — success, page/data mil gaya.
    201 Created — POST se naya resource.
    302/303 Found/See Other — redirect (login ke baad).
    304 Not Modified — cache use karo.
    400 Bad Request — galat input.
    401 Unauthorized — login nahi (ironically authentication missing).
    403 Forbidden — login hai, permission nahi.
    404 Not Found — route/record nahi.
    500 Internal Server Error — server crash (DB error, NoneType). debug=True pe traceback.
    501 Not Implemented — method server nahi sambhalta.

    abort(404) Flask mein. get_or_404(id) record na ho to 404.
    User ID GET pe exist na kare to 404 return karo, 500 nahi.

  64. 64
    Difference between HTTP and HTTPS.
    Times asked 6
    Official solution

    SimpleHTTP plain text bhejta hai, HTTPS encrypted bhejta hai.

    HTTP: data beech mein koi padh sakta hai (password, session). Port 80. Padlock nahi.
    HTTPS: SSL/TLS se encrypt. Port 443. Certificate verify hota hai. Man-in-the-middle mushkil.

    Examplecafe WiFi pe HTTP login karo to password sniff ho sakta hai. HTTPS pe attacker ko garbage dikhega.

    Viva: HTTPS = HTTP + encryption + identity (certificate). Production apps hamesha HTTPS.

  65. 65
    Why use jsonify()?
    Times asked 1
    Official solution

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

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

  66. 66
    Difference between List and Tuple.
    Times asked 1
    Official solution

    SimpleList changeable ordered, Tuple fixed ordered, Dict key-value.

    list: [1,2,3] — append, mutable, duplicate ok. Arrays jaisa lekin mixed types.
    tuple: (1,2) — immutable, dict key ban sakta hai.
    dict: {'name':'Ram'} — fast lookup by key. JSON objects dict ban jaate hain.
    set: unique items.
    Array (JS) ≈ Python list. JS object ≈ Python dict.
    Mutable: list, dict. Immutable: tuple, str, int.

  67. 67
    Difference between List and Dictionary.
    Times asked 1
    Official solution

    SimpleList changeable ordered, Tuple fixed ordered, Dict key-value.

    list: [1,2,3] — append, mutable, duplicate ok. Arrays jaisa lekin mixed types.
    tuple: (1,2) — immutable, dict key ban sakta hai.
    dict: {'name':'Ram'} — fast lookup by key. JSON objects dict ban jaate hain.
    set: unique items.
    Array (JS) ≈ Python list. JS object ≈ Python dict.
    Mutable: list, dict. Immutable: tuple, str, int.

  68. 68
    What is a Dictionary?
    Times asked 1
    Official solution

    Definition style question: 1 line simple Hinglish + project example + mini code.

    Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'

    Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'

    Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.

  69. 69
    How are dictionaries stored in memory?
    Times asked 1
    Official solution

    Definition style question: 1 line simple Hinglish + project example + mini code.

    Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'

    Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'

    Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.

  70. 70
    How do you read key-value pairs (items(), etc.)?
    Times asked 1
    Official solution

    Definition style question: 1 line simple Hinglish + project example + mini code.

    Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'

    Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'

    Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.

  71. 71
    Mutable vs Immutable.
    Times asked 1
    Official solution

    SimpleList changeable ordered, Tuple fixed ordered, Dict key-value.

    list: [1,2,3] — append, mutable, duplicate ok. Arrays jaisa lekin mixed types.
    tuple: (1,2) — immutable, dict key ban sakta hai.
    dict: {'name':'Ram'} — fast lookup by key. JSON objects dict ban jaate hain.
    set: unique items.
    Array (JS) ≈ Python list. JS object ≈ Python dict.
    Mutable: list, dict. Immutable: tuple, str, int.

  72. 72
    Exception handling.
    Times asked 1
    Official solution

    SimpleException error object. try-except se app crash ki jagah friendly message.

    try:
        age = int(request.form['age'])
        db.session.commit()
    except ValueError:
        flash('Age number hona chahiye')
    except SQLAlchemyError:
        db.session.rollback()
        flash('Database error')

    ArithmeticError/ZeroDivisionError, KeyError, TypeError common. SQLAlchemy type errors: sahi Column type, form ko int() se convert.
    User ko 500 ka traceback mat dikhao production mein.

  73. 73
    Types of exceptions (e.g., Arithmetic Exception).
    Times asked 1
    Official solution

    SimpleException error object. try-except se app crash ki jagah friendly message.

    try:
        age = int(request.form['age'])
        db.session.commit()
    except ValueError:
        flash('Age number hona chahiye')
    except SQLAlchemyError:
        db.session.rollback()
        flash('Database error')

    ArithmeticError/ZeroDivisionError, KeyError, TypeError common. SQLAlchemy type errors: sahi Column type, form ko int() se convert.
    User ko 500 ka traceback mat dikhao production mein.

  74. 74
    Difference between packages and modules.
    Times asked 1
    Official solution

    Difference question hai — 3 cheezein bolo: meaning, kab use, 1 example.

    Pehle concept A ek line, phir B ek line, phir table-jaisa farq (input/output/side-effect).
    Example hamesha MAD1 se: GET search page, POST register, PUT/PATCH API update, session vs cookie login.

  75. 75
    What is Namespace?
    Times asked 1
    Official solution

    Simple mix of small concepts examiners poochte hain:

    Enum: fixed choices (status = pending/approved). Python Enum ya DB Enum column.
    Lambda: one-line anonymous function. key=lambda x: x.name sort ke liye.
    datetime: dates/times. timedelta(days=1) yesterday. default=datetime.utcnow.
    os.getenv('SECRET_KEY') environment se config, hardcode nahi. .env alternative: actual OS env, config.py, vault.
    HTML metadata: <meta charset>, <meta name='viewport'> — page ke baare mein, body content nahi.
    HTTP metadata: headers (Content-Type, Set-Cookie).
    Request payload: body data (JSON/form).
    Namespace: naam collide na hon (Blueprint name, Python packages).
    Plugins: extra packages (Flask-Login). Package vs module: package folder with __init__, module ek .py file.

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

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

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

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

  77. 77
    Uses of Bootstrap.
    Times asked 1
    Official solution

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

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

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

  78. 78
    Why Bootstrap?
    Times asked 1
    Official solution

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

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

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

  79. 79
    Why didn't you use Bootstrap?
    Times asked 1
    Official solution

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

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

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

  80. 80
    What are Bootstrap classes?
    Times asked 1
    Official solution

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

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

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

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

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

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

  82. 82
    How did you add CSS?
    Times asked 1
    Official solution

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

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

  83. 83
    Static vs Dynamic web pages.
    Times asked 1
    Official solution

    SimpleStatic page har user ko same HTML file. Dynamic server pe data se HTML banati hai.

    Static: about.html. Dynamic: dashboard Jinja + DB ({{ user.name }}, loops).
    Flask templates dynamic pages hain. static/ folder CSS/images ke liye.

  84. 84
    Difference between Frontend and Backend.
    Times asked 1
    Official solution

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

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

  85. 85
    What is MVC?
    Times asked 8
    Official solution

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

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

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

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

  86. 86
    Explain MVC in your project.
    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.

  87. 87
    Difference between 2-tier and 3-tier architecture.
    Times asked 1
    Official solution

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

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

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

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

  88. 88
    What are Sessions?
    Times asked 1
    Official solution

    Definition style question: 1 line simple Hinglish + project example + mini code.

    Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'

    Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'

    Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.

  89. 89
    Sessions vs Cookies.
    Times asked 1
    Official solution

    SimpleCookie browser mein save hoti hai, Session server pe data rakhta hai aur browser ko sirf ID deta hai.

    Cookie: key-value browser pe. JS padh sakta hai (agar HttpOnly nahi). Size chhoti (~4KB).
    Session: server-side dict. Flask default mein session data signed cookie mein hi store hota hai (client pe, lekin tamper-proof).

    Example

    session['user_id'] = 12 # login ke baad
    # browser ko Set-Cookie milti hai

    Tab close: default Flask session cookie browser close pe delete (session cookie). Permanent session alag hota hai.
    Incognito: cookies isolated, isliye logged-in nahi dikhega.
    SECRET_KEY se session sign hota hai — key nahi to session insecure/kaam nahi karega.

  90. 90
    What is a Cookie?
    Times asked 1
    Official solution

    Definition style question: 1 line simple Hinglish + project example + mini code.

    Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'

    Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'

    Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.

  91. 91
    Authentication vs Authorization.
    Times asked 8
    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+).

  92. 92
    How did you implement authorization?
    Times asked 1
    Official solution

    SimpleAuthentication session se, Authorization role/ownership check se.

    def admin_required(f):
        @wraps(f)
        def wrap(*a,**k):
            if session.get('role') != 'admin':
                abort(403)
            return f(*a,**k)
        return wrap

    Jinja: {% if session['role']=='admin' %}<a href='/admin'>Admin</a>{% endif %}
    Yeh hide hai, security nahi — route pe check zaroori. Admin authenticated bhi hai (logged in) aur authorized bhi (role).

  93. 93
    How did you ensure session management?
    Times asked 1
    Official solution

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

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

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

  94. 94
    Email validation.
    Times asked 1
    Official solution

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

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

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

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

  95. 95
    Explain password validation logic.
    Times asked 1
    Official solution

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

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

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

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

  96. 96
    Can password validation be implemented using Regex?
    Times asked 1
    Official solution

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

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

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

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

  97. 97
    What types of testing did you perform?
    Times asked 1
    Official solution

    SimpleTesting code sahi hai verify. Unit = chhote functions, Integration = route+DB, System = poora flow.

    Pytest: test_*.py, assert. Markers: @pytest.mark.slow skip/select. Keywords: pytest -k login.
    Unit testing se regression kam, viva ke alawa CI mein fayda. Manual: demo scenarios (overbook, blacklist).

  98. 98
    Why unit testing?
    Times asked 1
    Official solution

    SimpleTesting code sahi hai verify. Unit = chhote functions, Integration = route+DB, System = poora flow.

    Pytest: test_*.py, assert. Markers: @pytest.mark.slow skip/select. Keywords: pytest -k login.
    Unit testing se regression kam, viva ke alawa CI mein fayda. Manual: demo scenarios (overbook, blacklist).

  99. 99
    What testing did you do apart from unit testing?
    Times asked 1
    Official solution

    SimpleTesting code sahi hai verify. Unit = chhote functions, Integration = route+DB, System = poora flow.

    Pytest: test_*.py, assert. Markers: @pytest.mark.slow skip/select. Keywords: pytest -k login.
    Unit testing se regression kam, viva ke alawa CI mein fayda. Manual: demo scenarios (overbook, blacklist).

  100. 100
    What is Bootstrap class?
    Times asked 1
    Official solution

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

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

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

  101. 101
    What is a Model?
    Times asked 1
    Official solution

    Definition style question: 1 line simple Hinglish + project example + mini code.

    Template'X ka kaam Y hai. Mere project mein Z jagah use hua.'

    Example'Session login state rakhta hai. session[user_id]=u.id login pe, logout pe session.clear().'

    Agar topic Vue/Celery/Redis ho aur project mein nahi hai to sach bolo, theory example do.

  102. 102
    Explain company templates.
    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.

  103. 103
    Difference between CSV and JSON.
    Times asked 1
    Official solution

    SimpleCSV table jaisa text (comma rows), JSON nested objects/lists.

    CSV: name,age\nRam,20 — Excel/export ke liye. Nested data mushkil.
    JSON: {"name":"Ram","age":20,"roles":["admin"]} — APIs ka standard.
    Project: CSV export reports, JSON APIs/Chart.js data.

  104. 104
    Why use JSON?
    Times asked 1
    Official solution

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

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

  105. 105
    Explain checksum.
    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.

  106. 106
    Show/download checksum.
    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.

  107. 107
    Show ID card.
    Times asked 5
    Official solution

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

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

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