Viva prep · Real questions · Student experiences Enroll in Bootcamp

Proctor workspace

Proctor Level1_93

Share your experience Add your viva experience here
388 Questions
55 Sets
0 Topics
37 Reviews
Tips for this examiner: Just be confident about your project and go through the viva response spreadsheet.

She was very nice. My virtual environment was not getting installed and the entire viva took 50 mins, but she was very patient.

Student reviews

ashish MAD1

just be confident, everthing will go smooth just relax.
best of luck..

Questions remembered
  1. 1.show id card
  2. if you added mad1 as git collaborator or not show on github 3.download project file and start the application 4.login as admin and create a trek 5.register a staff approve him from admin dashboard, and assign the created trek to this staff and update the available slots from the staff dashboard 6.register and login as user and book the trek and update user profile 7.open code section and explain any route of your choice
  3. what is orm and which orm you used.
  4. write jinja loop for a list in which the marks should be greater than 40 10.write a route to fetch a user id from database.
Khushi MAD1

The most polite and nicest proctor. She waits for you if there is any issue..explain or repeat yhe questions.there is viva.vault and in there all the questions..do practice them and you will pass

Questions remembered
  1. Download the app from portal
  2. Run the app
  3. Login as Admin
  4. To show all the other core functionalities
  5. Open you code and explain the architecture of you app
  6. How does frontend and backend work
  7. What framework you used
  8. Write the <form>syntax
  9. Write a route for returning username from form
  10. Why do we use render_template as return statement of route
  11. What is error code for database issue
Sheet response MAD1

Shared viva questions from response sheet: same questions which are in the form 1.what is session; how does backend talk to frontend 3.write for loop in jinja to show names form a list 4.write a route in flask for accepting name from a form

Questions remembered
  1. same questions which are in the form 1.what is session
  2. how does backend talk to frontend 3.write for loop in jinja to show names form a list 4.write a route in flask for accepting name from a form
Anonymous MAD1

She is probably the best proctor you can get for level one viva thats
What I understood from the sheets.
She is super sweet and will help you throughout.
GOD IS WITH YOU DAWG

Questions remembered
  1. So the first thing she told me was to show the id card PDF. I did
  2. Next She asked me if I filled the GITHUB FORM. I said Yes and I showed my github collaborator page.
  3. She gave me option to run checksum or download from the portal I did the later
  4. I took some time to run virtual environment and download flask and sqlalchemy she was patient throughout
  5. Okay now comes the demonstration, She will tell you what to do, you obey like a good boy/girl and explain as you go.
  6. She told me to open my code, I did and the first question was
  7. I can see you have imported sessions, what is sessions and why do we use it ?
  8. She told me to open any template, and then she asked me how does backend communicate with the frontend ?
  9. She asked what ORM am I using ?
  10. If I get an error called "Internal Server Error" which code will it show ?
  11. Then she said that theory questions are over now comes the coding questions and told me to open notepad in full screen.
  12. Suppose there is a list called students, I want you to write a loop which shows the student names in order in frontend
  13. Write a route which takes username as input from the forms and sends it back to the frontend
  14. That was it.
nandita MAD1

Shared viva questions from response sheet: level1; - project; • show id card, asked if i've submitted github form and show the collaborator

Questions remembered
  1. level1
  2. - project
  3. • show id card, asked if i've submitted github form and show the collaborator
  4. • either download from the portal or do checksum
  5. • showed my application and proctor told to first login as admin and create a trek
  6. • then register as a staff and again login as admin to approve staff login and assign the new trek to that staff
  7. • login as the staff and view the assigned trek and update the slots
  8. • register and login as a user and book a trek, also update profile
  9. - theory
  10. • asked to show my code, then asked about session, flask SQLAlchemy orm, 301 code, template inheritance
  11. - coding
  12. • jinja for loop syntax (notepad)
  13. • route for accepting name from a form (notepad)
kavya MAD1

she is so nice and she repeats the same set of questions everytime

Questions remembered
  1. • Demonstrate core functionalities of the project
  2. • frameworks used
  3. • url_for usage
  4. • how does frontend and backend interact
  5. • jinja for loop code in notepad
  6. • route for taking id as input in notepad
Sheet response MAD1

Very chill and patient proctor , just be calm and answer

Questions remembered
  1. 1.)demonstrate the project and asked for functionalities in between; 2.)show code - what does url_for do 3.) what is orm 4.) what are the frameworks used 5.) model py explain 2 tables and their relationship 6.)show any template - have u done template inheritance if so where ?
  2. coding - write a simple for loop in jinja , 8) write a route to get username from a form
BAQAR MAD1

The examiner was very patient, encouraging, and helpful, so being a little nervous is completely fine. My biggest suggestion is to make your project demo thorough and informative instead of simply opening each dashboard. Demonstrate the actual functionalities and explain what is happening while you use them. Rehearsing the demo beforehand can help you present it smoothly and use the demo itself to demonstrate that you understand your project.

Also, practice writing the basic Flask and Jinja syntax from scratch in Notepad or another plain-text editor, because the coding questions may be asked without VS Code autocomplete. Revise your frameworks, imports, templates, database models and relationships, primary vs. foreign keys, HTTP status codes, Flask routes, request, render_template, and basic Jinja loops/conditionals. Finally, definitely go through this crowdsourced viva spreadsheet and look up your proctor ID. In my experience, the previous reviews were extremely useful, and the general pattern of questions was quite similar to what earlier students had reported.

Questions remembered
  1. Double click the cell to see full response. Questions Asked by the Examiner - My Experience The viva started with the examiner asking me to show my student ID card. She then asked whether I had filled the Git form, for which I opened my GitHub repository and showed that the required collaborator had been added. After that, she gave me the option to either perform the checksum verification or download the submitted project directly from the portal. I chose to download it from the portal, extracted it, ran the application, logged in as Admin, and demonstrated the project and its functionalities. After the demo, she moved to theory questions.
  2. She asked me to open app.py and explain the frameworks/technologies used in the project. She then asked me to open one of my HTML templates and give an overview of it.
  3. Next, she asked me to choose any two database tables and explain their relationship. I chose Trek and Booking and explained their relationship.
  4. After which she asked me to explain the difference between a primary key and a foreign key.
  5. She also asked what HTTP status code 303 means. I could not recall it during the viva, and she explained that it is associated with “See Other”/redirection. For the coding questions, she specifically asked me to open Notepad and write the code from scratch, so there was no VS Code autocomplete.
  6. The first question was to write a Jinja for loop to display student names from a given list.
  7. The second was a simple Flask route involving data received using request, for which I started writing the route and used request.form.get() and render_template(). Before I finished the complete code, she said that what I had written was sufficient and concluded the viva.
Sheet response MAD1

Very patient proctor, but ensure you don't waste time during viva for setup and

Own your application, you should know where each logic is implemented/

Ensure your theoretical knowledge is good. They do not expect expert level programming from you, but only want you to at least confidently answer basic concepts which was taught as part of the MAD 1 course.

Questions remembered
  1. Demonstrate the apps functionality, especially the various dashboards and bookings.
  2. explain the db models and relationships
  3. explain the frameworks used
  4. write a route to accept input from a form and display a specific message
  5. jinja syntax for loops
Sheet response MAD1

LEVEL 1: Ma'am is the best person I could have got as an examiner. She was very patient and she was to the point. She did not waste any of my time and she was very polite and sweet. You're lucky if you get this proctor. Don't get tensed while explaining, that's it.

Questions remembered
  1. LEVEL 1 VIVA:
  2. -Login as admin and show the functionalities
  3. -Create a staff profile (register as a staff member), and then login after admin approval
  4. -Create a user profile, and show the features of the user
  5. -What frameworks did you use in the project?
  6. -How are you sending data from frontend to backend?
  7. -Explain any two tables from your database and explain how they are related
  8. -Write a simple for loop in Jinja.
  9. -Write a Flask route which takes id as input from the url and search for that id in the database (I didn't have to finish this question, ma'am was satisfied when i wrote the first few lines)
  10. I kept explaining everything in the demos, which might have been good to do.
  11. Then ma'am said that my viva is over.
Pratik MAD1

she is very calm and it's okay to be little bit nervous

Questions remembered
  1. 1 - ask for id card(don't forget to keep it ready)
  2. 2 - for git repo n collab, also asked whether i filled that git form or not
  3. 3 - download the zip file from the portal or do cheksum(u can do either one)
  4. 4 - ask to run it and login as admin, booking history,adding trek and ask to show search filter.
  5. 5 - register as staff n shown dashboard after accepting the staff request by the admin, staff dashboard,manage trek
  6. 6 - register as user(trekker),login,shown dashboard, ask for booking history.
  7. Now question - what framework did i use,show any one of the template,asked whether i use jinja template or note(base.html),in model take any two table and explain it's relationship(i get it wrong she correct me too),function by which how admin can approve staff, which orm i used(i mistake it,she asked me again and i answer it )
  8. Code - write in notepad, a route by which we can get the data from fronted to backened
  9. write a code of button(i didn't understand it much so i write submit button,stopped in between and told that it was a different question i asked but it's okay you got the concept)
  10. I might have missed/forget some question here but it's okay don't worry much
Manish Kumar MAD1

stay calm, drink water, and explain everything clearly, she will let you explain everything without interrupting you

Questions remembered
  1. she asked me first to do checksums or download the zipfile, and then told me demo my project starting from admin to staff and then to user, and then asked me 3 core functionality questions, and then she told me to open notepad and asked me to write a simple jinja for loop, and then asked me again to write a route that takes id as an input and passes it lt frontend
Vipul Bhati MAD1

understand your code

Questions remembered
  1. 1)demonstrate the project
  2. 2)the frameworks you used
  3. 3)what does part of used framework do
  4. 4)code a simple route that takes a value
Sheet response MAD1

She is the sweetest

Questions remembered
  1. What are the frameworks used
  2. What's 302 error
  3. Have you used template inheritance
  4. What's session
  5. Have you done frontend and backend validation
  6. for loop syntax
  7. how to create button in html
  8. pass id as parameter and display it
  9. What's request
Avra Paul MAD1

She's the best, shes so polite and friendly, youre lucky if you are assigned to her. Chill , relax and learn whats shared in the sheet

Questions remembered
  1. Show and explain the code, explain the imports
  2. frameworks used
  3. how to send data from backend to frontend
  4. write a route to return 4 square
  5. write if statements in jinja template
Sheet response MAD1

Shared viva questions from response sheet: Asked theory questions; 1.url_for,session in Flask since I used them; 2.backend and frontend validation

Questions remembered
  1. Asked theory questions
  2. 1.url_for,session in Flask since I used them
  3. 2.backend and frontend validation
  4. Code changes
  5. App route with parameters
  6. Background change
akira MAD1

she was reallyy reallyyy sweet and helpedd where i got stuck. dont be nervous and be confident on what you know. level 1 viva usually gets over in not more than 20min. mine took 15min and it was over. if u r preparing at the end moment and u know literally nothing then just go through all the questions present in this sheet of that particular examiner and you will be good to go. (tried and tested method)

Questions remembered
  1. be ready with your student ID card, oppe like setup and open the github and show u have added them as collaborator or not.
  2. downloaded the proj from portal and opened in vs code
  3. theory questions: what all frameworks have you used to make the project
  4. the first line of the code in app.py you have imported lot of things, what do u mean by request. (they can ask about other imported items as well so learn all)
  5. have you used template inheritance
  6. what is the code of internal server error?? (answer 500)
  7. css styling priority? (answer: inline, internal(style tag), external(css file)
  8. open notepad and create a list (simply l= [1,2,3,4,5] ) and write the api route to display this list....first ask her do we need to also write the imports she'll say no and then ask get and post request also or just simple so shell say simple answer: @app.route('/display') def show(): return render_template('num.html" , 'l'); and then when we write the html file so there we will pass the list as : {{l}
  9. how do you connect the backend to frontend? i didnt quite get this answer but i just said render_template and she said fine then these were the theory questions she appreciated and told to run the code and login as the admin....i asked do we need to delete the pre created database she said no.
  10. after logging in as admin she asked, can admin search the particular student and company? my app didnt had that feature so i said no i forgot to do that
  11. then she asked to login as a company and create a drive
  12. register as a student and apply to the drive. can a student apply to the same drive twice? (when a student has already applied so it should show a prompt as in already applied or something relative)
  13. thats all. she was reallyy reallyyy sweet and helpedd where i got stuck. dont be nervous and be confident on what you know
Meet MAD1

You r a one lucky person if u get her she is very sweet,kind and helpful jus know your code well then u r good to go

Questions remembered
  1. 1.Download your project
  2. 2.explain request ? why have you used it
  3. 3. how do we pass data from frontend to backend and vice versa
  4. 4.checked the duplicate applications
  5. 5.show the admin dashboard
  6. 6.company dashboard
  7. 7. can students edit profile?
  8. 8.what is ORM?
  9. Basically she checks all core functionalities
  10. CODE QUESTIONS:
  11. write the syntax for a route returning hello world
  12. write for loop in jinja
  13. THATS IT!
Dhruv MAD1

BE CHILL AND PLEASE PLEASE CHECK ALL THE VIVA QNS FROM THE FORMS, CAUSE THAT SAME ONLY THEY ASK

Questions remembered
  1. VIVA - 1 (EASY PROCTOR)
  2. * TOLD TO SIT IN A OPEEE FASHION
  3. * SHE ASKED TO SHOW THE DEMO - TOOK 8 mins
  4. * SHE THEN ASKED TO OPEN APP.PY AND TELL ALL THE IMPORTS IN YOUR APP.PY LIKE WHAT DOES IMPORT OS DO?
  5. * THEN SHE SAID TO OPEN NOTEPAD AND SAID TO WRITE A ROUTE FOR PRINTING A LIST = [1,2,3,4,5] WITH RENDER_TEMPLATE
  6. * THEN ASKED TO DO JINJA2 IF STATEMENT
  7. * THEN ASKED ABOUT ERROR CODES - WHAT DOES 500 ERROR CODE MEANS?
  8. * VIVA DONE IN 16 MINS
NV MAD1

Shared viva questions from response sheet: Either download the file in front of them, or do checksum.; Explain what frameworks you have used; show all the imported module in the controller and tell what request used for

Questions remembered
  1. Either download the file in front of them, or do checksum.
  2. Explain what frameworks you have used
  3. show all the imported module in the controller and tell what request used for
  4. Order of CSS Priority
  5. Are you using template inheritance and where
  6. How can we use a for loop in jinja
  7. then when all the questions were complete she asked to give the demo and checked all the core functionality of the project
Sheet response MAD1

Shared viva questions from response sheet: level-1; 1.show the model; 2.why import request, render_template()

Questions remembered
  1. level-1
  2. 1.show the model
  3. 2.why import request, render_template()
  4. 3.Internal server error code
  5. 4.open one of the template and have you used template inheritance
  6. 5.priority of css
  7. 6.write the form, for loop in notepad
  8. 7.write the syntax to add id in student table in notepad
  9. 8.how to send data from backend to frontend
  10. 9.Have you used orm? which orm is used?
  11. 10.Checked the core functionality of the app by demo
Sheet response MAD1

Overall very nice, the viva was over in about 10-15 mins, I joined 10 mins earlier would suggest the same, the proctor will join early too and you can start the viva and end it accordingly. They even gave feedback for the same.

Questions remembered
  1. Either download the file in front of them, or do checksum.
  2. Give the demo. After which they will ask you to switch to your code.
  3. Explain what frameworks you have used.
  4. Open routes and explain the what 'url_for' is imported and used for. (basically can ask for any import command)
  5. Write/Share syntax for a route.
  6. How can we use a for loop in jinja
  7. Are you using template inheritance
  8. Order of CSS Priority
NA MAD1

She sounds like a chill person
My viva completed in 13 mins..
Just know your project...

Questions remembered
  1. Asked to show the id card
  2. Then asked to show the GitHub collabrator
  3. *Asked to do the checksum
  4. *I then ran the project
  5. *She just asked me to show the core functionalities,not everything
  6. *She just checked the main functionalities of admin, student and company dashboards
  7. *Asked about types of css like inline,internal,external
  8. *Asked to show the models and controllers code
  9. *Open notepad and write a for loop in jinja
  10. *A route returning hello world
Sheet response MAD1

Proctor was really good and helpful. I was nervous before but got at peace as soon as viva started.

Questions remembered
  1. • Asked for a demo (she gave me intructions what to do and i followed them)
  2. • Asked me to show the main file
  3. • Asked me to show where i have done the imports
  4. • Asked me about sessions
  5. • Asked me about CSS priority
  6. • Asked me about what frameworks i have used
  7. • Asked me about some error codes which i couldn't answer
  8. • Asked me to write a route to display my name
Sheet response MAD1

Very sweet proctor, helping nature. If you get her you are very lucky.

Questions remembered
  1. Show me the main python file
  2. Show me where you have created database file
  3. Show me your templates and route
  4. What techstack you are using
  5. Run the application and show the features
  6. Question on routes. In them basically the imports and why i imported them.
  7. Questions on templates
  8. Question on css and order in which they are implementing
  9. Template inheritance
  10. Write code for writing a route which renders your name.
Priyadarshini Negi MAD1

Answer confidently and with composure, and make sure you know what is used for what purpose in the code. Use terms like ‘authorization,’ ‘ORM,’ etc, while explaining your code.

Questions remembered
  1. She didn’t ask for the checksum because I downloaded the project folder in front of her from the Viva portal.
  2. She asked me to show all the core functionalities (basically a walkthrough of the project, like you did in the submitted video).
  3. What tech stack/frameworks have been used, and for what purpose?
  4. She asked for an explanation of how the project has been organized
  5. How does the frontend connect to the backend?
  6. What is SQLAlchemy?
  7. She asked me to point out where each piece of code is located.
  8. For what purpose has datetime been used?
  9. A walkthrough of the code logic showing how the doctor can enter the patient’s treatment details.
Ridhi Sehgal MAD1

She's very sweet and patient, You're lucky if you get this proctor
I booked the 9pm slot on 6th dec

Questions remembered
  1. LEVEL 1 VIVA
  2. She was very sweet
  3. Firstly, she asked me to share my screen and show the github repo - collaborators
  4. Then, she asked me to download my submission from portal and demonstrate my project
  5. which frameworks did you use
  6. how are you separating the user, admin, and doctors in models code
  7. Show me any one of the templates, Point out any line where you have used jinja
  8. Did you use template inheritance?
  9. tell me how you're passing the data from the front end to the back end
  10. tell me the order of execution of CSS styles
  11. asked me to simply write the syntax of if loop of jinja {%if%} {%else%} {%endif%} That's all
Sheet response MAD1

very calm and the bestest proctor u can get, she'll let u explain everything and be polite to her and see the viva rubriks before u submit ur project since i missed a partial feature in my project :(

Questions remembered
  1. followed the exact same pattern from viva rubrics
  2. then asked theory questions:
  3. 1.what are the frameworks used
  4. 2.how are you separating the user, admin, and doctors in models code
  5. 3.point out where you have done the initialization for flask
  6. 4.point out where you have used or initialized the database
  7. 5.Show me any one of the templates, Point out any line where you have used jinja
  8. 6.Are you using template inheritance
  9. 7.tell me how you're passing the data from the front end to the back end or vice versa
  10. 8.do you know about ORM
  11. 9.tell me the order of execution of CSS styles
  12. 10.tell me amongst the frameworks or modules that you have imported, which was the first one you used when you set up your application
R priyadharshni MAD1

Just be ready with your id card, git hub page for showing collaborators, and downloading page of project from portal. Prepare this question along it you should know your project codes well.

Questions remembered
  1. 1)ORM 2)explain the models and routes 3)jinja template inheritance use
  2. explain database schema 5)what are frameworks used 6)where sqlalchemy is implemented. 7)how connections are made from frontend to backend. 8)execute the CRUD operation at admin side.
  3. reserve slot and cancel it.
  4. show graph representation of admin side. 11)show users management.
Ahana MAD1

Remember to keep ID card with you. Checksum is not mandatory. Be polite.

Questions remembered
  1. 1.Full code demo
  2. Routes functions
  3. What is ORM ?
  4. Timestamp calculation
  5. Jinja template usage, how to write for loop in Jinja
  6. Purpose of redirect
  7. Questions based on your code ..
Somsankar Chakraborty MAD1

She was super chill. She'll give you enough time. You'll be lucky if you got her as your proctor.

Questions remembered
  1. ID card and Git collaborator
  2. Project demo (downloading from portal)
  3. Asked what frameworks i have used
  4. Ask me to explain any one route
  5. Asked me to show some particular templates
  6. She asked me whether I have used Jinja2 engine and template inheritance
  7. How is the data getting transferred from backend to frontend
  8. Explain any two tables, how are they connecting (I showed parking lot and parking spot tables and explained the primary key and foreign key relationship between them)
  9. Types of CSS and explain
  10. ORM
Ak MAD1

Very nice proctor

Questions remembered
  1. Show collabrator in git
  2. Demo
  3. Are you using validation
  4. Write jinja conditional statements
  5. Explain me route where you update number of spots
  6. Where you initiate db
  7. How you initiate db
Kya karoge janke MAD1

She is sooo polite and nice. She gives you time to explain. She allows you to explain in hindi as well. You are really lucky if you get her as your proctor.

Questions remembered
  1. Show id card
  2. Download the zip file from portal / Do check sum
  3. run the app
  4. project demo, any extra features
  5. which framework used?
  6. Show any template file, how are you transferring data from backend to frontend
  7. what do get_or_404 do?
  8. where you used redirect(), session, and flash (i have used flash so she asked)
  9. what is the first framework you used when you started the project (I said The first file i created was base.html , she stopped me and said "Right, that was the answer I wanted")
  10. Did i use template inheritance, and where?
Sheet response MAD1

Shared viva questions from response sheet: Level1_93 ( viva 1); Very Sped up viva; Shower id,GitHub

Questions remembered
  1. Level1_93 ( viva 1)
  2. Very Sped up viva
  3. Shower id,GitHub
  4. Downloaded project
  5. Login in admin
  6. Asked to create a lot and incr/decr lots
  7. Then delete that lot
  8. Show registered users
  9. Show summary tab
  10. Create user
  11. Reserve a spot, occupy it, release it, show the time stamps in the summary
  12. Demo done
  13. Asked what framwork i have used
  14. How I have implemented user and admin
  15. Explain relationship between tables( i opened the report where I had table diagrams and explained it)
  16. She asked about the AI usage
  17. Then in templates she asked where have you used jinja
  18. How is the data getting transferred from backend to frontend
  19. Asked if I have frontend and backend validation for which I said 'no but I may do it later'
Sk MAD1

the proctor was really nice so if you got her as your proctor then its your lucky day

Questions remembered
  1. First the demo
  2. what is ORM
  3. what is jinja templets
  4. how you handle user and admin access
  5. Explain one of your routing how its work
Sheet response MAD1

Both Proctors were calm. Sir had some voice issue, I had to repeatedly ask him to repeat questions.

Questions remembered
  1. Project: Vehicle Parking
  2. level1: Maam didn't ask much. told to go through the project like giving demo.
  3. Q: Backref, Lazy
  4. Q: Orm
  5. Q: explain any one route
  6. Level2:
  7. After demonstration and coding questions he told to stop sharing and started asking questions.
  8. What ever is present already in this sheet he asked all of that so study that thoroughly.
  9. Nothing new was asked he takes time in asking questions and tells to explain models.
  10. Coding Questions:
  11. Q: Give 20% discount to all lots
  12. Q: On hover submit button should change red
Pankhuri MAD1

She was nice and polite. Didn't expect the exact answer, atleast answer whatever you know regarding that .

Questions remembered
  1. Asked for a complete demo (asked me to delete spot , show booking summaries and such functionalities -she wanted me to explain and show them with the result) 2.she asked me what are the frameworks I've used and where and for what
  2. She asked me to shows routes in my code and what for that particular router has been used. 4.Show and explain any two tables (I showed parking lot and parkit spot tables and explained the primary key and foreign key relationship between them). 5.asked me to show certain templates 6.She asked me whether I have used any template inheritance.

Approved viva sets

  1. 1
    Asked to show Id
    Times asked 2
  2. 2
    Start the application
    Times asked 2
  3. 3
    Write a route to get all the Blacklisted user.
    Times asked 2
  4. 4
    Write a code in frontend to send name data to the backend. That's all.
    Times asked 2
Advice: She is chill. She will help you out if you get stuck anywhere.
  1. 1
    Lifecycle of vue
    Times asked 2
  2. 2
    Colour change any
    Times asked 1
  3. 3
    Write flask code to show all users
    Times asked 2
  1. 1
    Asked me to switch on my camera from both devices
    Times asked 2
  2. 2
    ID Card
    Times asked 4
  3. 3
    Github Collaborator
    Times asked 3
  4. 4
    Asked me to download the submission from portal and start
    Times asked 2
  5. 5
    CORS - frontend and backend link
    Times asked 1
  6. 6
    Meaning of 302 status code - Redirection
    Times asked 1
  7. 7
    What frameworks have i used
    Times asked 2
  8. 8
    Where have you incorporated redis - app.py
    Times asked 2
  9. 9
    Write a function in js that takes 2 numbers and shows their sum
    Times asked 2
  10. 10
    How to add a new column in SQL Database (models.py) -- She made me write the code to make a new column - email = db.Column( db.String, unique = True, nullable = False) Then she asked me to demonstrate my project SHE IS SO CALM AND PATIENT ✨ I LOVED HER VIBE!
    Times asked 1
Advice: THAT'S IT SHE IS THE SWEETEST PROCTOR ANYONE CAN GETTTT FEEL LUCKY IF YOU GET HER AS YOUR PROCTOR 💗🤗
  1. 1
    Which frameworks did you use?
    Times asked 2
  2. 2
    Explain a Vue file and show how the frontend sends data to the backend for processing.
    Times asked 1
  3. 3
    What is the status code for an Internal Server Error? ### Coding Questions
    Times asked 2
  4. 4
    Write a Flask route that takes an ID as an input parameter and displays it on the frontend.
    Times asked 1
  5. 5
    Write JavaScript code to return the square of 16. ### Overall Experience The viva mainly focused on: * Project understanding * Frontend-to-backend communication * Basic Vue and Flask concepts * Simple coding questions
    Times asked 2
Advice: she is very nice and supportive
  1. 1
    PRESENTATION
    Times asked 2
  2. 2
    1.Login as admin and create trek and staff
    Times asked 2
  3. 3
    2.Login as a staff and just show the dashboard
    Times asked 2
  4. 4
    3.Login as user and check wheather the user can export the CSV file or not
    Times asked 2
  5. 5
    THEORY
    Times asked 2
  6. 6
    3.what is the meaning of status code 302
    Times asked 2
  7. 7
    4.Explain any of your vue file showing how frontend send data to backend for processing
    Times asked 2
  8. 8
    1.Write a flask route which will take input from the frontend.
    Times asked 2
  9. 9
    2.Write a js code to return the square of 16(don't just return the result, print the result too.She is expecting to use console.log)
    Times asked 2
Advice: Overally She is very nice and patience. Be confident.Just practice a simple backend route and js function for coding.
  1. 1
    done in 12mins
    Times asked 2
  2. 2
    id, github collab, downloaded from portal
    Times asked 2
  3. 3
    show where you used redis
    Times asked 2
  4. 4
    show where you used celery
    Times asked 1
  5. 5
    show any route
    Times asked 2
  6. 6
    show any vue page
    Times asked 2
  7. 7
    show database
    Times asked 2
  8. 8
    show models code
    Times asked 2
  9. 9
    diff bw v-if and v-show
    Times asked 1
  10. 10
    what orm u used
    Times asked 2
  11. 11
    how data goes from frontend to backend
    Times asked 1
  12. 12
    how r u separating admin and users
    Times asked 2
  13. 13
    what error code do u get if frontend fails to fetch backend or smtg coding:
    Times asked 2
  14. 14
    write flask code to take id as input parameter and display to frontend
    Times asked 2
  15. 15
    write js code to display square of 2 she saw all the 3dashboards, export csv and download resume function only in the app
    Times asked 2
Advice: Very chill and patient, just listen to her calmly and even if u dont know the ans just try smtg, she'll correct if u go wrong
  1. 1
    saw some comments on my code and asked if I wrote it
    Times asked 2
  2. 2
    ai% and where I used ai
    Times asked 2
  3. 3
    why did you "import os"
    Times asked 2
  4. 4
    what are most important imports
    Times asked 2
  5. 5
    what does jsonify do
    Times asked 2
  6. 6
    what is cors and what it does
    Times asked 2
  7. 7
    notepad coding :
    Times asked 2
  8. 8
    if you have a student table add a column with roll number
    Times asked 2
  9. 9
    write a javascript code which returns square of a number
    Times asked 2
  10. 10
    run app and show it's functionality
    Times asked 2
  11. 11
    celery daily reminder code
    Times asked 2
Advice: depends upon her mood , can go really deep with theory just don't piss her off
  1. 1
    show how the frontend is sending data to backend
    Times asked 2
  2. 2
    how to write the backend function to print square of two numbers. And few 2-3 similar questions
    Times asked 1
Advice: Just be confident
  1. 1
    To write on textedit v-if v-show, retrieval, sqlalchemy code. What is orm
    Times asked 1
  2. 2
    How a company is approved, he told to show and explain code.
    Times asked 2
  3. 3
    Few apis he asked. Few simple questions from the project.
    Times asked 2
Advice: Stay calm. He understands our problem if any. Tell the truth. Overall really good proctor no need to worry. All the best!
  1. 1
    She asked for a detailed demo to check most of the functions. And a few more basic questions -
    Times asked 2
  2. 2
    what is celery? Where is it implemented
    Times asked 2
  3. 3
    jwt token
    Times asked 2
  4. 4
    v-if vs v-show
    Times asked 3
  5. 5
    what is DOM?
    Times asked 2
  6. 6
    how to write the backend function to print Hello world (just narrate the code, not write). She asked 2/3 more similar questions.
    Times asked 2
Advice: Just be confident about your project and go through the viva response spreadsheet. She was very nice. My virtual environment was not getting installed and the entire viva took 50 mins, but she was very patient.
  1. 1
    - make a hello world flask route
    Times asked 2
  2. 2
    - what is celery and redis? how do they work together
    Times asked 2
  3. 3
    - change a random background colour
    Times asked 2
  4. 4
    - where is vue being used?
    Times asked 2
  5. 5
    - cache and where are the cached files located.
    Times asked 2
  1. 1
    Open you code and explain the architecture of you app
    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

  2. 2
    Write the <form>syntax
    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
    Write a route for returning username from form
    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: The most polite and nicest proctor. She waits for you if there is any issue..explain or repeat yhe questions.there is viva.vault and in there all the questions..do practice them and you will pass
  1. 1
    She gave me option to run checksum or download from the portal I did the later
    Times asked 1
    Official solution

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

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

  2. 2
    I took some time to run virtual environment and download flask and sqlalchemy she was patient throughout
    Times asked 1
    Official solution

    SimpleVirtualenv isolated Python env — project deps system Python ko nahi bigaadte.

    Example

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
  3. 3
    Okay now comes the demonstration, She will tell you what to do, you obey like a good boy/girl and explain as you go.
    Times asked 1
    Official solution

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

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

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

  4. 4
    She told me to open my code, I did and the first question was
    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
    I can see you have imported sessions, what is sessions and why do we use it ?
    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().

  6. 6
    She told me to open any template, and then she asked me how does backend communicate with the frontend ?
    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
    She asked what ORM am I using ?
    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
  8. 8
    If I get an error called "Internal Server Error" which code will it show ?
    Times asked 1
    Official solution

    SimpleInt column mein string daalne pe SQLAlchemy/DB type error ya Integrity/StatementError. Empty table pe bhi same validation fail — row count matter nahi.

    Example

    # SQLite may coerce sometimes; Postgres: invalid input syntax for integer
    Spot(status='free', lot_id='abc')  # lot_id int → error
  9. 9
    Suppose there is a list called students, I want you to write a loop which shows the student names in order in frontend
    Times asked 1
    Official solution

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

  10. 10
    Write a route which takes username as input from the forms and sends it back to the frontend
    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: She is probably the best proctor you can get for level one viva thats What I understood from the sheets. She is super sweet and will help you throughout. GOD IS WITH YOU DAWG
  1. 1
    • either download from the portal or do checksum
    Times asked 1
    Official solution

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

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

  2. 2
    • showed my application and proctor told to first login as admin and create a trek
    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 register as a staff and again login as admin to approve staff login and assign the new trek to that staff
    Times asked 1
    Official solution

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

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

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

  4. 4
    • login as the staff and view the assigned trek and update the slots
    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
    • register and login as a user and book a trek, also update profile
    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.

  6. 6
    • asked to show my code, then asked about session, flask SQLAlchemy orm, 301 code, template inheritance
    Times asked 1
    Official solution

    SimpleBase template pe navbar/footer, child pages {% extends %} + {% block %} se content bharte hain. DRY.

    Example

    {# base.html #}
    {% block content %}{% endblock %}
    
    {# home.html #}
    {% extends 'base.html' %}
    {% block content %}
      <h1>Home</h1>
    {% endblock %}
  7. 7
    • route for accepting name from a form (notepad)
    Times asked 1
    Official solution

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

  1. 1
    • url_for usage
    Times asked 1
    Official solution

    Simpleurl_for endpoint name se URL banata hai — hardcode path mat likho.

    Example

    url_for('auth.login')
    url_for('static', filename='css/style.css')
  2. 2
    • how does frontend and backend interact
    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
    • jinja for loop code in notepad
    Times asked 1
    Official solution

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

    Example

    {% for u in users %}
      <tr><td>{{ loop.index }}</td><td>{{ u.email }}</td></tr>
    {% endfor %}
  4. 4
    • route for taking id as input in notepad
    Times asked 1
    Official solution

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

Advice: she is so nice and she repeats the same set of questions everytime
  1. 1
    The second was a simple Flask route involving data received using request, for which I started writing the route and used request.form.get() and render_template(). Before I finished the complete code, she said that what I had written was sufficient and concluded the viva.
    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)
Advice: The examiner was very patient, encouraging, and helpful, so being a little nervous is completely fine. My biggest suggestion is to make your project demo thorough and informative instead of simply opening each dashboard. Demonstrate the actual functionalities and explain what is happening while you use them. Rehearsing the demo beforehand can help you present it smoothly and use the demo itself to demonstrate that you understand your project. Also, practice writing the basic Flask and Jinja syntax from scratch in Notepad or another plain-text editor, because the coding questions may be asked without VS Code autocomplete. Revise your frameworks, imports, templates, database models and relationships, primary vs. foreign keys, HTTP status codes, Flask routes, request, render_template, and basic Jinja loops/conditionals. Finally, definitely go through this crowdsourced viva spreadsheet and look up your proctor ID. In my experience, the previous reviews were extremely useful, and the general pattern of questions was quite similar to what earlier students had reported.
  1. 1
    Demonstrate the apps functionality, especially the various dashboards and bookings.
    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
    explain the db 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
    explain the frameworks used
    Times asked 1
    Official solution

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

  4. 4
    write a route to accept input from a form and display a specific message
    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
    jinja syntax for loops
    Times asked 1
    Official solution

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

    Example

    {% for u in users %}
      <tr><td>{{ loop.index }}</td><td>{{ u.email }}</td></tr>
    {% endfor %}
Advice: Very patient proctor, but ensure you don't waste time during viva for setup and Own your application, you should know where each logic is implemented/ Ensure your theoretical knowledge is good. They do not expect expert level programming from you, but only want you to at least confidently answer basic concepts which was taught as part of the MAD 1 course.
  1. 1
    -Login as admin and show the functionalities
    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
    -Create a staff profile (register as a staff member), and then login after admin approval
    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
    -What frameworks did you use in the project?
    Times asked 1
    Official solution

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

  4. 4
    -Write a Flask route which takes id as input from the url and search for that id in the database (I didn't have to finish this question, ma'am was satisfied when i wrote the first few lines)
    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
    I kept explaining everything in the demos, which might have been good to do.
    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.

  6. 6
    Then ma'am said that my viva is over.
    Times asked 1
    Official solution

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

Advice: LEVEL 1: Ma'am is the best person I could have got as an examiner. She was very patient and she was to the point. She did not waste any of my time and she was very polite and sweet. You're lucky if you get this proctor. Don't get tensed while explaining, that's it.
  1. 1
    2 - for git repo n collab, also asked whether i filled that git form or not
    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
  2. 2
    3 - download the zip file from the portal or do cheksum(u can do either one)
    Times asked 1
    Official solution

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

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

  3. 3
    4 - ask to run it and login as admin, booking history,adding trek and ask to show search filter.
    Times asked 1
    Official solution

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

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

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

  4. 4
    5 - register as staff n shown dashboard after accepting the staff request by the admin, staff dashboard,manage trek
    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
    6 - register as user(trekker),login,shown dashboard, ask for booking history.
    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.

  6. 6
    Code - write in notepad, a route by which we can get the data from fronted to backened
    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'
  7. 7
    write a code of button(i didn't understand it much so i write submit button,stopped in between and told that it was a different question i asked but it's okay you got the concept)
    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
    I might have missed/forget some question here but it's okay don't worry much
    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 calm and it's okay to be little bit nervous
  1. 1
    1)demonstrate the project
    Times asked 1
    Official solution

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

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

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

  2. 2
    3)what does part of used framework do
    Times asked 1
    Official solution

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

  3. 3
    4)code a simple route that takes a value
    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: understand your code
  1. 1
    What's 302 error
    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
    What's 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().

  3. 3
    Have you done frontend and backend validation
    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')
  4. 4
    for loop syntax
    Times asked 1
    Official solution

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

  5. 5
    how to create button in html
    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.

  6. 6
    pass id as parameter and display it
    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 the sweetest
  1. 1
    Show and explain the code, explain the imports
    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 route to return 4 square
    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
    write if statements in jinja template
    Times asked 1
    Official solution

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

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
Advice: She's the best, shes so polite and friendly, youre lucky if you are assigned to her. Chill , relax and learn whats shared in the sheet
  1. 1
    1.url_for,session in Flask since I used them
    Times asked 1
    Official solution

    Simpleurl_for endpoint name se URL banata hai — hardcode path mat likho.

    Example

    url_for('auth.login')
    url_for('static', filename='css/style.css')
  2. 2
    Code changes
    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'))
  1. 1
    downloaded the proj from portal and opened in vs code
    Times asked 1
    Official solution

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

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

  2. 2
    the first line of the code in app.py you have imported lot of things, what do u mean by request. (they can ask about other imported items as well so learn all)
    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
    what is the code of internal server error?? (answer 500)
    Times asked 1
    Official solution

    SimpleInt column mein string daalne pe SQLAlchemy/DB type error ya Integrity/StatementError. Empty table pe bhi same validation fail — row count matter nahi.

    Example

    # SQLite may coerce sometimes; Postgres: invalid input syntax for integer
    Spot(status='free', lot_id='abc')  # lot_id int → error
  4. 4
    css styling priority? (answer: inline, internal(style tag), external(css file)
    Times asked 1
    Official solution

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

    Inline vs internal vs external. Specificity inline high.

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

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

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

    Example

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

    Project example: style section SFC scoped + bootstrap.

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

  5. 5
    open notepad and create a list (simply l= [1,2,3,4,5] ) and write the api route to display this list....first ask her do we need to also write the imports she'll say no and then ask get and post request also or just simple so shell say simple answer: @app.route('/display') def show(): return render_template('num.html" , 'l'); and then when we write the html file so there we will pass the list as : {{l}
    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
    after logging in as admin she asked, can admin search the particular student and company? my app didnt had that feature so i said no i forgot to do that
    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()
  7. 7
    then she asked to login as a company and create a drive
    Times asked 1
    Official solution

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

  8. 8
    register as a student and apply to the drive. can a student apply to the same drive twice? (when a student has already applied so it should show a prompt as in already applied or something relative)
    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.

  9. 9
    thats all. she was reallyy reallyyy sweet and helpedd where i got stuck. dont be nervous and be confident on what you know
    Times asked 1
    Official solution

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

Advice: she was reallyy reallyyy sweet and helpedd where i got stuck. dont be nervous and be confident on what you know. level 1 viva usually gets over in not more than 20min. mine took 15min and it was over. if u r preparing at the end moment and u know literally nothing then just go through all the questions present in this sheet of that particular examiner and you will be good to go. (tried and tested method)
  1. 1
    1.Download your project
    Times asked 1
    Official solution

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

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

  2. 2
    2.explain request ? why have you used 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.

  3. 3
    3. how do we pass data from frontend to backend and vice versa
    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
    4.checked the duplicate applications
    Times asked 1
    Official solution

    SimpleDuplicate booking/register rokne ke liye unique constraint + query check pehle.

    Example

    exists = Booking.query.filter_by(user_id=uid, slot_id=sid).first()
    if exists:
        flash('Already booked'); abort/redirect
  5. 5
    5.show the admin dashboard
    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.

  6. 6
    6.company dashboard
    Times asked 1
    Official solution

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

  7. 7
    7. can students edit profile?
    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
    THATS IT!
    Times asked 1
    Official solution

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

Advice: You r a one lucky person if u get her she is very sweet,kind and helpful jus know your code well then u r good to go
  1. 1
    VIVA - 1 (EASY PROCTOR)
    Times asked 1
    Official solution

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

  2. 2
    * TOLD TO SIT IN A OPEEE FASHION
    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
    * SHE ASKED TO SHOW THE DEMO - TOOK 8 mins
    Times asked 1
    Official solution

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

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

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

  4. 4
    * SHE THEN ASKED TO OPEN APP.PY AND TELL ALL THE IMPORTS IN YOUR APP.PY LIKE WHAT DOES IMPORT OS DO?
    Times asked 1
    Official solution

    Simpleimport os — env vars, paths. SECRET_KEY = os.environ.get('SECRET_KEY'), file paths join.

    Example

    import os
    basedir = os.path.abspath(os.path.dirname(__file__))
  5. 5
    * THEN SHE SAID TO OPEN NOTEPAD AND SAID TO WRITE A ROUTE FOR PRINTING A LIST = [1,2,3,4,5] WITH RENDER_TEMPLATE
    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
    * THEN ASKED TO DO JINJA2 IF STATEMENT
    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 %}
  7. 7
    * THEN ASKED ABOUT ERROR CODES - WHAT DOES 500 ERROR CODE MEANS?
    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
    * VIVA DONE IN 16 MINS
    Times asked 1
    Official solution

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

Advice: BE CHILL AND PLEASE PLEASE CHECK ALL THE VIVA QNS FROM THE FORMS, CAUSE THAT SAME ONLY THEY ASK
  1. 1
    show all the imported module in the controller and tell what request used for
    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
    then when all the questions were complete she asked to give the demo and checked all the core functionality of the project
    Times asked 1
    Official solution

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

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

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

  1. 1
    1.show the 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)
  2. 2
    2.why import request, render_template()
    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)
  3. 3
    6.write the form, for loop in notepad
    Times asked 1
    Official solution

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

  4. 4
    7.write the syntax to add id in student table in notepad
    Times asked 1
    Official solution

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

  5. 5
    9.Have you used orm? which orm is used?
    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
    10.Checked the core functionality of the app by demo
    Times asked 1
    Official solution

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

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

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

  1. 1
    Either download the file in front of them, or do checksum.
    Times asked 1
    Official solution

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

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

    Checksum maange to hash. Uncommitted files mat dikhana.

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

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

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

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

    Project example: Submitted zip run. README commands copy.

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

  2. 2
    Give the demo. After which they will ask you to switch to your code.
    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
    Write/Share syntax for a route.
    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
    How can we use a for loop in jinja
    Times asked 1
    Official solution

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

    Example

    {% for u in users %}
      <tr><td>{{ loop.index }}</td><td>{{ u.email }}</td></tr>
    {% endfor %}
Advice: Overall very nice, the viva was over in about 10-15 mins, I joined 10 mins earlier would suggest the same, the proctor will join early too and you can start the viva and end it accordingly. They even gave feedback for the same.
  1. 1
    Then asked to show the GitHub collabrator
    Times asked 1
    Official solution

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

    Example

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

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

  2. 2
    *Asked to do the checksum
    Times asked 1
    Official solution

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

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

    Checksum maange to hash. Uncommitted files mat dikhana.

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

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

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

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

    Project example: Submitted zip run. README commands copy.

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

  3. 3
    *I then ran the project
    Times asked 1
    Official solution

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

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

    Example

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

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

  4. 4
    *She just checked the main functionalities of admin, student and company dashboards
    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
    *A route returning hello world
    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: She sounds like a chill person My viva completed in 13 mins.. Just know your project...
  1. 1
    • Asked for a demo (she gave me intructions what to do and i followed them)
    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 to show the main file
    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
    • Asked me to show where i have done the imports
    Times asked 1
    Official solution

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

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

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

  4. 4
    • Asked me about sessions
    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().

  5. 5
    • Asked me about CSS priority
    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 me about some error codes which i couldn't answer
    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'
  7. 7
    • Asked me to write a route to display my name
    Times asked 1
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
Advice: Proctor was really good and helpful. I was nervous before but got at peace as soon as viva started.
  1. 1
    Show me your templates and route
    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
    What techstack you are using
    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
    Question on routes. In them basically the imports and why i imported them.
    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
    Questions on templates
    Times asked 1
    Official solution

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

  5. 5
    Question on css and order in which they are implementing
    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
    Write code for writing a route which renders your name.
    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: Very sweet proctor, helping nature. If you get her you are very lucky.
  1. 1
    She asked for an explanation of how the project has been organized
    Times asked 1
    Official solution

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

  2. 2
    How does the frontend connect to the backend?
    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
    She asked me to point out where each piece of code is located.
    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
    A walkthrough of the code logic showing how the doctor can enter the patient’s treatment details.
    Times asked 1
    Official solution

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

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

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

Advice: Answer confidently and with composure, and make sure you know what is used for what purpose in the code. Use terms like ‘authorization,’ ‘ORM,’ etc, while explaining your code.
  1. 1
    LEVEL 1 VIVA
    Times asked 4
    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
    She was very sweet
    Times asked 1
    Official solution

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

  3. 3
    Firstly, she asked me to share my screen and show the github repo - collaborators
    Times asked 1
    Official solution

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

    Example

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

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

  4. 4
    asked me to simply write the syntax of if loop of jinja {%if%} {%else%} {%endif%} That's all
    Times asked 1
    Official solution

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

    Example

    {% for u in users %}
      <tr><td>{{ loop.index }}</td><td>{{ u.email }}</td></tr>
    {% endfor %}
Advice: She's very sweet and patient, You're lucky if you get this proctor I booked the 9pm slot on 6th dec
  1. 1
    followed the exact same pattern from viva rubrics
    Times asked 1
    Official solution

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

  2. 2
    1.what are the frameworks used
    Times asked 1
    Official solution

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

  3. 3
    2.how are you separating the user, admin, and doctors in models code
    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)
  4. 4
    3.point out where you have done the initialization for flask
    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.

  5. 5
    4.point out where you have used or initialized the database
    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
    6.Are you using template inheritance
    Times asked 1
    Official solution

    SimpleBase template pe navbar/footer, child pages {% extends %} + {% block %} se content bharte hain. DRY.

    Example

    {# base.html #}
    {% block content %}{% endblock %}
    
    {# home.html #}
    {% extends 'base.html' %}
    {% block content %}
      <h1>Home</h1>
    {% endblock %}
  7. 7
    7.tell me how you're passing the data from the front end to the back end or vice versa
    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
    8.do you know about ORM
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  9. 9
    9.tell me the order of execution of CSS styles
    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
    10.tell me amongst the frameworks or modules that you have imported, which was the first one you used when you set up your application
    Times asked 1
    Official solution

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

Advice: very calm and the bestest proctor u can get, she'll let u explain everything and be polite to her and see the viva rubriks before u submit ur project since i missed a partial feature in my project :(
  1. 1
    1)ORM 2)explain the models and routes 3)jinja template inheritance use
    Times asked 1
    Official solution

    SimpleBase template pe navbar/footer, child pages {% extends %} + {% block %} se content bharte hain. DRY.

    Example

    {# base.html #}
    {% block content %}{% endblock %}
    
    {# home.html #}
    {% extends 'base.html' %}
    {% block content %}
      <h1>Home</h1>
    {% endblock %}
  2. 2
    reserve slot and cancel it.
    Times asked 1
    Official solution

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

  3. 3
    show graph representation of admin side. 11)show users management.
    Times asked 1
    Official solution

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

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

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

Advice: Just be ready with your id card, git hub page for showing collaborators, and downloading page of project from portal. Prepare this question along it you should know your project codes well.
  1. 1
    1.Full code demo
    Times asked 1
    Official solution

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

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

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

  2. 2
    Routes functions
    Times asked 1
    Official solution

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

  3. 3
    Timestamp calculation
    Times asked 1
    Official solution

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

  4. 4
    Purpose of redirect
    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'))
  5. 5
    Questions based on your code ..
    Times asked 1
    Official solution

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

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

    Example

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

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

Advice: Remember to keep ID card with you. Checksum is not mandatory. Be polite.
  1. 1
    Project demo (downloading from portal)
    Times asked 1
    Official solution

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

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

  2. 2
    Asked me to show some particular templates
    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
    She asked me whether I have used Jinja2 engine and template inheritance
    Times asked 1
    Official solution

    SimpleBase template pe navbar/footer, child pages {% extends %} + {% block %} se content bharte hain. DRY.

    Example

    {# base.html #}
    {% block content %}{% endblock %}
    
    {# home.html #}
    {% extends 'base.html' %}
    {% block content %}
      <h1>Home</h1>
    {% endblock %}
  4. 4
    Types of CSS and explain
    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: She was super chill. She'll give you enough time. You'll be lucky if you got her as your proctor.
  1. 1
    Show collabrator in git
    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
    Are you using validation
    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')
  3. 3
    Write jinja conditional statements
    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 %}
  4. 4
    Explain me route where you update number of spots
    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.

  5. 5
    Where you initiate db
    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
    How you initiate db
    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: Very nice proctor
  1. 1
    Download the zip file from portal / Do check sum
    Times asked 1
    Official solution

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

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

  2. 2
    run the app
    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
    project demo, any extra features
    Times asked 1
    Official solution

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

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

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

  4. 4
    which framework used?
    Times asked 1
    Official solution

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

  5. 5
    Show any template file, how are you transferring data from backend to frontend
    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.

  6. 6
    what do get_or_404 do?
    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
    what is the first framework you used when you started the project (I said The first file i created was base.html , she stopped me and said "Right, that was the answer I wanted")
    Times asked 1
    Official solution

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

  8. 8
    Did i use template inheritance, and where?
    Times asked 1
    Official solution

    SimpleBase template pe navbar/footer, child pages {% extends %} + {% block %} se content bharte hain. DRY.

    Example

    {# base.html #}
    {% block content %}{% endblock %}
    
    {# home.html #}
    {% extends 'base.html' %}
    {% block content %}
      <h1>Home</h1>
    {% endblock %}
Advice: She is sooo polite and nice. She gives you time to explain. She allows you to explain in hindi as well. You are really lucky if you get her as your proctor.
  1. 1
    Level1_93 ( viva 1)
    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
    Very Sped up viva
    Times asked 1
    Official solution

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

  3. 3
    Shower id,GitHub
    Times asked 1
    Official solution

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

    Example

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

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

  4. 4
    Downloaded project
    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
    Login in admin
    Times asked 1
    Official solution

    SimpleLogin flow pehle poochta hai "tu kaun hai?", token milne ke baad har API pe wohi proof dikhate ho.

    Authentication step: Vue form email + password JSON POST karta hai. Flask user dhoondhta hai, check_password_hash se prove karta hai ki tum genuine ho. Galat 401. Sahi pe JWT + role milta hai — yeh session/token hai.

    Vue localStorage (ya cookie) mein token rakhta hai, dashboard pe router.push. Aage ki har fetch header: Authorization: Bearer <token>. @jwt_required identity check (authentication). @roles_required('admin') permission check (authorization) — logged in ho, lekin allowed nahi to 403.

    Validation alag cheez hai: empty email, password 8+ — form sahi bhara hai ya nahi. Woh identity prove nahi karta.

    Logout = client token delete + login page. Server blacklist optional. Password response JSON mein kabhi mat bhejo.

    Example

    # Authentication
    @app.route('/api/login', methods=['POST'])
    def login():
        u = User.query.filter_by(email=data['email']).first()
        if not u or not check_password_hash(u.password, data['password']):
            return jsonify(msg='bad'), 401
        return jsonify(token=create_access_token(u.id), role=u.role)
    
    # baad ki APIs
    # Authorization: Bearer <token>
    if current_user.role != 'admin':
        abort(403)

    Project example: Login.vue POST /api/login → token LS → interceptor. Student token se admin route = 403. Empty form = validation, galat password = 401.

    Viva tipNetwork tab mein password body dikhega localhost pe — prod HTTPS. Response mein hash/password echo mat karo.

  6. 6
    Asked to create a lot and incr/decr lots
    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.

  7. 7
    Then delete that lot
    Times asked 1
    Official solution

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

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

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

  9. 9
    Show summary tab
    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.

  10. 10
    Create user
    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.

  11. 11
    Reserve a spot, occupy it, release it, show the time stamps in the summary
    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.

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

  13. 13
    Asked what framwork i have used
    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.

  14. 14
    How I have implemented user and admin
    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.

  15. 15
    Explain relationship between tables( i opened the report where I had table diagrams and explained it)
    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')
  16. 16
    She asked about the AI usage
    Times asked 1
    Official solution

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

  17. 17
    How is the data getting transferred from backend to frontend
    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.

  18. 18
    Asked if I have frontend and backend validation for which I said 'no but I may do it later'
    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')
  1. 1
    First the demo
    Times asked 1
    Official solution

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

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

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

  2. 2
    what is jinja templets
    Times asked 1
    Official solution

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

    Example

    {% for lot in lots %}
      <li>{{ lot.name }} — {{ lot.spots }}</li>
    {% else %}
      <p>No lots</p>
    {% endfor %}
  3. 3
    how you handle user and admin access
    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
    Explain one of your routing how its work
    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: the proctor was really nice so if you got her as your proctor then its your lucky day
  1. 1
    Project: Vehicle Parking
    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
    level1: Maam didn't ask much. told to go through the project like giving demo.
    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.

  3. 3
    Q: Backref, Lazy
    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
    Q: Orm
    Times asked 1
    Official solution

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  5. 5
    Q: explain any one 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.

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

  7. 7
    After demonstration and coding questions he told to stop sharing and started asking questions.
    Times asked 1
    Official solution

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

  8. 8
    What ever is present already in this sheet he asked all of that so study that thoroughly.
    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
    Nothing new was asked he takes time in asking questions and tells to explain models.
    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)
  10. 10
    Q: Give 20% discount to all lots
    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
    Q: On hover submit button should change red
    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: Both Proctors were calm. Sir had some voice issue, I had to repeatedly ask him to repeat questions.
  1. 1
    Asked to show Id
    Times asked 2
    Official solution

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

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

  2. 2
    Start the application
    Times asked 2
    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
    Write a route to get all the Blacklisted user.
    Times asked 2
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  4. 4
    Write a code in frontend to send name data to the backend. That's all.
    Times asked 2
    Official solution

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

Advice: She is chill. She will help you out if you get stuck anywhere.
  1. 1
    Lifecycle of vue
    Times asked 2
    Official solution

    SimpleLifecycle = component ki zindagi ke stages. API call tab jab DOM ready ho — mounted.

    created: instance bani, this data, DOM nahi. mounted/onMounted: page pe aa gaya — fetch, Chart.js, setInterval.
    updated: data change ke baad. unmounted: cleanup (clearInterval) warna memory leak.

    Dashboards onMounted isliye: canvas/API tab valid. created mein $el nahi.

    Composition: onMounted(() => {}) setup ke andar.

    Example

    export default {
      async mounted() {
        const r = await fetch('/api/venues')
        this.venues = await r.json()
      }
    }

    Project example: Venues.vue mounted fetch list. Clock component unmounted pe interval clear.

    Viva tipcreated: data setup, DOM nahi. mounted/onMounted: $el mil gaya — fetch yahi. Dashboards isliye onMounted use karti hain.

  2. 2
    Write flask code to show all users
    Times asked 2
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  1. 1
    Asked me to switch on my camera from both devices
    Times asked 2
    Official solution

    SimpleCamera thoda piche karke desk dikhao — notes/second screen mat dikhe.

  2. 2
    ID Card
    Times asked 4
    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
    Github Collaborator
    Times asked 3
    Official solution

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

    Example

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

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

  4. 4
    Asked me to download the submission from portal and start
    Times asked 2
    Official solution

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

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

  5. 5
    How is data sent from frontend to backend --> Vue -- Axios --> Flask
    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.

  6. 6
    What frameworks have i used
    Times asked 2
    Official solution

    SimpleHar lib ek line why — list 40 mat.

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

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

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

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

    Project example: requirements.txt + package.json top 6 open karke bolo.

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

  7. 7
    Where have you incorporated redis - app.py
    Times asked 2
    Official solution

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

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

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

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

    Example

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

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

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

  8. 8
    Write a function in js that takes 2 numbers and shows their sum
    Times asked 2
    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.

Advice: THAT'S IT SHE IS THE SWEETEST PROCTOR ANYONE CAN GETTTT FEEL LUCKY IF YOU GET HER AS YOUR PROCTOR 💗🤗
  1. 1
    Which frameworks did you use?
    Times asked 2
    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.

  2. 2
    What is the status code for an Internal Server Error? ### Coding Questions
    Times asked 2
    Official solution

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

  3. 3
    Write JavaScript code to return the square of 16. ### Overall Experience The viva mainly focused on: * Project understanding * Frontend-to-backend communication * Basic Vue and Flask concepts * Simple coding questions
    Times asked 2
    Official solution

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

Advice: she is very nice and supportive
  1. 1
    PRESENTATION
    Times asked 2
    Official solution

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

  2. 2
    1.Login as admin and create trek and staff
    Times asked 2
    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 }}
  3. 3
    2.Login as a staff and just show the dashboard
    Times asked 2
    Official solution

    SimpleLogin flow pehle poochta hai "tu kaun hai?", token milne ke baad har API pe wohi proof dikhate ho.

    Authentication step: Vue form email + password JSON POST karta hai. Flask user dhoondhta hai, check_password_hash se prove karta hai ki tum genuine ho. Galat 401. Sahi pe JWT + role milta hai — yeh session/token hai.

    Vue localStorage (ya cookie) mein token rakhta hai, dashboard pe router.push. Aage ki har fetch header: Authorization: Bearer <token>. @jwt_required identity check (authentication). @roles_required('admin') permission check (authorization) — logged in ho, lekin allowed nahi to 403.

    Validation alag cheez hai: empty email, password 8+ — form sahi bhara hai ya nahi. Woh identity prove nahi karta.

    Logout = client token delete + login page. Server blacklist optional. Password response JSON mein kabhi mat bhejo.

    Example

    # Authentication
    @app.route('/api/login', methods=['POST'])
    def login():
        u = User.query.filter_by(email=data['email']).first()
        if not u or not check_password_hash(u.password, data['password']):
            return jsonify(msg='bad'), 401
        return jsonify(token=create_access_token(u.id), role=u.role)
    
    # baad ki APIs
    # Authorization: Bearer <token>
    if current_user.role != 'admin':
        abort(403)

    Project example: Login.vue POST /api/login → token LS → interceptor. Student token se admin route = 403. Empty form = validation, galat password = 401.

    Viva tipNetwork tab mein password body dikhega localhost pe — prod HTTPS. Response mein hash/password echo mat karo.

  4. 4
    3.Login as user and check wheather the user can export the CSV file or not
    Times asked 2
    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
    THEORY
    Times asked 2
    Official solution

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

  6. 6
    3.what is the meaning of status code 302
    Times asked 2
    Official solution

    SimpleStatus code server ka result: 200 OK, 302 redirect, 400 bad input, 401/403 auth, 404 not found, 500 server error.

  7. 7
    4.Explain any of your vue file showing how frontend send data to backend for processing
    Times asked 2
    Official solution

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

    Progressive frontend framework. Components, reactivity, directives.

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

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

    Example

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

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

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

  8. 8
    1.Write a flask route which will take input from the frontend.
    Times asked 2
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  9. 9
    2.Write a js code to return the square of 16(don't just return the result, print the result too.She is expecting to use console.log)
    Times asked 2
    Official solution

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

Advice: Overally She is very nice and patience. Be confident.Just practice a simple backend route and js function for coding.
  1. 1
    done in 12mins
    Times asked 2
    Official solution

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

  2. 2
    id, github collab, downloaded from portal
    Times asked 2
    Official solution

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

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

  3. 3
    show where you used redis
    Times asked 2
    Official solution

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

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

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

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

    Example

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

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

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

  4. 4
    show any route
    Times asked 2
    Official solution

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

    Example

    @app.route('/lots', methods=['GET', 'POST'])
    def lots():
        if request.method == 'POST':
            ...
        return render_template('lots.html', lots=Lot.query.all())
  5. 5
    show any vue page
    Times asked 2
    Official solution

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

    Progressive frontend framework. Components, reactivity, directives.

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

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

    Example

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

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

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

  6. 6
    show database
    Times asked 2
    Official solution

    SimpleDB dikhao: SQLite browser / flask shell se tables. Users, roles, sample rows.

    Example

    flask shell
    >>> from models import User
    >>> User.query.count()
  7. 7
    show models code
    Times asked 2
    Official solution

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

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

    Example

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

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

    Example

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        email = db.Column(db.String(120), unique=True)
    
    User.query.get(5)  # SELECT ... WHERE id=5
  9. 9
    how r u separating admin and users
    Times asked 2
    Official solution

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

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

  10. 10
    what error code do u get if frontend fails to fetch backend or smtg coding:
    Times asked 2
    Official solution

    SimpleMAD1 frontend usually Jinja templates + HTML/CSS/Bootstrap (+ thoda JS). MAD2 pe Vue ho to clearly bolo.

  11. 11
    write flask code to take id as input parameter and display to frontend
    Times asked 2
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  12. 12
    write js code to display square of 2 she saw all the 3dashboards, export csv and download resume function only in the app
    Times asked 2
    Official solution

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

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

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

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

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

    Example

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

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

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

Advice: Very chill and patient, just listen to her calmly and even if u dont know the ans just try smtg, she'll correct if u go wrong
  1. 1
    saw some comments on my code and asked if I wrote it
    Times asked 2
    Official solution

    SimpleHonest raho: kitna AI help. Report mein mention policy follow. Code samajh ke explain karo — AI % se zyada understanding matter.

  2. 2
    ai% and where I used ai
    Times asked 2
    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
    why did you "import os"
    Times asked 2
    Official solution

    Simpleimport os — env vars, paths. SECRET_KEY = os.environ.get('SECRET_KEY'), file paths join.

    Example

    import os
    basedir = os.path.abspath(os.path.dirname(__file__))
  4. 4
    what are most important imports
    Times asked 2
    Official solution

    SimpleBackend libs: Flask, Flask-SQLAlchemy, Werkzeug, maybe Flask-Login/WTF, Flask-Mail/Celery (MAD2).

  5. 5
    what does jsonify do
    Times asked 2
    Official solution

    Simplejsonify Python dict/list ko JSON response + proper Content-Type deta hai.

    Example

    return jsonify(message='ok', count=3), 200
  6. 6
    what is cors and what it does
    Times asked 2
    Official solution

    SimpleDifferent origin Vue vs Flask — browser CORS check. Server Allow-Origin.

    Failed = frontend error even if curl works. Examiner curl vs browser.

    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

    from flask_cors import CORS
    CORS(app, resources={r'/api/*': {'origins': 'http://localhost:8080'}})

    Project example: Flask-CORS localhost:8080.

  7. 7
    notepad coding :
    Times asked 2
    Official solution

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

  8. 8
    if you have a student table add a column with roll number
    Times asked 2
    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
    write a javascript code which returns square of a number
    Times asked 2
    Official solution

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

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

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

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

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

    Example

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

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

  10. 10
    run app and show it's functionality
    Times asked 2
    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
  11. 11
    celery daily reminder code
    Times asked 2
    Official solution

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

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

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

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

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

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

    Example

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

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

Advice: depends upon her mood , can go really deep with theory just don't piss her off
  1. 1
    show how the frontend is sending data to backend
    Times asked 2
    Official solution

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

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

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

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

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

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

Advice: Just be confident
  1. 1
    How a company is approved, he told to show and explain code.
    Times asked 2
    Official solution

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

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

  2. 2
    Few apis he asked. Few simple questions from the project.
    Times asked 2
    Official solution

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

Advice: Stay calm. He understands our problem if any. Tell the truth. Overall really good proctor no need to worry. All the best!
  1. 1
    She asked for a detailed demo to check most of the functions. And a few more basic questions -
    Times asked 2
    Official solution

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

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

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

  2. 2
    what is celery? Where is it implemented
    Times asked 2
    Official solution

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

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

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

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

    Redis broker chahiye. Beat alag process schedule ke liye.

    Example

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

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

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

  3. 3
    jwt token
    Times asked 2
    Official solution

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

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

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

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

    Example

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

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

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

  4. 4
    v-if vs v-show
    Times asked 3
    Official solution

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

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

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

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

    Example

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

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

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

  5. 5
    what is DOM?
    Times asked 2
    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.

  6. 6
    how to write the backend function to print Hello world (just narrate the code, not write). She asked 2/3 more similar questions.
    Times asked 2
    Official solution

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

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

Advice: Just be confident about your project and go through the viva response spreadsheet. She was very nice. My virtual environment was not getting installed and the entire viva took 50 mins, but she was very patient.
  1. 1
    - make a hello world flask route
    Times asked 2
    Official solution

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

    Example

    @app.route('/ping')
    def ping():
        return jsonify(ok=True)
    
    @app.route('/even/<int:n>')
    def even(n):
        return 'even' if n % 2 == 0 else 'odd'
  2. 2
    - what is celery and redis? how do they work together
    Times asked 2
    Official solution

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

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

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

    Example

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

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

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

  3. 3
    - change a random background colour
    Times asked 2
    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.

  4. 4
    - where is vue being used?
    Times asked 2
    Official solution

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

    Progressive frontend framework. Components, reactivity, directives.

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

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

    Example

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

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

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

  5. 5
    - cache and where are the cached files located.
    Times asked 2
    Official solution

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

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

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

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

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

    Example

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

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

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

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

    SimpleGitHub repo public/private policy ke hisaab, MAD-1 collaborator add, commits dikhao.

    Repo → Settings → Collaborators → instructor added.
    Commits: git log / GitHub History — regular commits better, ek dum 1 commit suspicious.
    README + report mein AI usage likha hona chahiye agar use kiya.

  2. 2
    Confirm GitHub form submission.
    Times asked 1
    Official solution

    SimpleGitHub repo public/private policy ke hisaab, MAD-1 collaborator add, commits dikhao.

    Repo → Settings → Collaborators → instructor added.
    Commits: git log / GitHub History — regular commits better, ek dum 1 commit suspicious.
    README + report mein AI usage likha hona chahiye agar use kiya.

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

  4. 4
    Run the application.
    Times asked 8
    Official solution

    SimpleExaminer submitted ZIP chahta hai, local extra changes nahi.

    Portal se ZIP download → extract → venv → pip install -r requirements.txt → flask run / python app.py.
    Checksum maange to hash match karke dikhao. Camera/OPPE setup unke instructions.
    Linux/Mac: paths, gunicorn; Windows paths alag ho to relative paths use karo.
    Do browsers: admin + user parallel demo impressive lagta hai.

  5. 5
    Demonstrate the complete application.
    Times asked 33
    Official solution

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

    Suggested flow

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

  6. 6
    Show all core functionalities.
    Times asked 5
    Official solution

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

    Suggested flow

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

  7. 7
    Demonstrate Admin, User/Student, Company/Staff features.
    Times asked 1
    Official solution

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

    Suggested flow

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

  8. 8
    Create, update, and delete records (CRUD operations).
    Times asked 1
    Official solution

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

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

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

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

  9. 9
    Show booking history, summary/dashboard, search, profile update, approval flow, etc.
    Times asked 1
    Official solution

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

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

  10. 10
    Explain any extra features.
    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.

  11. 11
    Explain booking/timestamp calculations.
    Times asked 1
    Official solution

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

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

    Example

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

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

  12. 12
    Explain how treatment details or other project-specific workflows are implemented.
    Times asked 1
    Official solution

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

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

    Example

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

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

  13. 13
    Demonstrate duplicate application prevention.
    Times asked 1
    Official solution

    SimpleDuplicate/overbook rokne ke liye DB constraint + route check dono.

    Pehle query: Booking.query.filter_by(user_id=uid, trek_id=tid).first()
    Agar exists: flash('Already booked'); return
    Slots: if trek.available <= 0: reject else trek.available -= 1; commit
    Race condition: unique(user_id, trek_id) constraint — do tabs se double click pe bhi ek hi row.
    Blacklist: login pe is_blacklisted check.
    Active drive limit: if Company ke paas status=open drive hai to naya mat banne do.

  14. 14
    Explain the project organization/architecture.
    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.

  15. 15
    Show the main Python file (app.py).
    Times asked 1
    Official solution

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

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

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

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

  16. 16
    Show where the database is initialized.
    Times asked 1
    Official solution

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

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

  17. 17
    Explain routes/controllers.
    Times asked 1
    Official solution

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

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

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

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

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

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

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

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

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

  19. 19
    Explain imported modules and why they are used (e.g., request, url_for, session, flash, redirect).
    Times asked 1
    Official solution

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

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

    Example

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

    url_for ko function ka naam chahiye, URL path nahi.


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

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

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

  20. 20
    Explain where SQLAlchemy is initialized.
    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.

  21. 21
    Explain where Flask is initialized.
    Times asked 1
    Official solution

    Simpledb Flask-SQLAlchemy ka object hai. Models db.Model se inherit karti hain, tables db.create_all() se banti hain.

    db = SQLAlchemy()
    db.init_app(app) # factory pattern

    with app.app_context():
        db.create_all()
    
    db.Model SQLAlchemy declarative base (class). Columns se table schema.

    db properties engine/session/metadata se aati hain, Flask app config (SQLALCHEMY_DATABASE_URI) se bind.
    Admin user: create_all sirf tables; admin seed alag function mein (if not User.query.filter_by(role='admin').first(): ...).
    Live schema change: Flask-Migrate/Alembic. create_all nayi tables add kare, existing columns alter nahi karta generally.

  22. 22
    Explain code logic for a project-specific feature.
    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.

  23. 23
    What is ORM / SQLAlchemy?
    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.

  24. 24
    Explain database schema.
    Times asked 2
    Official solution

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

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

    Example skeleton

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

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

  25. 25
    Explain any two database tables.
    Times asked 1
    Official solution

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

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

    Example skeleton

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

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

  26. 26
    Explain relationships between tables.
    Times asked 3
    Official solution

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

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

    Example 1-1:

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

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

  27. 27
    Explain Primary Key and Foreign Key.
    Times asked 3
    Official solution

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

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

    Example

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

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

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

  29. 29
    Explain lazy loading.
    Times asked 3
    Official solution

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

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

    user.posts # ab query

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

  30. 30
    What frameworks/technologies did you use?
    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.

  31. 31
    Explain any template.
    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.

  32. 32
    Where have you used Jinja?
    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 %}.

  33. 33
    Have you used Template Inheritance? Where?
    Times asked 1
    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.

  34. 34
    Explain get_or_404().
    Times asked 1
    Official solution

    SimpleStatus code number batata hai request ka result.

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

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

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

  36. 36
    Explain session.
    Times asked 1
    Official solution

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

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

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

  37. 37
    Explain flash().
    Times asked 1
    Official solution

    Simpleflash() ek baar dikhne wala message session mein store karta hai — 'Login successful'.

    flash('Invalid password', 'danger')

    Template

    {% with messages = get_flashed_messages(with_categories=True) %}

    JS se auto-hide bhi kar sakte ho.
    SECRET_KEY chahiye kyunki flash session use karta hai.

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

  39. 39
    Why do we use 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.

  40. 40
    How does data move from frontend to 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.

  41. 41
    How does data move from backend to frontend?
    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().

  42. 42
    Are frontend and backend validations implemented?
    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.

  43. 43
    Write HTML <form> syntax.
    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.

  44. 44
    Explain how form submission works.
    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().

  45. 45
    Types of CSS (Inline, Internal, External).
    Times asked 3
    Official solution

    SimpleCSS 3 tarikon se lagti hai, priority Inline > Internal > External (same specificity pe).

    Inline: style='color:red' element pe. Highest priority, lekin reuse nahi. Debugging mushkil.
    Internal: <style> tag HTML head mein. Us page tak limited.
    External: style.css file. Large project ke liye best — ek jagah change, saari pages update.

    Example same button pe teeno:
    /* external */ .btn { color: blue; }
    /* internal */ .btn { color: green; }
    <!-- inline --> <button class='btn' style='color:red'> → red jeetega

    ID (#box) class (.btn) se strong, class element (button) se strong.
    !important sabko override karta hai — avoid karo.
    Large project: external CSS preferred.

  46. 46
    CSS priority/order of execution.
    Times asked 1
    Official solution

    SimpleCSS 3 tarikon se lagti hai, priority Inline > Internal > External (same specificity pe).

    Inline: style='color:red' element pe. Highest priority, lekin reuse nahi. Debugging mushkil.
    Internal: <style> tag HTML head mein. Us page tak limited.
    External: style.css file. Large project ke liye best — ek jagah change, saari pages update.

    Example same button pe teeno:
    /* external */ .btn { color: blue; }
    /* internal */ .btn { color: green; }
    <!-- inline --> <button class='btn' style='color:red'> → red jeetega

    ID (#box) class (.btn) se strong, class element (button) se strong.
    !important sabko override karta hai — avoid karo.
    Large project: external CSS preferred.

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

  48. 48
    Write a Jinja if-else statement.
    Times asked 1
    Official solution

    Simple Jinja loop + if — examiner notepad mein likhwaata hai:

    {% for t in treks %}
      <p>{{ t.name }} — {{ t.location }}</p>
    {% else %}
      <p>No treks</p>
    {% endfor %}
    
    {% if user.role == 'admin' %}
      <button>Delete</button>
    {% endif %}

    List filter: {% if x > 10 %}{{ x }}{% endif %}
    Length: {{ items|length }} Upper: {{ name|upper }}
    Table: loop ke andar <tr><td>

  49. 49
    Explain HTTP status/error codes (e.g., 500 Internal Server Error, 301, 303 See Other).
    Times asked 1
    Official solution

    SimpleStatus code number batata hai request ka result.

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

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

  50. 50
    What error code is returned for a database/server issue?
    Times asked 1
    Official solution

    SimpleStatus code number batata hai request ka result.

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

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

  51. 51
    Write a simple Flask route.
    Times asked 3
    Official solution

    Simple Hello World — notepad mein yeh likh ke run karke dikhao:

    from flask import Flask
    app = Flask(__name__)
    @app.route('/')
    def home():
        return 'Hello World'
    if __name__ == '__main__':
        app.run(debug=True)
    
    Jinja version: return render_template('hello.html', name='Shubham')

    hello.html: <h1>Hello {{ name }}</h1>
    POST-only: @app.route('/x', methods=['POST'])

  52. 52
    Write a route that returns Hello World.
    Times asked 1
    Official solution

    Simple Hello World — notepad mein yeh likh ke run karke dikhao:

    from flask import Flask
    app = Flask(__name__)
    @app.route('/')
    def home():
        return 'Hello World'
    if __name__ == '__main__':
        app.run(debug=True)
    
    Jinja version: return render_template('hello.html', name='Shubham')

    hello.html: <h1>Hello {{ name }}</h1>
    POST-only: @app.route('/x', methods=['POST'])

  53. 53
    Write a route that returns the square of a number.
    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 }}; }

  54. 54
    Write a route with URL parameters (e.g., 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.

  55. 55
    Write a route that accepts input from an HTML form and displays it.
    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())

  56. 56
    Write a route that renders a list in a template using Jinja.
    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())

  57. 57
    Write a route that passes data to a template using 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.

  58. 58
    Change the page background/UI.
    Times asked 1
    Official solution

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

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

    Example

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

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

  59. 59
    Write a route to retrieve a record from the database using an ID.
    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())

  60. 60
    How are User, Admin, Doctor/Staff roles separated in the application?
    Times asked 1
    Official solution

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

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

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

  61. 61
    What is datetime used for?
    Times asked 1
    Official solution

    Simple mix of small concepts examiners poochte hain:

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

  62. 62
    Where is request used and why?
    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.

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