Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level1_131

Share your experience Add your viva experience here
295 Questions
25 Sets
0 Topics
24 Reviews
Tips for this examiner: She is helpful and also give feedback

Student reviews

Sheet response MAD1

she is really sweet and help u throughout. be confident and do your best !

Questions remembered
  1. - wht is "action' in html
  2. - explain models and their relationship
  3. - get and post
  4. - coding ques similar to wht she's asking in the response sheet
  5. - explain login and register route
  6. and more around app.py only
Harshaa MAD1

She will give hints , I was blank and nervous so i messed up in some parts...overall it was good

Questions remembered
  1. Id
  2. Features and about the folders
  3. Asked to create a viva.txt
  4. Then in that I was asked to code like there exists a user table and we get input from user and add that record in the table and print user added successfully
  5. Jinja a list was given and from that the numbers greater than 3 has to be printed
  6. Some questions from the app.py why this line and all
Sheet response MAD1

Shared viva questions from response sheet: Create a route which takes staff id at endpoint, defination staff_login, render template to user.html, which show Staff name at first page, it shows Staff id, trek name, Trek id; Just prepare this and every line it ,, why this why thiss you write here every single line of this code.; And little theory DOM

Questions remembered
  1. Create a route which takes staff id at endpoint, defination staff_login, render template to user.html, which show Staff name at first page, it shows Staff id, trek name, Trek id
  2. Just prepare this and every line it ,, why this why thiss you write here every single line of this code.
  3. And little theory DOM
  4. Get, Post
  5. What happens if we submit a form with Get
  6. What is debug=True
  7. She ask a lot of little things
  8. Very basics theory.
  9. Datatype of this variable
  10. like this
shivani jain MAD1

at the end she was like that's all from my side i will evaluate based on your performance u give mostly right answers but the coding ques is 75% right only i was like 🥺
then she said why u seem so stressed i said i was bit nervous she said why u get confused and at last she said that's all if u have any ques ask u will se result once all the level 2 gets completed and wish me luck for my future
overall very sweet proctor i enjoy giving viva .

Questions remembered
  1. mad 1 level 2 proctor:131
  2. viva starts at 4:24 she came late
  3. and then she asks for id
  4. download from portal or run checksum i choose to download from portal
  5. then she said okay you have already given demo twice once in video and in level1
  6. we will start the main part i said okay sure sure
  7. then she asks me to make viva.txt and write a code
  8. create a route which takes id of user from url as a part of endpoint ,
  9. with defination name user_login(), which renders user.html which displays
  10. name of the user and all the trek id and trek name related to that in the form of table
  11. then she said are u sure i was like😨uhmmm hmm she help a little bit to correct the code
  12. the she asks okay tell me the folder and files structure in brief
  13. then some back to back ques
  14. backref
  15. nullable
  16. app.context
  17. port
  18. name=main
  19. flask
  20. why track modifications false
  21. debug
  22. tr td th
  23. uselist
  24. and 2 3 more
  25. then she was like okay move through your controllers i will stop u and ques u
  26. then she asks like 8 to 10 ques from that
  27. current_app
  28. render template
  29. redicect
  30. url for
  31. which method
  32. why int id
  33. session
  34. which session
  35. which request
  36. if get then how will details show
  37. why some has int id and some has not
  38. then asked to write render redirect and url for
Benisha MAD1

Amazing proctor, extremely kind. Know your written work (code and theory concepts) well.

Questions remembered
  1. * Talk about the folder structure.
  2. * Talk about Models and Relationships
  3. * What is the function of the "name" attribute in a form.
  4. * Coding Question - creating a route to basically display user detail and the trek details of what they booked.
  5. * What is Command Line Argument
  6. * More on Forms - POST, GET
  7. * How to get retrieve data from a search input (query parameter)
  8. * Flask Login - current_user - why is it used or preferred
Sabuj Ghatak MAD1

I think i might be missing 1 or 2 questions just know your code well and have basic knowledge of topics she is very nice she gave some hints during the coding question and asked me to drink water if i was feeling nervous

Maam is chill if you are having issues writing code then she will also hint somethings. for coding questions just ask what files you are allowed to look at for help for me i asked if i could look at my models file and she said yeah sure just dont look at other files

Questions remembered
  1. 1.This is for level 2 viva
  2. 2.show id
  3. 3.explain everything in app.py (she will ask anything here by pointing to a line of code)
  4. 4.explain models.py(why the tables are designed the way they are for eg: i had a user table with all users where i had a role column to distinguish between trekkers staff and admin)
  5. 5.what is backref
  6. 6.what are the relationships between the models
  7. 7.what are orms
  8. 8.i had something called app_context and context_processor in my code she asked to explain that
  9. 9.create a route which takes trek id of user from url as a part of endpoint , with defination name trek(), which renders trek.html which displays the booking id , username and status of booking related to that particular trek in the form of table
Well Wisher MAD1

If you have not studied your project well, or you are looking for a proctor who asks fewer questions, then you are in trouble.
If you have basic good understanding of MAD-1 theory and how it is applied in your project then she is one of the best proctors you can ever get.
She is very interactive, points out your mistakes, and even guides you if you go wrong while writing code. Overall she has a very good vibe, you might want to interact more with her.
If you don’t know something, do not try to act oversmart. Just admit that you don’t know. If you ask her the question back, she may explain it to you.
Be confident, clear, and respectful while answering.
You should have a strong understanding of app.py and models.py
Be prepared to write routes along with HTML forms or tables.
You should know basic frontend concepts. No need to go too deep into Bootstrap elements.
Go through all the questions mentioned about her in this sheet, 80–90% of them are likely to repeat.

Questions remembered
  1. DOUBLE CLICK FOR FULL VIEW. LEVEL - 2
  2. There was no demo required. She asked me to show my ID and perform the checksum or download the project. I chose to download the project.
  3. She asked me to explain the structure of my application.
  4. She told me to open models.py and explain the Admin table first, and then explain each table along with its relationship with other tables.
  5. She asked me to create a file named viva.txt and write code defining a one-to-one relationship between Student and User. (I fumbled here.)
  6. She asked me to write code to fetch a student from the Student table using ID.
  7. She asked me to write code to fetch applications from a student (e.g., apps = student.applications).
  8. She asked me to write code for a route along with HTML, where we take the ID from the URL then pass it to the backend then render an HTML page where display the Student Name as a heading and show a table containing Student’s Application ID and Application Status.She emphasized being careful about using methods=['GET', 'POST']. You should clearly know which method to use and why.
  9. While writing HTML code, she asked the difference between <tr>, <td>, and <th>.
  10. She asked me to open app.py and explain @app.template_filter('from_json') which I have used in my code. I explained that I used this for tables.js.
  11. She asked me to open register_student.html and explain why I used pattern="[a-zA-Z0-9_]+"
  12. She asked why I used minlength="6" and what type of validation it represents.
  13. She asked what is enctype and what is this use for?
  14. She asked how many types of HTTP methods are there? How many have you used? Why only GET and POST? What is PUT? If PUT is used for updating, why didn’t you use it? Why are only GET and POST commonly used in HTTP requests?
  15. She asked what would happen if we use the GET method to send data to the server.
  16. She asked how to extract data from query parameters in a URL.
  17. After around 45 minutes, she said “This is all from my side.” Then she provided feedback and asked if I wanted to ask anything else. You should definitely ask for feedback on how you can improve your project or viva performance.
  18. At the end, she asked, "What else are you doing apart from this degree? What resources or documentation did you refer to while building this project?"
JD MAD1

Just be calm & chill & give your best!! , Best Of Luck 😊👍

Questions remembered
  1. Double click to view full!! (LEVEL 2) (im using casual eng while describing but during viva it was formal conversation!!)
  2. show id & no demo, mam directly told i think u already done this stuff in viva 1, so we will proceed with your pro struc & asked to explain fronted backend database stuff & what i used, while u explain she may ask ques related to that thing like relationships etc, i told purpose of relationship, about orm etc, once she get a hint u know about that topic she may move on to next que, her voice was breaking & got disconnected but dont be panicked.
  3. (CODE) Relationships between models, she asked me to make viva.txt & told what exactly i should do i mean like take id of the student from form(id.html) then gave me endpoint names, i done the frontend part then told bout backend like she told to create a route which renders id.html & inside this first get id then with this id i want to retrieve student name & their applications & render it in another html file & show this data in table format & may also ask corresponding info u may need to use orm python obj for data retrieval, (instead of filtering u can use apps=student.applications & pass it), during writing another student.html there she tested my jinga skills like loops conditions(sometime we forget to end loop/if like endfor endif or in var {{}} so dont forget coz sometimes she may not remind u but later deduct marks).
  4. asked about http methods, use of name in form, what will happen if we try to submit method='GET'(ans - we get that value in url) & how will we retrieve it in backend(ans - request.args.get('name')), after i told its value will be in url then she asked me to write & show how the url will look like 💀.
  5. Told to open app.py, then whats the use of secret_key, i imported migrate so asked about that module what it does, gave a situation suppose 2 users already exists & u used migrate & added 2 new columns using migrate then what will the prev 2 users value contain in new columns? (ans - NULL, ans are very simple so dont get panicked with length of que 😊), whats __name__='__main__', whats is session what is session.clear(), she asked to open route where student apply for apps, i opened apply route, she asked for creating apps u r using drive id & student id so i can see u r passing drive id so from where u r getting student id?(ans - from session), then after this she finally wrapped up.😊 Finally at end we had a small conversation about my career like what im interested in, r u doing this degree standalone, she also gave career advice coz i was nervous during viva, she was very friendly she may give hint if u r stuck somewhere & till now it was amazing experience during this viva. 😊
Aarushi MAD1

She is calm not loud and guide you at the end of your viva...She made me wear my ear buds because of echo

Questions remembered
  1. Project code and folder overview
  2. Write new codes like fetch id from application and endpoint home that takes input form the form and appears on the home.html page something like that
  3. That match the column question redirect render template and url_for()
  4. Explain debug=True
  5. And basic to moderate questions
om MAD1

mam is too supportive and wherever you feel struck dont lie or jargon tell straight related to what u know related to that and then she would help by providing hints and then u need to explain then

Questions remembered
  1. 1)download the project from portal
  2. 2)explain folder structure and importance of each line
  3. 3)open db.py and explain db related questions primary key foreign key how did u ensure one to one relationship tell the relationship btwn your tables what is secondary table etc
  4. 4)open app.py and show route of student applying for drive why <> why <int : > and then scroll down and why if name == _main_
  5. 5) redirect rendertemplate and url_for difference
  6. 6)get and post method and them in action in our code
  7. 7)how did u handle resume
  8. 8)how did u handle one student can apply for drive only once
  9. 9)write a sql query for inserting values into table
  10. 10)how did u get role into line xxx
  11. like she told to scroll app.py and then was randomly asking questions
  12. but if we struggle a bit she would help
  13. 11)make a viva.txt write a html and app.py code where a form is shown / name is shown
  14. and then if he submits name should be shown
  15. i wrote basic version and then with her guidance completed the code added jinja loops as her suggestion
  16. 12)asked about written code then
  17. 13)and then discussed about how did u learn and what do u do aside this degree etc etc
Aayushi MAD1

She is very calm and supportive. If you are not able to answer then she will provide hints and help you. Just go through her previous questions and 90% questions will be the same

Questions remembered
  1. • Write a query for retriving students applications
  2. • Write a route and home.html which take a parameter name from a form and show it on a browser
  3. • Match render_template, url_for, redirect
  4. • why <name> is used in forms
  5. • Realtionships between modals like one to one and one to many
  6. • how is relationship one to one
  7. • Why we use <int:id> in route
  8. • Retreive student with help of primary key
Anuran Ghosh MAD1

Know your code, especially the models and backend thoroughly. She is really supportive, I fumbled lot of times but she helped me a lot. Gave me confidence as I was getting nervous. At the end even gave me a feedback and said to have self belief and confidence on myself, when I have done my work properly. Had a very inspiring conversation talking to her.

Questions remembered
  1. Ma'am is great and supportive. 1)Explain the outline of the project
  2. Explain models.py and the relationships.
  3. Write a query in Vscode by making viva.txt ( Was having confusion she corrected it)
  4. Code a route and html page to return a name input given by the user ( my idea was right but was fumbling, she helped alot )
  5. To match between render_template, redirect and url for
  6. About the secret key what it does why it's needed
  7. About actions in the html page 8)Why did I use <int> in the route 9)Explain the shortcuts in the models and code one shortcut accordingly 10)asked to explain the resume storing part.
  8. Asked what is _main_ and why is it needed.
Anjani MAD1

I don't about this AI percentage and all but be thorough with frontend also ,and logic and everything .

Questions remembered
  1. > Will you download the application from the website or do the check sum .
  2. > After downloading the application , told me to run the app . After this is done successfully .
  3. > mam said to explain the the application starting from the models.py .
  4. > While explaining the models mam asked me a question why is a particular relationship one to one and then how did you do that as one to one , (by adding uselist=False)
  5. > Then gave a coding question query the user table and then return the output I have answered it .
  6. > Then matching like url_for and render_template and then redirect she will give things like abc.html , /login , abc_func() so we need to map these to the particular urls .
  7. > Then mam gave a coding question which is big she that is creating a form with the select options and then return the output , this I fumbled , I wanted to be honest I didn't suddently remember the form method and how to create a dropdown I tensed also in the middle , for this question I said I have used AI for frontend . mam only helped and then she only guided to solve this problem and then .
  8. > Went thorough the app.py and asked some questions like what is the use of __main__ what happens if we remove this __main__ and run this in another file , and then
  9. > what is the use of secret key - this simply I told it prevents unauthorised people from accessing it and then
  10. > mam asked about why we use <int:user_id>
  11. > At last madam asked told that's it from my side , overall it was good and then you have answered some questions properly and then some not proper so I will review your performance . and then mam told me you should not say directly that you have used AI you say something like I have referred to it , so should I cut the marks for the front end , and then she told me to prepare for your future and then also she asked me are you doing this as a standalone degree or doing an internship , and then mam told me if it standalone then you should learn everything thoroughly I said I have other project also ,since mam was speaking I could n't interrupt her and then that's it
  12. I have answered most of the questions only in the frontend part I fumbled . Mam was friendly kind and then she guided whenever I fumbled
  13. >> this is not how exactly mam asked it but this I wrote in my own words .>>
Mithran MAD1

She asked more questions but all of them were basic questions mostly once I wasn't able to answer repeatedly, I would say he thorough in your basics in jinja and what some of the keywords mean.Very chill gives you time and even helps you find the answer so don't give up until the end and always try your best to answer.
At the end she'll even ask about your career goals and what you should work on . So overall best examiner

Questions remembered
  1. 1)what is request.args.get() //i fumbled this so hard , she literally explained it to me but i was in my denial phase, so this is the answer to the 8th question here
  2. write route in viva.txt to get username and display it dynamically(no database)
  3. what is ORM 4)a=[1,2,3,4,5] and print greater than 2 in jinja 5)flow of the viva.txt program
  4. query to enter a new user 7)how to retrieve the information in the url when get method is used 8)<int:userid>, why use that? And alternative ways to achieve the same result 9)what are actions //at this point I was cooked
  5. match the following render_template,login,url()
  6. difference between link and a tag
Sheet response MAD1

Shes a very nice person. Quite helpful. Saw that I'm nervous and assured me there is nothing to be nervous about. Also talked about future plans and placement and guided me on how i could leverage the projects in placements.

Questions remembered
  1. No demo direct question.
  2. Explain the basic structure of your project 3)Went through models files asked me to explain it then asked me specific questions like like what relationships are there in the model and how would u use backref to write a query to find the application without writing an explicit query.
  3. Asked me diff btw GET and POST and can we create data using get.
  4. Coding question- Make viva.txt file where u make route and a input form where the route takes the input from the form and shows it on the browser itself without an output file.
  5. What is the need for name atribute in the form.
  6. How does POST method get called- answer is the method= post in the form and then by clicking the submit button.
  7. What is the code to fetch argument from url. 9)Project Specific question like how and where is the resume stored.
  8. Why did u write <int:id> in the route and what will be the type of id in the subsequent function. 11)Why did i use blueprint class.
  9. Explain the processs of profile change of student.
  10. why did u write request.files.get for pdf and photo ( show both route and html)
  11. match the following with reason- redirect-/login, render_template-login.html url_for-user.login()
Hitesh MAD1

A very supportive proctor. I Enjoyed the viva completely and got very good remarks. Learn basic routing and html. Learn every bit of your code as they can ask from any part of the code. Be confident, learn basic theory and you will be fine.

Questions remembered
  1. Explain what files you have made and briefly explain about them.
  2. What are the relationships used in your model?
  3. How does backref works and write a code to fetch applications without using explicit query?(In a newly created viva.txt file)
  4. I had a Admin class, so told me to write codes to add data for a new admin in viva.txt.
  5. Diff between authentication and authorisation.
  6. Write a route for /home which will render a html file for a form to submit a name and that name will be displayed in the browser itself.
  7. How have u handled the resume storage ? Explain those block of codes.
  8. Routes like: '/delete/<int:id>', explain why u have used these.
  9. Have you used template inheritance? What is it?
  10. Allignment of 2 diff texts inside 2 different span tag and 2 Different paragraph tag.
  11. Write a code to fetch company by their id in viva.txt.
Ayush Gangwani MAD1

The proctor was very kind and helpful throughout the session.
Prepare your basics very well (especially Flask concepts, routes, models, and HTTP methods)
Be confident and calm during the viva
Practice writing small code snippets

Questions remembered
  1. 1. The proctor joined the session around 15 minutes late.
  2. 2. She first checked my ID card for verification.
  3. 3.Then she asked whether I wanted to perform checksum verification or download from the portal. I chose to download from the portal.
  4. 4.When I was about to run my app.py, she stopped me and asked to first show app.py and models.py.
  5. 5.She then asked questions about database relationships used in the project.
  6. 6.She gave a coding question: the database already has a User table with only a name field, and I had to explain how to add new data into it. She asked me to write the answer in a file named viva.txt.
  7. 7.Next, she asked: if there is a relationship between Student and Application, how will you fetch application data without writing an explicit query?
  8. 8.She asked me to explain the User model.
  9. 9.Then she asked me to explain the Register Student route, including how it works and the difference between GET and POST methods.
  10. 10.She asked: if the Submit button triggers GET instead of POST, then where will the data be visible?
  11. 11.Match the following question: redirect → /login, render_template → /login.html, url_for → login.
  12. 12.Another coding question (in viva.txt): write a route and HTML form where the user enters a name and on submit, the data is stored in the database.
  13. 13.She asked the difference between Authentication and Authorization.
  14. 14.At the end, she said my overall viva was good but I fumbled slightly in basic questions, so she would deduct some marks.
  15. She suggested improving the project by adding more technologies and making it portfolio-ready.
  16. She also asked about my field of interest.
  17. The total viva duration was around 35 minutes.
HM MAD1

She is very kind, just know the basics and you will be fine

Questions remembered
  1. project structure
  2. relationship between tables
  3. adding a username to the database(CRUD)
  4. updating the username using name not id
  5. creating a html form to take input username, and route to print that name and then run to see if it works
  6. authentication vs authorization
  7. block vs inline
  8. how is the post method triggered
  9. get post use
  10. command line arguments
  11. command used to get data
  12. importance of name in html
  13. defining one to one, many to one relationships
  14. url_for() and redirect method, what parameter goes with option
  15. endpoint of routes explanation
Sheet response MAD1

be confident , she is very sweet and helpful

Questions remembered
  1. VIVA - 2
  2. Explain brief structure of your project ( how did u implemented models , views , controllers ?
  3. what is DOM ?
  4. explain diff b/w url_for , redirect() , render_template ?
  5. what is orm and why u used db.model ?
  6. what is flask ?
  7. Explain term stateless w.r.t to http ?
  8. what is diff b/w inLine and Block ?
  9. (that's all i could remember )
  10. codes
  11. write a endpoint of doc_avail again
  12. write a loop in jinja with several condition
  13. write a code to perform crud operation in db
  14. [20-25 mins overall]
Heater (you know if you know) MAD1

Know how to present your code and how to write the codes like queries , route and all

Questions remembered
  1. Explain the relationships of models
  2. Write SQL query
  3. Write jinja loop
  4. Write a route
  5. CRUD - create new user and add
  6. Explain the check availability route
  7. In html page what is the name doing in input tag
  8. In html , in the form tag what will happen if i change the method from POST to GET
  9. What is command line
  10. Gave option for what will go in url_for() and redirect(). Option - /home , home.html , home
  11. What is DOM
  12. route for endpoint like /sum/a/b where i want sum of a and b
Sheet response MAD1

just be confident and know your basics for routes and jinja syntax

Questions remembered
  1. LEVEL 2 VIVA
  2. THEORY QNS -
  3. - explain project structure
  4. - open models.py and explain relationships
  5. - how have you defined 1:1, 1:N, N:M relationships in the code
  6. - how have you implemented add doctor logic, what is the data flow process
  7. - what are http methods
  8. - can you use put instead of post for a form? what will happen if you use put?
  9. - when is post method triggered?
  10. - what goes inside the parentheses in url_for() and redirect()? options - /login, login.html, user_login()
  11. - authentication vs authorization
  12. - what is version control?
  13. - what is the git command for creating new branch?
  14. CODE CHANGES -
  15. - write ORM query to add a new department to the department model
  16. - on admin dashboard it shows total no. of doctors, patients, appointments in a row - make it so it displays it one below another in a column
  17. - create a new file test.py and write a route /course/course_name. it should print "course is [course_name] on the screen. run and demonstrate it.
  18. - consider list a = [1,2,3]. write a jinja for loop to print elements in 'a' that are greater than 1
NA MAD1

Pretty helpful proctor, will guide you if you're get stuck. If you mess up your practical, be prepared to answer theory well.

Questions remembered
  1. Diff between block and inline
  2. Authorization, Authentication, Validation
  3. Write code to show how to commit user to db
  4. Git commit message
  5. What does local host mean?
  6. Create a HTML form to receive username and the corresponding python route to receive and print it.
  7. What is DOM? What does it actually do?
Sheet response MAD1

She is helpful and also give feedback

Questions remembered
  1. first tell me the project workflow (ex:-controller.py , models.py etc)
  2. asked me to open admin dashboard html page and asked what is 'name'
  3. tell me to run the app and create a booking spot
  4. authorization, authentication , validation
  5. block element, inline 6)a git command 7)code changes: - 1) db command to add a parking spot at 10 no spot
  6. told me to make cards of admin dashboard line by line as column as mine were in side by side like row
Alok Tripathi MAD1

Shared viva questions from response sheet: explain the project structure. what files and folders did you create; what happens in a route that handles both get and post method??; How is the post method triggered?

Questions remembered
  1. explain the project structure. what files and folders did you create
  2. what happens in a route that handles both get and post method??
  3. How is the post method triggered?
  4. What is RegisterForm and where is it defined?
  5. Have you used ORM, what is that??
  6. open you models, explain these classes and relationship b/w them..
  7. What is a foreign key?
  8. How do you add a new user to the database using sqlalchemy?
  9. Why did you use flask migrate??
  10. What are crud operations?
  11. Explain what happens step by step when a user registers.
  12. What is the difference b/w authentication, authorization and validation??
  13. How do you protect routes so only logged-in users can access them?
  14. In jinja how does accessing reservation.spot.lot.name work??
  15. What is `.parking-summary-card` and what does the `.` mean in CSS?
  16. What is display: flex used for?
  17. How can you make a section take only half of the page width?
  18. How would you add a hover effect on a button?
  19. What js did you use in your project?
  20. Open the code of chart.js and explain it.
  21. did you implement a search feature in your app?
  22. Can you open and explain the HTML form and route logic used for search?
  23. What are the different http methods??
  24. Can you submit a form using put or delete methods directly from a browser?
  25. What happens if you use method="GET" in a form?
  26. What is version control?
  27. What tool did you use for version control?
  28. What is DOM?
  29. What does git status show?

Approved viva sets

  1. 1
    - wht is "action' in html
    Times asked 1
    Official solution

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

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

    Example

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

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

  2. 2
    - coding ques similar to wht she's asking in the response sheet
    Times asked 1
    Official solution

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

  3. 3
    - explain login and register route
    Times asked 1
    Official solution

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

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

  4. 4
    and more around app.py only
    Times asked 1
    Official solution

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

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

    Example

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

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

Advice: she is really sweet and help u throughout. be confident and do your best !
  1. 1
    Features and about the folders
    Times asked 1
    Official solution

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

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

    Example

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

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

  2. 2
    Asked to create a viva.txt
    Times asked 1
    Official solution

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

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

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

  3. 3
    Then in that I was asked to code like there exists a user table and we get input from user and add that record in the table and print user added successfully
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  4. 4
    Jinja a list was given and from that the numbers greater than 3 has to be printed
    Times asked 1
    Official solution

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

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
  5. 5
    Some questions from the app.py why this line and all
    Times asked 1
    Official solution

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

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

    Example

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

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

Advice: She will give hints , I was blank and nervous so i messed up in some parts...overall it was good
  1. 1
    Create a route which takes staff id at endpoint, defination staff_login, render template to user.html, which show Staff name at first page, it shows Staff id, trek name, Trek id
    Times asked 1
    Official solution

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

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  2. 2
    Just prepare this and every line it ,, why this why thiss you write here every single line of this code.
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  3. 3
    And little theory DOM
    Times asked 1
    Official solution

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

  4. 4
    What happens if we submit a form with Get
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  5. 5
    What is debug=True
    Times asked 1
    Official solution

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

  6. 6
    She ask a lot of little things
    Times asked 1
    Official solution

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

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

    Example

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

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

  7. 7
    Very basics theory.
    Times asked 1
    Official solution

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

  8. 8
    Datatype of this variable
    Times asked 1
    Official solution

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

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

    Example

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

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

Advice: Good
  1. 1
    mad 1 level 2 proctor:131
    Times asked 1
    Official solution

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

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

  2. 2
    viva starts at 4:24 she came late
    Times asked 1
    Official solution

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

  3. 3
    and then she asks for id
    Times asked 1
    Official solution

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

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

    Example

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

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

  4. 4
    download from portal or run checksum i choose to download from portal
    Times asked 1
    Official solution

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

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

  5. 5
    then she said okay you have already given demo twice once in video and in level1
    Times asked 1
    Official solution

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

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

  6. 6
    we will start the main part i said okay sure sure
    Times asked 1
    Official solution

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

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

    Example

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

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

  7. 7
    then she asks me to make viva.txt and write a code
    Times asked 1
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  8. 8
    then she said are u sure i was like😨uhmmm hmm she help a little bit to correct the code
    Times asked 1
    Official solution

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

  9. 9
    the she asks okay tell me the folder and files structure in brief
    Times asked 1
    Official solution

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

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

    Example

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

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

  10. 10
    then some back to back ques
    Times asked 1
    Official solution

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

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

    Example

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

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

  11. 11
    port
    Times asked 1
    Official solution

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

  12. 12
    and 2 3 more
    Times asked 1
    Official solution

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

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

    Example

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

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

  13. 13
    then she was like okay move through your controllers i will stop u and ques u
    Times asked 1
    Official solution

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

  14. 14
    then she asks like 8 to 10 ques from that
    Times asked 1
    Official solution

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

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

    Example

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

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

  15. 15
    redicect
    Times asked 1
    Official solution

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

  16. 16
    which session
    Times asked 1
    Official solution

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

    Example

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

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

  17. 17
    which request
    Times asked 1
    Official solution

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

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

    Example

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

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

  18. 18
    if get then how will details show
    Times asked 1
    Official solution

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

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

    Example

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

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

  19. 19
    why some has int id and some has not
    Times asked 1
    Official solution

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

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

    Example

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

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

  20. 20
    then asked to write render redirect and url for
    Times asked 1
    Official solution

    Simpleredirect dusre URL pe bhejta hai. flash one-time message session mein rakh ke next page pe dikhata hai.

    Example

    flash('Login successful', 'success')
    return redirect(url_for('user.dashboard'))
Advice: at the end she was like that's all from my side i will evaluate based on your performance u give mostly right answers but the coding ques is 75% right only i was like 🥺 then she said why u seem so stressed i said i was bit nervous she said why u get confused and at last she said that's all if u have any ques ask u will se result once all the level 2 gets completed and wish me luck for my future overall very sweet proctor i enjoy giving viva .
  1. 1
    * Talk about the folder structure.
    Times asked 1
    Official solution

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

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

    Example

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

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

  2. 2
    * Talk about Models and Relationships
    Times asked 1
    Official solution

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

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  3. 3
    * What is the function of the "name" attribute in a form.
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  4. 4
    * Coding Question - creating a route to basically display user detail and the trek details of what they booked.
    Times asked 1
    Official solution

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

  5. 5
    * More on Forms - POST, GET
    Times asked 1
    Official solution

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

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  6. 6
    * How to get retrieve data from a search input (query parameter)
    Times asked 1
    Official solution

    SimpleQuery params URL ? ke baad: /search?q=mall. Flask: request.args.get('q').

    Example

    @app.route('/search')
    def search():
        q = request.args.get('q', '')
        return ...
  7. 7
    * Flask Login - current_user - why is it used or preferred
    Times asked 1
    Official solution

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

    Example

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

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

Advice: Amazing proctor, extremely kind. Know your written work (code and theory concepts) well.
  1. 1
    2.show id
    Times asked 1
    Official solution

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

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

  2. 2
    5.what is backref
    Times asked 1
    Official solution

    Simplebackref reverse attribute auto banata hai. back_populates dono sides explicitly naam dete ho — clearer.

    Example

    # backref
    spots = db.relationship('Spot', backref='lot')
    # spot.lot available
    
    # back_populates
    spots = db.relationship('Spot', back_populates='lot')
    # Spot.lot = db.relationship('Lot', back_populates='spots')
  3. 3
    6.what are the relationships between the models
    Times asked 1
    Official solution

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

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  4. 4
    7.what are orms
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  5. 5
    9.create a route which takes trek id of user from url as a part of endpoint , with defination name trek(), which renders trek.html which displays the booking id , username and status of booking related to that particular trek in the form of table
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
Advice: I think i might be missing 1 or 2 questions just know your code well and have basic knowledge of topics she is very nice she gave some hints during the coding question and asked me to drink water if i was feeling nervous Maam is chill if you are having issues writing code then she will also hint somethings. for coding questions just ask what files you are allowed to look at for help for me i asked if i could look at my models file and she said yeah sure just dont look at other files
  1. 1
    DOUBLE CLICK FOR FULL VIEW. LEVEL - 2
    Times asked 1
    Official solution

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

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

    Example

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

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

  2. 2
    There was no demo required. She asked me to show my ID and perform the checksum or download the project. I chose to download the project.
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  3. 3
    She asked me to explain the structure of my application.
    Times asked 1
    Official solution

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

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

  4. 4
    She asked me to write code to fetch a student from the Student table using ID.
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  5. 5
    She asked me to write code to fetch applications from a student (e.g., apps = student.applications).
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  6. 6
    She asked me to open register_student.html and explain why I used pattern="[a-zA-Z0-9_]+"
    Times asked 1
    Official solution

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

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

  7. 7
    She asked why I used minlength="6" and what type of validation it represents.
    Times asked 1
    Official solution

    SimpleValidation = input rules: required, email format, length, unique. Frontend UX, backend security — dono.

    Example

    if not email or '@' not in email:
        flash('Invalid email')
        return redirect(request.url)
    if User.query.filter_by(email=email).first():
        flash('Email taken')
  8. 8
    She asked what is enctype and what is this use for?
    Times asked 1
    Official solution

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

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

    Example

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

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

  9. 9
    She asked what would happen if we use the GET method to send data to the server.
    Times asked 1
    Official solution

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

  10. 10
    She asked how to extract data from query parameters in a URL.
    Times asked 1
    Official solution

    SimpleQuery params URL ? ke baad: /search?q=mall. Flask: request.args.get('q').

    Example

    @app.route('/search')
    def search():
        q = request.args.get('q', '')
        return ...
  11. 11
    After around 45 minutes, she said “This is all from my side.” Then she provided feedback and asked if I wanted to ask anything else. You should definitely ask for feedback on how you can improve your project or viva performance.
    Times asked 1
    Official solution

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

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

Advice: If you have not studied your project well, or you are looking for a proctor who asks fewer questions, then you are in trouble. If you have basic good understanding of MAD-1 theory and how it is applied in your project then she is one of the best proctors you can ever get. She is very interactive, points out your mistakes, and even guides you if you go wrong while writing code. Overall she has a very good vibe, you might want to interact more with her. If you don’t know something, do not try to act oversmart. Just admit that you don’t know. If you ask her the question back, she may explain it to you. Be confident, clear, and respectful while answering. You should have a strong understanding of app.py and models.py Be prepared to write routes along with HTML forms or tables. You should know basic frontend concepts. No need to go too deep into Bootstrap elements. Go through all the questions mentioned about her in this sheet, 80–90% of them are likely to repeat.
  1. 1
    show id & no demo, mam directly told i think u already done this stuff in viva 1, so we will proceed with your pro struc & asked to explain fronted backend database stuff & what i used, while u explain she may ask ques related to that thing like relationships etc, i told purpose of relationship, about orm etc, once she get a hint u know about that topic she may move on to next que, her voice was breaking & got disconnected but dont be panicked.
    Times asked 1
    Official solution

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

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  2. 2
    asked about http methods, use of name in form, what will happen if we try to submit method='GET'(ans - we get that value in url) & how will we retrieve it in backend(ans - request.args.get('name')), after i told its value will be in url then she asked me to write & show how the url will look like 💀.
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  3. 3
    Told to open app.py, then whats the use of secret_key, i imported migrate so asked about that module what it does, gave a situation suppose 2 users already exists & u used migrate & added 2 new columns using migrate then what will the prev 2 users value contain in new columns? (ans - NULL, ans are very simple so dont get panicked with length of que 😊), whats __name__='__main__', whats is session what is session.clear(), she asked to open route where student apply for apps, i opened apply route, she asked for creating apps u r using drive id & student id so i can see u r passing drive id so from where u r getting student id?(ans - from session), then after this she finally wrapped up.😊 Finally at end we had a small conversation about my career like what im interested in, r u doing this degree standalone, she also gave career advice coz i was nervous during viva, she was very friendly she may give hint if u r stuck somewhere & till now it was amazing experience during this viva. 😊
    Times asked 1
    Official solution

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

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

Advice: Just be calm & chill & give your best!! , Best Of Luck 😊👍
  1. 1
    Project code and folder overview
    Times asked 1
    Official solution

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

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

    Example

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

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

  2. 2
    That match the column question redirect render template and url_for()
    Times asked 1
    Official solution

    Simpleredirect dusre URL pe bhejta hai. flash one-time message session mein rakh ke next page pe dikhata hai.

    Example

    flash('Login successful', 'success')
    return redirect(url_for('user.dashboard'))
  3. 3
    And basic to moderate questions
    Times asked 1
    Official solution

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

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

    Example

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

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

Advice: She is calm not loud and guide you at the end of your viva...She made me wear my ear buds because of echo
  1. 1
    2)explain folder structure and importance of each line
    Times asked 1
    Official solution

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

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

  2. 2
    4)open app.py and show route of student applying for drive why <> why <int : > and then scroll down and why if name == _main_
    Times asked 1
    Official solution

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

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

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

  3. 3
    5) redirect rendertemplate and url_for difference
    Times asked 1
    Official solution

    Simpleredirect dusre URL pe bhejta hai. flash one-time message session mein rakh ke next page pe dikhata hai.

    Example

    flash('Login successful', 'success')
    return redirect(url_for('user.dashboard'))
  4. 4
    6)get and post method and them in action in our code
    Times asked 1
    Official solution

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

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  5. 5
    7)how did u handle resume
    Times asked 1
    Official solution

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

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

    Example

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

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

  6. 6
    8)how did u handle one student can apply for drive only once
    Times asked 1
    Official solution

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

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

  7. 7
    9)write a sql query for inserting values into table
    Times asked 1
    Official solution

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

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

    Example

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

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

  8. 8
    10)how did u get role into line xxx
    Times asked 1
    Official solution

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

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

    Example

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

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

  9. 9
    like she told to scroll app.py and then was randomly asking questions
    Times asked 1
    Official solution

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

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

    Example

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

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

  10. 10
    but if we struggle a bit she would help
    Times asked 1
    Official solution

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

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

    Example

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

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

  11. 11
    11)make a viva.txt write a html and app.py code where a form is shown / name is shown
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  12. 12
    and then if he submits name should be shown
    Times asked 1
    Official solution

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

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

    Example

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

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

  13. 13
    i wrote basic version and then with her guidance completed the code added jinja loops as her suggestion
    Times asked 1
    Official solution

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

    Example

    {% for u in users %}
      <tr><td>{{ loop.index }}</td><td>{{ u.email }}</td></tr>
    {% endfor %}
  14. 14
    12)asked about written code then
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  15. 15
    13)and then discussed about how did u learn and what do u do aside this degree etc etc
    Times asked 1
    Official solution

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

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

    Example

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

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

Advice: mam is too supportive and wherever you feel struck dont lie or jargon tell straight related to what u know related to that and then she would help by providing hints and then u need to explain then
  1. 1
    • Write a query for retriving students applications
    Times asked 1
    Official solution

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

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

    Example

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

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

  2. 2
    • Write a route and home.html which take a parameter name from a form and show it on a browser
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  3. 3
    • why <name> is used in forms
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  4. 4
    • Realtionships between modals like one to one and one to many
    Times asked 1
    Official solution

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

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

    Example

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

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

  5. 5
    • Retreive student with help of primary key
    Times asked 1
    Official solution

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

    Example

    id = db.Column(db.Integer, primary_key=True)
Advice: She is very calm and supportive. If you are not able to answer then she will provide hints and help you. Just go through her previous questions and 90% questions will be the same
  1. 1
    Ma'am is great and supportive. 1)Explain the outline of the project
    Times asked 1
    Official solution

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

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

  2. 2
    Write a query in Vscode by making viva.txt ( Was having confusion she corrected it)
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  3. 3
    Code a route and html page to return a name input given by the user ( my idea was right but was fumbling, she helped alot )
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  4. 4
    To match between render_template, redirect and url for
    Times asked 1
    Official solution

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

    Example

    return render_template('dashboard.html', user=user, lots=lots)
  5. 5
    About the secret key what it does why it's needed
    Times asked 1
    Official solution

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

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

    Example

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

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

  6. 6
    Asked what is _main_ and why is it needed.
    Times asked 1
    Official solution

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

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

Advice: Know your code, especially the models and backend thoroughly. She is really supportive, I fumbled lot of times but she helped me a lot. Gave me confidence as I was getting nervous. At the end even gave me a feedback and said to have self belief and confidence on myself, when I have done my work properly. Had a very inspiring conversation talking to her.
  1. 1
    > Will you download the application from the website or do the check sum .
    Times asked 1
    Official solution

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

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

    Example

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

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

  2. 2
    > After downloading the application , told me to run the app . After this is done successfully .
    Times asked 1
    Official solution

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

    Example

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    flask run
  3. 3
    > While explaining the models mam asked me a question why is a particular relationship one to one and then how did you do that as one to one , (by adding uselist=False)
    Times asked 1
    Official solution

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

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  4. 4
    > Then gave a coding question query the user table and then return the output I have answered it .
    Times asked 1
    Official solution

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

  5. 5
    > Then matching like url_for and render_template and then redirect she will give things like abc.html , /login , abc_func() so we need to map these to the particular urls .
    Times asked 1
    Official solution

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

    Example

    return render_template('dashboard.html', user=user, lots=lots)
  6. 6
    > Then mam gave a coding question which is big she that is creating a form with the select options and then return the output , this I fumbled , I wanted to be honest I didn't suddently remember the form method and how to create a dropdown I tensed also in the middle , for this question I said I have used AI for frontend . mam only helped and then she only guided to solve this problem and then .
    Times asked 1
    Official solution

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

  7. 7
    > Went thorough the app.py and asked some questions like what is the use of __main__ what happens if we remove this __main__ and run this in another file , and then
    Times asked 1
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  8. 8
    > what is the use of secret key - this simply I told it prevents unauthorised people from accessing it and then
    Times asked 1
    Official solution

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

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

    Example

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

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

  9. 9
    > mam asked about why we use <int:user_id>
    Times asked 1
    Official solution

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

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

    Example

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

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

  10. 10
    > At last madam asked told that's it from my side , overall it was good and then you have answered some questions properly and then some not proper so I will review your performance . and then mam told me you should not say directly that you have used AI you say something like I have referred to it , so should I cut the marks for the front end , and then she told me to prepare for your future and then also she asked me are you doing this as a standalone degree or doing an internship , and then mam told me if it standalone then you should learn everything thoroughly I said I have other project also ,since mam was speaking I could n't interrupt her and then that's it
    Times asked 1
    Official solution

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

  11. 11
    I have answered most of the questions only in the frontend part I fumbled . Mam was friendly kind and then she guided whenever I fumbled
    Times asked 1
    Official solution

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

  12. 12
    >> this is not how exactly mam asked it but this I wrote in my own words .>>
    Times asked 1
    Official solution

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

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

    Example

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

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

Advice: I don't about this AI percentage and all but be thorough with frontend also ,and logic and everything .
  1. 1
    1)what is request.args.get() //i fumbled this so hard , she literally explained it to me but i was in my denial phase, so this is the answer to the 8th question here
    Times asked 1
    Official solution

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

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

  2. 2
    write route in viva.txt to get username and display it dynamically(no database)
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  3. 3
    query to enter a new user 7)how to retrieve the information in the url when get method is used 8)<int:userid>, why use that? And alternative ways to achieve the same result 9)what are actions //at this point I was cooked
    Times asked 1
    Official solution

    SimpleState management (Vuex/Pinia): shared app state. Advantage: props drilling kam, auth/cart central.

  4. 4
    difference between link and a tag
    Times asked 1
    Official solution

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

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

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

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

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

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

Advice: She asked more questions but all of them were basic questions mostly once I wasn't able to answer repeatedly, I would say he thorough in your basics in jinja and what some of the keywords mean.Very chill gives you time and even helps you find the answer so don't give up until the end and always try your best to answer. At the end she'll even ask about your career goals and what you should work on . So overall best examiner
  1. 1
    No demo direct question.
    Times asked 1
    Official solution

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

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

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

  2. 2
    Asked me diff btw GET and POST and can we create data using get.
    Times asked 1
    Official solution

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

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  3. 3
    Coding question- Make viva.txt file where u make route and a input form where the route takes the input from the form and shows it on the browser itself without an output file.
    Times asked 1
    Official solution

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

  4. 4
    What is the need for name atribute in the form.
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  5. 5
    How does POST method get called- answer is the method= post in the form and then by clicking the submit button.
    Times asked 1
    Official solution

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

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  6. 6
    What is the code to fetch argument from url. 9)Project Specific question like how and where is the resume stored.
    Times asked 1
    Official solution

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

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

    Example

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

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

  7. 7
    Why did u write <int:id> in the route and what will be the type of id in the subsequent function. 11)Why did i use blueprint class.
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  8. 8
    Explain the processs of profile change of student.
    Times asked 1
    Official solution

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

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

  9. 9
    why did u write request.files.get for pdf and photo ( show both route and html)
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: Shes a very nice person. Quite helpful. Saw that I'm nervous and assured me there is nothing to be nervous about. Also talked about future plans and placement and guided me on how i could leverage the projects in placements.
  1. 1
    Explain what files you have made and briefly explain about them.
    Times asked 1
    Official solution

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

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

  2. 2
    What are the relationships used in your model?
    Times asked 1
    Official solution

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

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  3. 3
    How does backref works and write a code to fetch applications without using explicit query?(In a newly created viva.txt file)
    Times asked 1
    Official solution

    Simplebackref reverse attribute auto banata hai. back_populates dono sides explicitly naam dete ho — clearer.

    Example

    # backref
    spots = db.relationship('Spot', backref='lot')
    # spot.lot available
    
    # back_populates
    spots = db.relationship('Spot', back_populates='lot')
    # Spot.lot = db.relationship('Lot', back_populates='spots')
  4. 4
    Diff between authentication and authorisation.
    Times asked 1
    Official solution

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

    Example

    # auth
    if check_password_hash(user.password, pwd):
        session['user_id'] = user.id
    
    # authz
    if user.role != 'admin':
        abort(403)
  5. 5
    Write a route for /home which will render a html file for a form to submit a name and that name will be displayed in the browser itself.
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  6. 6
    Routes like: '/delete/<int:id>', explain why u have used these.
    Times asked 1
    Official solution

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

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

  7. 7
    Allignment of 2 diff texts inside 2 different span tag and 2 Different paragraph tag.
    Times asked 1
    Official solution

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

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

  8. 8
    Write a code to fetch company by their id in viva.txt.
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: A very supportive proctor. I Enjoyed the viva completely and got very good remarks. Learn basic routing and html. Learn every bit of your code as they can ask from any part of the code. Be confident, learn basic theory and you will be fine.
  1. 1
    1. The proctor joined the session around 15 minutes late.
    Times asked 1
    Official solution

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

    Example

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

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

  2. 2
    2. She first checked my ID card for verification.
    Times asked 1
    Official solution

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

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

  3. 3
    3.Then she asked whether I wanted to perform checksum verification or download from the portal. I chose to download from the portal.
    Times asked 1
    Official solution

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

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

  4. 4
    4.When I was about to run my app.py, she stopped me and asked to first show app.py and models.py.
    Times asked 1
    Official solution

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

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

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  5. 5
    5.She then asked questions about database relationships used in the project.
    Times asked 1
    Official solution

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

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  6. 6
    6.She gave a coding question: the database already has a User table with only a name field, and I had to explain how to add new data into it. She asked me to write the answer in a file named viva.txt.
    Times asked 1
    Official solution

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

  7. 7
    7.Next, she asked: if there is a relationship between Student and Application, how will you fetch application data without writing an explicit query?
    Times asked 1
    Official solution

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

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  8. 8
    8.She asked me to explain the User model.
    Times asked 1
    Official solution

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

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

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  9. 9
    10.She asked: if the Submit button triggers GET instead of POST, then where will the data be visible?
    Times asked 1
    Official solution

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

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  10. 10
    11.Match the following question: redirect → /login, render_template → /login.html, url_for → login.
    Times asked 1
    Official solution

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

    Example

    return render_template('dashboard.html', user=user, lots=lots)
  11. 11
    12.Another coding question (in viva.txt): write a route and HTML form where the user enters a name and on submit, the data is stored in the database.
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  12. 12
    14.At the end, she said my overall viva was good but I fumbled slightly in basic questions, so she would deduct some marks.
    Times asked 1
    Official solution

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

  13. 13
    She suggested improving the project by adding more technologies and making it portfolio-ready.
    Times asked 1
    Official solution

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

  14. 14
    She also asked about my field of interest.
    Times asked 1
    Official solution

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

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

    Example

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

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

  15. 15
    The total viva duration was around 35 minutes.
    Times asked 1
    Official solution

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

Advice: The proctor was very kind and helpful throughout the session. Prepare your basics very well (especially Flask concepts, routes, models, and HTTP methods) Be confident and calm during the viva Practice writing small code snippets
  1. 1
    relationship between tables
    Times asked 2
    Official solution

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

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  2. 2
    adding a username to the database(CRUD)
    Times asked 1
    Official solution

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

  3. 3
    updating the username using name not id
    Times asked 1
    Official solution

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

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

    Example

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

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

  4. 4
    creating a html form to take input username, and route to print that name and then run to see if it works
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  5. 5
    block vs inline
    Times asked 1
    Official solution

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

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

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

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

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

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

  6. 6
    get post use
    Times asked 1
    Official solution

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

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  7. 7
    command line arguments
    Times asked 1
    Official solution

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

  8. 8
    command used to get data
    Times asked 1
    Official solution

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

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

    Example

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

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

  9. 9
    importance of name in html
    Times asked 1
    Official solution

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

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

    Example

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

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

  10. 10
    defining one to one, many to one relationships
    Times asked 1
    Official solution

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

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  11. 11
    url_for() and redirect method, what parameter goes with option
    Times asked 1
    Official solution

    Simpleredirect dusre URL pe bhejta hai. flash one-time message session mein rakh ke next page pe dikhata hai.

    Example

    flash('Login successful', 'success')
    return redirect(url_for('user.dashboard'))
  12. 12
    endpoint of routes explanation
    Times asked 1
    Official solution

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

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

    Example

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

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

Advice: She is very kind, just know the basics and you will be fine
  1. 1
    Explain term stateless w.r.t to http ?
    Times asked 1
    Official solution

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

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

  2. 2
    what is diff b/w inLine and Block ?
    Times asked 1
    Official solution

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

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

    Example

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

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

  3. 3
    (that's all i could remember )
    Times asked 1
    Official solution

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

  4. 4
    codes
    Times asked 1
    Official solution

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

  5. 5
    write a endpoint of doc_avail again
    Times asked 1
    Official solution

    SimpleNaya Flask route: URL, method, auth if needed, query, jsonify. Postman pehle.

    Examiner number/filter change easy rakhna. CORS. Frontend tabhi jab bole.

    Status codes sahi. Password JSON mein nahi.

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

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

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

    Example

    @app.route('/api/sum', methods=['POST'])
    def sum_num():
        d = request.get_json()
        return jsonify(result=d['a'] + d['b'])

    Project example: resources.py new Resource. Test Thunder. Optional Vue fetch.

  6. 6
    write a code to perform crud operation in db
    Times asked 1
    Official solution

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

  7. 7
    [20-25 mins overall]
    Times asked 1
    Official solution

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

Advice: be confident , she is very sweet and helpful
  1. 1
    CRUD - create new user and add
    Times asked 1
    Official solution

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

  2. 2
    Explain the check availability route
    Times asked 1
    Official solution

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

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

  3. 3
    In html page what is the name doing in input tag
    Times asked 1
    Official solution

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

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

    Example

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

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

  4. 4
    In html , in the form tag what will happen if i change the method from POST to GET
    Times asked 1
    Official solution

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

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  5. 5
    What is command line
    Times asked 1
    Official solution

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

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

    Example

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

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

  6. 6
    Gave option for what will go in url_for() and redirect(). Option - /home , home.html , home
    Times asked 1
    Official solution

    Simpleredirect dusre URL pe bhejta hai. flash one-time message session mein rakh ke next page pe dikhata hai.

    Example

    flash('Login successful', 'success')
    return redirect(url_for('user.dashboard'))
  7. 7
    route for endpoint like /sum/a/b where i want sum of a and b
    Times asked 1
    Official solution

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

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

    Example

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

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

Advice: Know how to present your code and how to write the codes like queries , route and all
  1. 1
    LEVEL 2 VIVA
    Times asked 3
    Official solution

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

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

  2. 2
    THEORY QNS -
    Times asked 1
    Official solution

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

  3. 3
    - how have you defined 1:1, 1:N, N:M relationships in the code
    Times asked 1
    Official solution

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

    Example

    spots = db.relationship('Spot', backref='lot', cascade='all, delete-orphan')
  4. 4
    - how have you implemented add doctor logic, what is the data flow process
    Times asked 1
    Official solution

    SimpleNayi booking flow: UI form/button → route POST → login_required → validate seats → insert Booking → commit → redirect/flash.

    Suggested flowBrowser → Flask route → Auth → Business rules → SQLAlchemy → SQLite → Response template/JSON

  5. 5
    - can you use put instead of post for a form? what will happen if you use put?
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  6. 6
    - what goes inside the parentheses in url_for() and redirect()? options - /login, login.html, user_login()
    Times asked 1
    Official solution

    Simpleredirect dusre URL pe bhejta hai. flash one-time message session mein rakh ke next page pe dikhata hai.

    Example

    flash('Login successful', 'success')
    return redirect(url_for('user.dashboard'))
  7. 7
    - what is the git command for creating new branch?
    Times asked 1
    Official solution

    SimpleGit files ki history rakhta hai. GitHub remote + collaborator viva check.

    git status — kya change/untracked
    git checkout -b viva-fix ya git switch -c viva-fix — nayi branch
    git rm --cached notes.txt — track band, file disk pe rahe (.gitignore)
    git log — commits (examiner poochta hai)
    Collaborator: repo → Settings → Collaborators. MAD-1 instructor add karna mandatory hota hai.

  8. 8
    - write ORM query to add a new department to the department model
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  9. 9
    - on admin dashboard it shows total no. of doctors, patients, appointments in a row - make it so it displays it one below another in a column
    Times asked 1
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

  10. 10
    - create a new file test.py and write a route /course/course_name. it should print "course is [course_name] on the screen. run and demonstrate it.
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: just be confident and know your basics for routes and jinja syntax
  1. 1
    Write code to show how to commit user to db
    Times asked 1
    Official solution

    Simplecommit changes save. rollback fail pe undo. Transaction consistency ke liye.

    Example

    try:
        db.session.add(obj)
        db.session.commit()
    except Exception:
        db.session.rollback()
        raise
  2. 2
    Git commit message
    Times asked 1
    Official solution

    Simplecommit changes save. rollback fail pe undo. Transaction consistency ke liye.

    Example

    try:
        db.session.add(obj)
        db.session.commit()
    except Exception:
        db.session.rollback()
        raise
  3. 3
    What does local host mean?
    Times asked 1
    Official solution

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

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

    Example

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

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

  4. 4
    Create a HTML form to receive username and the corresponding python route to receive and print it.
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  5. 5
    What is DOM? What does it actually do?
    Times asked 1
    Official solution

    SimpleDOM HTML tree. JS nodes change. Vue Virtual DOM ke through, direct kam.

    Manipulation innerHTML vs Vue data. Remove CSS class = rules gone layout may collapse.

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

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

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

    Project example: Inspect Elements. Vue devtools.

Advice: Pretty helpful proctor, will guide you if you're get stuck. If you mess up your practical, be prepared to answer theory well.
  1. 1
    first tell me the project workflow (ex:-controller.py , models.py etc)
    Times asked 1
    Official solution

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

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

    Example

    class Lot(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        name = db.Column(db.String(80), nullable=False)
        spots = db.relationship('Spot', backref='lot', lazy=True)
  2. 2
    asked me to open admin dashboard html page and asked what is 'name'
    Times asked 1
    Official solution

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

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

    Example

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

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

  3. 3
    tell me to run the app and create a booking spot
    Times asked 1
    Official solution

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

    Example

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    flask run
  4. 4
    block element, inline 6)a git command 7)code changes: - 1) db command to add a parking spot at 10 no spot
    Times asked 1
    Official solution

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

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  5. 5
    told me to make cards of admin dashboard line by line as column as mine were in side by side like row
    Times asked 1
    Official solution

    SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.

    Example

    /* button red */
    .btn-primary { background: red; }
    
    /* center navbar item */
    .navbar { justify-content: center; }

    Viva tipDevTools se pehle try, phir file mein permanent change.

Advice: She is helpful and also give feedback
  1. 1
    explain the project structure. what files and folders did you create
    Times asked 1
    Official solution

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

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  2. 2
    what happens in a route that handles both get and post method??
    Times asked 1
    Official solution

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

    Example

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'POST':
            # validate + session
            ...
        return render_template('login.html')
  3. 3
    What is a foreign key?
    Times asked 3
    Official solution

    SimpleForeign key dusri table ke PK ko point karti hai — relationship banati hai.

    Example

    lot_id = db.Column(db.Integer, db.ForeignKey('lot.id'), nullable=False)
  4. 4
    How do you add a new user to the database using sqlalchemy?
    Times asked 1
    Official solution

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

    Example

    user = User(email='a@b.com')
    db.session.add(user)
    db.session.commit()
    users = User.query.filter_by(role='admin').all()
  5. 5
    What are crud operations?
    Times asked 1
    Official solution

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

  6. 6
    Explain what happens step by step when a user registers.
    Times asked 1
    Official solution

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

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

  7. 7
    In jinja how does accessing reservation.spot.lot.name work??
    Times asked 1
    Official solution

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

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
  8. 8
    What is `.parking-summary-card` and what does the `.` mean in CSS?
    Times asked 1
    Official solution

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

    Viva tip1 minute elevator pitch ready rakho, phir demo.

  9. 9
    How can you make a section take only half of the page width?
    Times asked 1
    Official solution

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

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

  10. 10
    What js did you use in your project?
    Times asked 1
    Official solution

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

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

    Example

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

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

  11. 11
    Open the code of chart.js and explain it.
    Times asked 1
    Official solution

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

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

  12. 12
    did you implement a search feature in your app?
    Times asked 1
    Official solution

    SimpleSearch: form/query param → ilike filter → results template.

    Example

    q = request.args.get('q', '').strip()
    lots = Lot.query.filter(Lot.name.ilike(f'%{q}%')).all()
  13. 13
    Can you open and explain the HTML form and route logic used for search?
    Times asked 1
    Official solution

    SimpleSearch: form/query param → ilike filter → results template.

    Example

    q = request.args.get('q', '').strip()
    lots = Lot.query.filter(Lot.name.ilike(f'%{q}%')).all()
  14. 14
    What are the different http methods??
    Times asked 1
    Official solution

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

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

    GET exists bina REST ke bhi — browser address bar.

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

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

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

    Example

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

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

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

  15. 15
    Can you submit a form using put or delete methods directly from a browser?
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  16. 16
    What happens if you use method="GET" in a form?
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  1. 1
    Show your College ID.
    Times asked 16
    Official solution

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

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

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

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

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

  3. 3
    Explain the complete project/folder structure.
    Times asked 1
    Official solution

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

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

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

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

  4. 4
    Explain the purpose of every file and how they are connected.
    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.

  5. 5
    Explain current_app.
    Times asked 1
    Official solution

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

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

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

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

  6. 6
    What is ORM?
    Times asked 49
    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.

  7. 7
    Have you used ORM? Why?
    Times asked 1
    Official solution

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

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

    Example model

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

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

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

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

  8. 8
    Explain the frontend, backend, and database architecture.
    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.

  9. 9
    Explain the complete workflow when a user registers.
    Times asked 1
    Official solution

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

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

    Example

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

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

  10. 10
    Explain the complete data flow for a feature (e.g., Add Doctor, Apply for Drive, Profile Update).
    Times asked 1
    Official solution

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

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

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

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

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

  13. 13
    Explain a specific route chosen by the proctor.
    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.

  14. 14
    Explain how a route with both GET and POST methods works.
    Times asked 1
    Official solution

    SimpleGET data mangta hai (read), POST data bhejta hai (create/submit).

    GETURL mein dikhta hai, bookmark ho sakta hai, browser back/refresh safe hai, data URL query mein jaata hai. Search, page open, login form dikhana.

    POSTbody mein data jaata hai, URL mein password nahi dikhta, refresh pe dubara submit ho sakta hai. Login, register, form save.

    Example

    # page dikhana

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'GET':
            return render_template('login.html')
        # POST: form submit
        email = request.form.get('email')
        ...

    GET se theoretically data bhej sakte ho (?q=flask), lekin create/update ke liye nahi use karna — data log/history mein save ho jaata hai, length limit hoti hai.
    HTML form default GET hota hai; method='POST' likhna zaroori hai login/register pe.

  15. 15
    Explain endpoint routes such as '/delete/<int:id>'.
    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.

  16. 16
    Explain @app.template_filter.
    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 }}.

  17. 17
    Explain context_processor.
    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.

  18. 18
    Explain app_context.
    Times asked 1
    Official solution

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

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

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

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

  19. 19
    Explain all model relationships.
    Times asked 1
    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).

  20. 20
    Explain One-to-One, One-to-Many, and Many-to-Many relationships.
    Times asked 1
    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).

  21. 21
    Explain backref.
    Times asked 5
    Official solution

    Simplebackref relationship ki reverse side automatically bana deta hai.

    class Post(db.Model):
        user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
        user = db.relationship('User', backref='posts')

    Ab post.user milta hai, aur user.posts bhi — Post model pe sirf ek line.
    secondary Many-to-Many junction table ke liye: relationship(..., secondary=likes_table, backref='liked_by').
    Explicit chahiye to back_populates use karo.

  22. 22
    Explain nullable.
    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.

  23. 23
    Explain Foreign Key.
    Times asked 3
    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.

  24. 24
    Explain Secondary (Junction) Tables.
    Times asked 1
    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).

  25. 25
    How do you add a new record using SQLAlchemy ORM?
    Times asked 1
    Official solution

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

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

    Example model

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

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

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

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

  26. 26
    Write an ORM query to insert a new record.
    Times asked 1
    Official solution

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

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

    Example model

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

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

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

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

  27. 27
    Update a record using a field other than the primary key.
    Times asked 1
    Official solution

    SimplePrimary Key har row ko uniquely identify karti hai. Unique Key bhi unique hoti hai lekin table ki main ID nahi.

    id = db.Column(db.Integer, primary_key=True)  # auto increment
    email = db.Column(db.String(120), unique=True)

    PK: NOT NULL, ek (ya composite). Index automatically.
    Record fetch: User.query.get(id) PK se tez.
    FK hamesha unique nahi — Many side pe repeat hoti hai. Unique FK = One-to-One.

  28. 28
    Fetch a record using its Primary Key.
    Times asked 1
    Official solution

    SimplePrimary Key har row ko uniquely identify karti hai. Unique Key bhi unique hoti hai lekin table ki main ID nahi.

    id = db.Column(db.Integer, primary_key=True)  # auto increment
    email = db.Column(db.String(120), unique=True)

    PK: NOT NULL, ek (ya composite). Index automatically.
    Record fetch: User.query.get(id) PK se tez.
    FK hamesha unique nahi — Many side pe repeat hoti hai. Unique FK = One-to-One.

  29. 29
    Fetch related data using relationships (without writing an explicit SQL query).
    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 }}.

  30. 30
    Write a SQL query to insert data.
    Times asked 1
    Official solution

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

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

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

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

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

  31. 31
    What is RegisterForm? Where is it defined?
    Times asked 1
    Official solution

    SimpleUserMixin Flask-Login ko batata hai user object kaise treat karna hai (is_authenticated, get_id).

    class User(db.Model, UserMixin):
        id = db.Column(db.Integer, primary_key=True)

    current_user proxy logged-in user. Initialize: login_user(user) / user_loader callback.
    Flask-WTF: Python classes se forms, CSRF, validators. RegisterForm forms.py mein.
    fs_uniquifier Flask-Security mein token/session identity — email change pe sessions invalidate.
    enctype='multipart/form-data' file upload pe zaroori. request.files.get('resume').

  32. 32
    What is Flask-Migrate? Why did you use it?
    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.
  33. 33
    Why is SQLALCHEMY_TRACK_MODIFICATIONS=False used?
    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.

  34. 34
    Explain debug=True.
    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.

  35. 35
    Explain if __name__ == "__main__".
    Times asked 1
    Official solution

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

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

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

  36. 36
    Explain url_for().
    Times asked 2
    Official solution

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

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

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

  37. 37
    Explain redirect().
    Times asked 2
    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.

  38. 38
    Explain render_template().
    Times asked 1
    Official solution

    Simplerender_template HTML file ko Jinja se process karke browser ko bhejta hai. Backend data ko frontend se jodta hai.

    return render_template('dashboard.html', user=user, treks=treks)

    File templates/dashboard.html honi chahiye.
    Keyword arguments template mein variables ban jaate hain: {{ user.name }}.
    Route kuch return na kare to Flask error. Boolean return typical HTML view ke liye nahi — string/Response chahiye.

  39. 39
    Match: redirect() → route render_template() → HTML template url_for() → endpoint/function name
    Times asked 1
    Official solution

    Simplerender_template HTML page bana ke turant dikhata hai, redirect user ko doosre URL pe bhej deta hai.

    render_template('home.html', user=user) → server template fill karke 200 response deta hai. URL same rehta hai.
    redirect(url_for('dashboard')) → 302 response, browser naya GET karta hai. URL change ho jaata hai.

    Examplelogin POST successful hone ke baad render_template mat use karo, warna refresh pe form dubara submit ho jaayega.

    Sahi tarika: redirect(url_for('dashboard')) — yeh Post-Redirect-Get pattern hai.

    render_template tab: page dikhana hai with data.
    redirect tab: kaam ho gaya, ab doosre page pe le jaana hai (login, delete, update ke baad).


    Simpleurl_for URL nikalta hai, render_template HTML page return karta hai. Dono alag kaam.

    url_for('login') → '/login'
    render_template('login.html') → login page ka HTML
    
    Templates mein link ke liye: <a href="{{ url_for('dashboard') }}">Dashboard</a>
    Route mein page dikhane ke liye: return render_template('dashboard.html', user=user)

    url_for endpoint/function name leta hai, render_template HTML file name leta hai.

  40. 40
    What parameter should be passed to url_for()?
    Times asked 1
    Official solution

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

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

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

  41. 41
    Why do some routes use <int:id> while others don't?
    Times asked 1
    Official solution

    Simple<int:id> URL se integer nikalta hai. Alternatives: query string, POST form, slug string.

    @app.route('/user/<int:id>')  # /user/5
    @app.route('/user/<string:name>')

    request.args.get('id') # /user?id=5
    request.form.get('id') # hidden field
    int converter galat 'abc' pe 404 — yeh protection hai.

  42. 42
    Alternative ways to pass data besides <int:id>.
    Times asked 1
    Official solution

    Simple<int:id> URL se integer nikalta hai. Alternatives: query string, POST form, slug string.

    @app.route('/user/<int:id>')  # /user/5
    @app.route('/user/<string:name>')

    request.args.get('id') # /user?id=5
    request.form.get('id') # hidden field
    int converter galat 'abc' pe 404 — yeh protection hai.

  43. 43
    Explain all HTTP methods.
    Times asked 2
    Official solution

    SimpleHTTP methods batate hain request kya karna chahti hai. Common: GET POST PUT PATCH DELETE.

    GETread/fetch. Safe, URL se. Page kholna, search.

    POSTcreate/submit. Form, login.

    PUTpoora replace/update. Idempotent.

    PATCHpartial update.

    DELETEhataana.

    HEAD: sirf headers. OPTIONS: CORS preflight.

    Flask: @app.route('/x', methods=['GET','POST'])
    Agar methods na likho to default sirf GET.
    HTML form native sirf GET/POST. PUT/DELETE JS/fetch ya hidden _method se.
    GET se data fetch ho sakta hai, create nahi karna chahiye. POST se theoretically fetch ho sakta hai lekin cache/semantics galat.
    DELETE fetch ke liye nahi. GET POST ka kaam officially nahi karta — side effects GET pe mat rakho.

  44. 44
    Difference between GET and POST.
    Times asked 7
    Official solution

    SimpleGET data mangta hai (read), POST data bhejta hai (create/submit).

    GETURL mein dikhta hai, bookmark ho sakta hai, browser back/refresh safe hai, data URL query mein jaata hai. Search, page open, login form dikhana.

    POSTbody mein data jaata hai, URL mein password nahi dikhta, refresh pe dubara submit ho sakta hai. Login, register, form save.

    Example

    # page dikhana

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'GET':
            return render_template('login.html')
        # POST: form submit
        email = request.form.get('email')
        ...

    GET se theoretically data bhej sakte ho (?q=flask), lekin create/update ke liye nahi use karna — data log/history mein save ho jaata hai, length limit hoti hai.
    HTML form default GET hota hai; method='POST' likhna zaroori hai login/register pe.

  45. 45
    Can a form be submitted using PUT or DELETE?
    Times asked 1
    Official solution

    SimpleHTTP methods batate hain request kya karna chahti hai. Common: GET POST PUT PATCH DELETE.

    GETread/fetch. Safe, URL se. Page kholna, search.

    POSTcreate/submit. Form, login.

    PUTpoora replace/update. Idempotent.

    PATCHpartial update.

    DELETEhataana.

    HEAD: sirf headers. OPTIONS: CORS preflight.

    Flask: @app.route('/x', methods=['GET','POST'])
    Agar methods na likho to default sirf GET.
    HTML form native sirf GET/POST. PUT/DELETE JS/fetch ya hidden _method se.
    GET se data fetch ho sakta hai, create nahi karna chahiye. POST se theoretically fetch ho sakta hai lekin cache/semantics galat.
    DELETE fetch ke liye nahi. GET POST ka kaam officially nahi karta — side effects GET pe mat rakho.

  46. 46
    What happens if a form uses the GET method?
    Times asked 1
    Official solution

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

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

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

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

  47. 47
    How is the POST method triggered?
    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.

  48. 48
    Can GET be used to create data?
    Times asked 1
    Official solution

    SimpleGET data mangta hai (read), POST data bhejta hai (create/submit).

    GETURL mein dikhta hai, bookmark ho sakta hai, browser back/refresh safe hai, data URL query mein jaata hai. Search, page open, login form dikhana.

    POSTbody mein data jaata hai, URL mein password nahi dikhta, refresh pe dubara submit ho sakta hai. Login, register, form save.

    Example

    # page dikhana

    @app.route('/login', methods=['GET', 'POST'])
    def login():
        if request.method == 'GET':
            return render_template('login.html')
        # POST: form submit
        email = request.form.get('email')
        ...

    GET se theoretically data bhej sakte ho (?q=flask), lekin create/update ke liye nahi use karna — data log/history mein save ho jaata hai, length limit hoti hai.
    HTML form default GET hota hai; method='POST' likhna zaroori hai login/register pe.

  49. 49
    How do you retrieve query parameters?
    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 }}.

  50. 50
    Explain request.args.get().
    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.

  51. 51
    Explain form action.
    Times asked 1
    Official solution

    SimpleForm user input server ko bhejti hai. Table rows/columns dikhati hai.

    <form action="{{ url_for('register') }}" method='POST' enctype='multipart/form-data'>
      <input name='email' required>
      <button type='submit'>Go</button>
    </form>

    name attribute server pe key ban'ti hai: request.form['email']. id JS/CSS, value default/dikhta hua text.
    action URL. method GET/POST. enctype file upload pe multipart.
    required frontend empty submit rokta hai (backend phir bhi check).

    <table><thead><tr><th>Name</th></tr></thead><tbody><tr><td>{{ u.name }}</td></tr></tbody></table>

    th header, td data, tr row. Nested table: td ke andar table (avoid, messy).
    method hataoge to GET, password URL mein — buri baat.

  52. 52
    Explain enctype.
    Times asked 1
    Official solution

    SimpleForm user input server ko bhejti hai. Table rows/columns dikhati hai.

    <form action="{{ url_for('register') }}" method='POST' enctype='multipart/form-data'>
      <input name='email' required>
      <button type='submit'>Go</button>
    </form>

    name attribute server pe key ban'ti hai: request.form['email']. id JS/CSS, value default/dikhta hua text.
    action URL. method GET/POST. enctype file upload pe multipart.
    required frontend empty submit rokta hai (backend phir bhi check).

    <table><thead><tr><th>Name</th></tr></thead><tbody><tr><td>{{ u.name }}</td></tr></tbody></table>

    th header, td data, tr row. Nested table: td ke andar table (avoid, messy).
    method hataoge to GET, password URL mein — buri baat.

  53. 53
    Difference between Authentication, Authorization, and Validation.
    Times asked 1
    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+).

  54. 54
    How do you protect routes so only logged-in users can access them?
    Times asked 1
    Official solution

    Simple@login_required / custom decorator check karta hai session mein user hai ya nahi, nahi to login pe bhejta hai.

    def login_required(f):
        @wraps(f)
        def wrapper(*a, **k):
            if 'user_id' not in session:
                return redirect(url_for('login'))
            return f(*a, **k)
        return wrapper
    
    @app.before_request se bhi global check ho sakta hai.

    Decorator order: pehle @app.route, uske neeche @login_required generally. Swap karoge to kabhi route register galat ho sakta hai — Flask-Login docs follow karo.
    Role decorator @role_required('admin') authorization ke liye. Order matter karta hai: pehle auth, phir role.

  55. 55
    What type of validation is pattern?
    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.

  56. 56
    Explain minlength 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.

  57. 57
    What is Template Inheritance?
    Times asked 10
    Official solution

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

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

    base.html:

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

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

  58. 58
    Explain Jinja object access (e.g., reservation.spot.lot.name).
    Times asked 1
    Official solution

    SimpleJinja2 Flask ka template engine hai. HTML ke andar Python-jaisa data print/loop/if kar sakte ho.

    Bina Jinja har user ke liye alag HTML file. Jinja se ek template + data.

    {{ user.name }} print, {% for x in items %} loop, {% if %} condition, {% extends %} layout.

    Example routereturn render_template('dash.html', treks=treks)

    dash.html: {% for t in treks %}<li>{{ t.name }}</li>{% endfor %}

    HTML files templates/ folder mein isliye kyunki Flask default wahan dhundhta hai. render_template Jinja ko run karta hai.
    Boolean Jinja handle karta hai: {% if user.is_admin %}.

  59. 59
    Write a Jinja for loop.
    Times asked 9
    Official solution

    Simple Jinja loop + if — examiner notepad mein likhwaata hai:

    {% for t in treks %}
      <p>{{ t.name }} — {{ t.location }}</p>
    {% else %}
      <p>No treks</p>
    {% endfor %}
    
    {% if user.role == 'admin' %}
      <button>Delete</button>
    {% endif %}

    List filter: {% if x > 10 %}{{ x }}{% endif %}
    Length: {{ items|length }} Upper: {{ name|upper }}
    Table: loop ke andar <tr><td>

  60. 60
    Explain the name attribute in HTML forms.
    Times asked 1
    Official solution

    SimpleForm user input server ko bhejti hai. Table rows/columns dikhati hai.

    <form action="{{ url_for('register') }}" method='POST' enctype='multipart/form-data'>
      <input name='email' required>
      <button type='submit'>Go</button>
    </form>

    name attribute server pe key ban'ti hai: request.form['email']. id JS/CSS, value default/dikhta hua text.
    action URL. method GET/POST. enctype file upload pe multipart.
    required frontend empty submit rokta hai (backend phir bhi check).

    <table><thead><tr><th>Name</th></tr></thead><tbody><tr><td>{{ u.name }}</td></tr></tbody></table>

    th header, td data, tr row. Nested table: td ke andar table (avoid, messy).
    method hataoge to GET, password URL mein — buri baat.

  61. 61
    Difference between block and inline elements.
    Times asked 1
    Official solution

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

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

    Example

    <div>Hello</div><div>World</div> do lines. <span>Hello</span> <span>World</span> ek line.
  62. 62
    Difference between <tr>, <td>, and <th>.
    Times asked 1
    Official solution

    SimpleForm user input server ko bhejti hai. Table rows/columns dikhati hai.

    <form action="{{ url_for('register') }}" method='POST' enctype='multipart/form-data'>
      <input name='email' required>
      <button type='submit'>Go</button>
    </form>

    name attribute server pe key ban'ti hai: request.form['email']. id JS/CSS, value default/dikhta hua text.
    action URL. method GET/POST. enctype file upload pe multipart.
    required frontend empty submit rokta hai (backend phir bhi check).

    <table><thead><tr><th>Name</th></tr></thead><tbody><tr><td>{{ u.name }}</td></tr></tbody></table>

    th header, td data, tr row. Nested table: td ke andar table (avoid, messy).
    method hataoge to GET, password URL mein — buri baat.

  63. 63
    What is .parking-summary-card? What does the . selector represent?
    Times asked 1
    Official solution

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

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

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

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

  64. 64
    What is display: flex?
    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.

  65. 65
    How do you make a section occupy half the page width?
    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>

  66. 66
    How do you add a hover effect to a button?
    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>

  67. 67
    Align two different text elements using HTML/CSS.
    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>

  68. 68
    What JavaScript did you use?
    Times asked 1
    Official solution

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

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

  69. 69
    Explain your Chart.js implementation.
    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.

  70. 70
    What is the DOM?
    Times asked 3
    Official solution

    SimpleDOM = Document Object Model — HTML ka tree jo browser memory mein banata hai. JS isi ko change karta hai.

    document.getElementById('btn').style.color = 'red'
    Jinja server pe HTML banata hai, phir browser DOM parse karta hai. Vue DOM ko reactive update karta hai.

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

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

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

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

  72. 72
    Which Version Control tool did you use?
    Times asked 1
    Official solution

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

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

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

  73. 73
    What does git status do?
    Times asked 1
    Official solution

    SimpleGit files ki history rakhta hai. GitHub remote + collaborator viva check.

    git status — kya change/untracked
    git checkout -b viva-fix ya git switch -c viva-fix — nayi branch
    git rm --cached notes.txt — track band, file disk pe rahe (.gitignore)
    git log — commits (examiner poochta hai)
    Collaborator: repo → Settings → Collaborators. MAD-1 instructor add karna mandatory hota hai.

  74. 74
    Git command to create a new branch.
    Times asked 1
    Official solution

    SimpleGit files ki history rakhta hai. GitHub remote + collaborator viva check.

    git status — kya change/untracked
    git checkout -b viva-fix ya git switch -c viva-fix — nayi branch
    git rm --cached notes.txt — track band, file disk pe rahe (.gitignore)
    git log — commits (examiner poochta hai)
    Collaborator: repo → Settings → Collaborators. MAD-1 instructor add karna mandatory hota hai.

  75. 75
    Explain basic Git commands.
    Times asked 1
    Official solution

    SimpleGit files ki history rakhta hai. GitHub remote + collaborator viva check.

    git status — kya change/untracked
    git checkout -b viva-fix ya git switch -c viva-fix — nayi branch
    git rm --cached notes.txt — track band, file disk pe rahe (.gitignore)
    git log — commits (examiner poochta hai)
    Collaborator: repo → Settings → Collaborators. MAD-1 instructor add karna mandatory hota hai.

  76. 76
    Explain how resume/file upload is handled.
    Times asked 1
    Official solution

    SimpleFile upload form multipart, Flask request.files, disk ya DB path store.

    <form method='POST' enctype='multipart/form-data'>
    f = request.files.get('resume')
    f.save(os.path.join('uploads', secure_filename(f.filename)))

    Sensitive docs uploads/ web se seedha serve mat karo, login check ke baad send_from_directory.
    Student resume edit: policy — allowed hai to Update route, nahi to freeze after apply.

  77. 77
    Why did you use request.files.get()?
    Times asked 1
    Official solution

    SimpleFile upload form multipart, Flask request.files, disk ya DB path store.

    <form method='POST' enctype='multipart/form-data'>
    f = request.files.get('resume')
    f.save(os.path.join('uploads', secure_filename(f.filename)))

    Sensitive docs uploads/ web se seedha serve mat karo, login check ke baad send_from_directory.
    Student resume edit: policy — allowed hai to Update route, nahi to freeze after apply.

  78. 78
    Create a route and HTML form that accepts user input and displays it on the browser.
    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 }}
  79. 79
    Create a route that stores form input in the database.
    Times asked 1
    Official solution

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

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

    Example naya field 'city':

    user.city = db.Column(db.String(50))
    user.city = request.form.get('city')
    <input name='city'>  ...  {{ user.city }}
  80. 80
    Create a route with URL parameters (e.g., /sum/<a>/<b> or /course/<course_name>).
    Times asked 1
    Official solution

    SimpleURL parameters se numbers lo, calculate karke return/render.

    @app.route('/sum/<int:a>/<int:b>')
    def add(a, b):
        return f'Hello, sum is {a+b}'

    Product: a*b. Square: n*n. Even/odd: 'even' if n%2==0 else 'odd'.
    Form se: request.form.get('a', type=int). Background color even/odd:
    color = 'green' if n%2==0 else 'red'

    return render_template('page.html', color=color)

    CSS: body { background: {{ color }}; }


    Simple<int:id> URL se integer nikalta hai. Alternatives: query string, POST form, slug string.

    @app.route('/user/<int:id>')  # /user/5
    @app.route('/user/<string:name>')

    request.args.get('id') # /user?id=5
    request.form.get('id') # hidden field
    int converter galat 'abc' pe 404 — yeh protection hai.

  81. 81
    Retrieve a student's applications using ORM relationships.
    Times asked 1
    Official solution

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

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

    Example model

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

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

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

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

  82. 82
    Retrieve a company by its ID.
    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 }}.

  83. 83
    Retrieve a student by ID.
    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 }}.

  84. 84
    Display student details and applications in a 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 }}.

  85. 85
    Create a One-to-One relationship in code.
    Times asked 1
    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).

  86. 86
    Insert a new Admin/User using ORM.
    Times asked 1
    Official solution

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

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

    Example model

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

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

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

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

  87. 87
    Add a parking spot using ORM.
    Times asked 1
    Official solution

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

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

    Example model

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

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

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

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

  88. 88
    Change the Admin Dashboard cards from row layout to column layout.
    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.

  89. 89
    Print list elements greater than a given value using a Jinja loop.
    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'))
  90. 90
    Explain the complete flow of the code you wrote during the coding task.
    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.

  91. 91
    Did you implement a search feature? Explain its 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.

  92. 92
    What resources or documentation did you use while building the project?
    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.

  93. 93
    What is your area of interest outside this degree?
    Times asked 1
    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?'

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