Often probes theory concepts. Expects you to know and possibly modify your project code
Preparation tips
• Always read-up everything on your implementation. Anything you have added/worked on should be known thoroughly because he will ask you to tweak it in some way.
• Viva was over within 17 minutes. Seemed calm. If you dont know anything, just say right away cos u dont wanna waste his time or yours. Tell I dont know and he says its okay & moves onto another question. 8/10
• All the Best for Your Viva!
Make sure to thoroughly review your entire code and understand why you wrote every single line. The proctor will likely review your code in detail and ask random questions, so be prepared to handle any modifications or changes they might request.
Focus especially on your models, how you've defined them, and how you've implemented relationships. Pay extra attention to concepts like backref, lazy, and any custom logic you've used.
Just be confident! If there's any question you don't know the answer to, it's better to admit it honestly rather than trying to guess or over-explain unnecessarily.
And don’t worry too much—proctors usually try to wrap up the viva quickly. Best of luck, you've got this! 👍
• No normal guy
• Know your code well like what elements are used everything
• For theory questions - be really thorough on every line you write in your application. As long as you know the purpose of it, you'll be good.
For practical - if you are asked to write both front and backend, take a moment to plan which template you are going to use for this. For instance, since he asked input text field, I just reused the login form html page (changed input type to password) for the input. And then made few changes and wrote the route. But I could have done that earlier and saved some time which I could have used for writing the backend code.
• Make sure to thoroughly go through the models.py and app.py. Once hes convinced you thoroughly understand each and every word of these two files, he wont test you further by asking more theory questions. The proctor should just be convinced you have understood the backend ie the controller part and then he lets you leave early.
• Examiner is chill.
Asked if I can see matplotlib documentation he allowed.
I also asked for MDN docs of HTML I knew it was too much but I was going wrong in the <select> tag (used list instead of <option> tag) as expected he didn't allow.
Overall he was polite and gave time for answering, didn't rush.
Viva got over in 30 mins
• no need to worry just be thorough with the code you have written
Tips for this examiner: Always read-up everything on your implementation. Anything you have added/worked on should be known thoroughly because he will ask you to tweak it in some way.
Student reviews
Sheet responseMAD1
Shared viva questions from response sheet: first checksum then run the app (no demo) and just after that a coding problem where he asked ##"(you have to create a form from scratch take user name as input and have a dropdown in the form itself where you have to show the option to select all the lots which are available in the database (updated dynamically)and a search button ,On seach you have to fetch the data of all the spots which are...
Questions remembered
first checksum then run the app (no demo) and just after that a coding problem where he asked ##"(you have to create a form from scratch take user name as input and have a dropdown in the form itself where you have to show the option to select all the lots which are available in the database (updated dynamically)and a search button ,On seach you have to fetch the data of all the spots which are booked by that user on the selected lot)"## also asked for some models.py AND routes explaination Its not all but this is what i can remember
What is usermixin and why use it in Db
Explain your __init__ file (basically app setup)
What is ORM
Difference in cell pading and spacing
What is VCs and can you give an example
What will happen if your remove secret key ,which features will be effected on on app
What is metadata used for in html
Can flask return boolean
Sheet responseMAD1
no need to worry just be thorough with the code you have written
Questions remembered
-Download project from portal no checksum
-Directly asked to create a template and a route to create a dropdown having options as lot names
-Asked to show each file
-As i used wrap function from functools asked where it is implemented in code and purpose of the function
-Relation between flash msg and secret key
-Template inheritance, cellpadding and cellspacing
-Version control system
Sheet responseMAD1
Examiner is chill. Asked if I can see matplotlib documentation he allowed. I also asked for MDN docs of HTML I knew it was too much but I was going wrong in the <select> tag (used list instead of <option> tag) as expected he didn't allow. Overall he was polite and gave time for answering, didn't rush. Viva got over in 30 mins
Questions remembered
MAD1 Viva level 2
ID, checksum
As usual demo (stopped midway )
Asked to explain models.py
Code changes
- Change colors in pie chart
- New page with dropdown having all parking lots
Theory
- What is Version Control System , One example
- What is metadata in http request
- What is db.func.count (Its an aggregate function)
- Why is secret key needed in a session
- Priority order in CSS (the inline, internal, external priority thing)
- Can a flask endpoint return a boolean
AnonymousMAD1
Make sure to thoroughly go through the models.py and app.py. Once hes convinced you thoroughly understand each and every word of these two files, he wont test you further by asking more theory questions. The proctor should just be convinced you have understood the backend ie the controller part and then he lets you leave early.
Questions remembered
I began explaining the code models.py and app.py, the proctor never interrupted in between.
I explained for 25-30 mins, then the proctor asked me whats UserMixin and followingly he told me to explain any 1 create route and login/logout route.
He then gave the coding question to fetch date as given in the previous excel row for the same proctor.
Sheet responseMAD1
For theory questions - be really thorough on every line you write in your application. As long as you know the purpose of it, you'll be good.
For practical - if you are asked to write both front and backend, take a moment to plan which template you are going to use for this. For instance, since he asked input text field, I just reused the login form html page (changed input type to password) for the input. And then made few changes and wrote the route. But I could have done that earlier and saved some time which I could have used for writing the backend code.
Questions remembered
I was explaining my code in detail, he later mentioned that I had already answered many of the questions he had planned to ask in the Viva during my explanation. So he just asked me 1 coding question:
- Add a page to your application which should have a textbox input field that takes the date as input and it should return the list of parking lots that have atleast been parked in once on that given date. The list should be unique (i.e. no repetitions, even if that parking lot had 2 parkings on that date, its name should appear only once) and the list should be arranged in alphabetical order of parking lot name. Basically create both front end and backend for this. He initially gave me 10 min to do it, I was not able to complete. He gave me 10 more min, I was almost done but could not finish. But I explained the code I had written so far and also told him what remaining code I would have written if I had time. He confirmed that it was correct.
SamMAD1
Know your code well like what elements are used everything
Questions remembered
My level 2 question:
asked me the overview of the code like file structure and all
What do u understand by import flask.sqlalchemy in database.py
What is the use of secret key
How are session stored
Asked to sort the subjects
Change the subject name to uppercase
What is template inheritance
What is included and extend
How do we use put method And I think maybe more I don't remember clearly
ChinmoyMAD1
No normal guy
Questions remembered
Same as earlier vivas
New question asked between impude and extends in Jinja
Asked me to sort
Also asked me to change to upper case
Mohd AfsarMAD1
All the Best for Your Viva!
Make sure to thoroughly review your entire code and understand why you wrote every single line. The proctor will likely review your code in detail and ask random questions, so be prepared to handle any modifications or changes they might request.
Focus especially on your models, how you've defined them, and how you've implemented relationships. Pay extra attention to concepts like backref, lazy, and any custom logic you've used.
Just be confident! If there's any question you don't know the answer to, it's better to admit it honestly rather than trying to guess or over-explain unnecessarily.
And don’t worry too much—proctors usually try to wrap up the viva quickly. Best of luck, you've got this! 👍
Questions remembered
Questions I Remember From My MAD-1 Viva-2:
Provide an overview of your project structure. Explain where different folders and files are located in your directory.
Run your application now.
Show your models.py. Explain all the tables and models defined in it.
What is Enum, and what does it do?
What is backref in relationships? What is its purpose, and why did you use it?
What does lazy=True mean in relationships? Why is it written?
In the Admin model (or table), why did you use @staticmethod? What is its purpose, and where did you call this method?
Show the login form you created, including both the frontend and backend logic.
What is the name attribute in the input tag, and what does it do?
What is the difference between the name and value attributes in an input tag?
How are you storing sessions in the backend? (This led to an in-depth discussion as you implemented a different logic.)
Show how you implemented the logout functionality and explain the logic behind it.
Demonstrate your project on the web interface.
On the Admin dashboard, show how you can sort all service requests alphabetically by the customer's name.
In the frontend code, make a change such that the customer's address in the service request table appears in all capital letters.
What is template inheritance?
What is the difference between CSS spacing and CSS padding?
Have you used any APIs in your project? What is a RESTful API?
Abishek MMAD1
Viva was over within 17 minutes. Seemed calm. If you dont know anything, just say right away cos u dont wanna waste his time or yours. Tell I dont know and he says its okay & moves onto another question. 8/10
Questions remembered
Walkthrough (within 5 minutes)
Modify ur code such that all services are in Capital Letters
Modify ur code such that the price of the service is stored with decimals (after division by 1000)
What is ORM?
What is Restful API
What is .a in ur CSS code?
Difference between using # & . in CSS
What happens if your HTML files are in a different folder instead of templates?
What is template inheritance?
Difference between redirect & render_template?
What will you do to add a service ? (Show demo)
AnshulMAD1
Always read-up everything on your implementation. Anything you have added/worked on should be known thoroughly because he will ask you to tweak it in some way.
Questions remembered
- Use of a virtual env
- What is ORM and usage?
- What is MVC arch? Follow up q: What are the other types of architectures.
- What is template inheritance in Jinja?
- Use of APIs?
- Use of Javascript
- Explain CORS (since I mentioned it)
- For my summary page, he asked me to change code to swap the two graphs positions(easy)
- For a customer making a booking, my approach was choosing a date, he asked me to change code so it always defaults to take todays' date - 1 day (have to use datetime library flask along with timedelta)
- Use of ChartJS?
- How does data get sent from backend to frontend?
- Why is all html files defaulted to a 'templates' folder? If we change 'templates' to any other name, where in code do we change so it detects this folder for our html files?
he arrived at 2:32, said do OPPE setup, i was facing some issues with echoing so i wasted 5 more mins in "debugging" that
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
3
He said you can download the project
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
4
Then as I was going through my admin page, admin can see student's resume
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
5
so he stopped me and asked, how is admin able to see this resume?
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
6
I explained a lil bit
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
7
He then asked, "show me the code" i was dying inside, but managed to search through file and go to that functionality, explaiin it a lil bit confidently
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
8
then he asked me "instead of drive link, add another link"
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
9
i added, and it showed my home page ☠️ he asked why ?
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
10
I said "good question sir let's try to debug it"
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
11
and then i added a doc link, and it showed doc api,
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
12
So i explained it handled google apps properly
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
13
then he said, okay moving ahead
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
14
Then as i was showing my demo
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
15
He stopped me and asked, how much AI have you used ?
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
16
Then i said "i am using it to beautify my mail, let me show you"
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
17
He said not in dashboard, it looks like your project is heavily relied on AI
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
18
He said open the AI you used, and show me history ☠️☠️☠️🙏🏻
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
19
i used gemini nd claude, so i showed chatgpt instead
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
20
And he said, not recent history, old history.
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
21
So, i asked is there any way to search ? he said "i don't know"
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
22
he asked what is : in :href ? i said it's v-bind
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
23
he asked diff b/w v-bind and v-model
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
24
okay leave it, write a code
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
25
Then he gave me this problem:
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
26
write a component which will have an input (date) submit button when user clicks on submit button, api is sent to server, this api sends back all drives whose deadline is from that date till today should be visible, fetch on console
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
27
I took 10-12 mins to wrte this code he didn't interrupt, in the end when i was done
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
28
He HELPED me write my code better, then said okay leena we're done
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
29
Then I asked his feedback, and he said "your understanding is extremely well for coding, but it looks like your code is not written by you, maybe i am wrong, but it gives me that vibe"
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
30
Then i deflected the subject and asked how can i improve, can i show this in CV, do you think we should not use AI at all, (he said he uses AI daily when working, but advised me to rely less on it)
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
31
We talked about 10-12 mins, and then he left
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
32
He is not rude, just maintains the tension and pressure, and can ASK ANYTHING from your code. if you don't know your exact code/function he will know you're faking it.
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
33
from 2:32-3:3:18 PM
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: Strictest proctor i've ever met. Know all your functions/code. he can ask anything in theory. But his coding questions remain similar. all the best.
Write a Celery task to retrieve all appointment records from the past five days using date filtering. The task should return the results in JSON format. Additionally, implement an API endpoint that triggers the Celery task and returns the corresponding task ID.
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
3
Create a parent component that maintains a list of users containing their names and scores. Use the v-for directive to iterate over the list and pass the data to a child component using props. In the child component, display each user's details and apply conditional styling such that the score is shown in green if it is greater than 50, otherwise in red.
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
4
rest i forgot
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: idk i was alredy scared
might help -
https://docs.google.com/document/d/1-pEm7KwOly0tDNIZep06VW42AceIH41nqYc6CZSLemw/edit?usp=sharing
- I went ahead to demonstrate but he said that part you have already explained in L1 so I won't be wasting our time on that and said we'll work with the core concepts and see what you know. I said okay.
Times asked1
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
5
- Then he said to create a new file, to which I asked should I use Notepad or VS code. He said bugs would be terrible to find in the notepad so we'll stick to vs code itself. But mentioned one condition that I don't look at my project code whatsoever. To which I agreed.
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
6
- He asked CLI or CDN? I said CLI
Times asked1
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
7
- He said for store purposes what did you use? I said punia
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
8
- He then asked what are dynamic routes in Vue? I explained this via the existing code and how dynamic routing is incorporated in there.
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
9
- Then he asked me to create a vue component with just a single button called Submit, which produces a fetch request when clicked. I did so.
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
10
- He asked what are the differences between computed and watcher?
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
11
- He asked me to create a python file and add a route. I started adding app config etc to which he said no need just assume those exist and then proceed. The request was simple if someone accesses that end point they receive the today's date plus 5 days and a message. I told him I'm not familiar with syntax, to which he said I can look through documentation (no ai).
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
12
- After this he said what resources you used to do this project. I said Udemy courses and chat gpt for learning and debugging.
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
13
- He then said that's all I need to know. You may now disconnect.
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: He. doesn't like wasting time whole viva supposed to for 1 hr was concluded in 30mins. He also give me 5 minutes ultimatum to implement the code.
As soon as i joined, he started we will follow a structure - while you download and setup your app, i will keep asking the questions, will keep asking till your setup completes(took 20 mins due to this) - then the rapid fire:
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
3
Which vue version? cli or cdn? what is cli and cdn
Times asked1
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
4
Explain how flask handles the request from the moment it arrives till it sends the response
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
5
How does flask decide which function to execute(he expected wsgi to be mentioned - i didn't)
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
6
explicitly asked WSGI. if you knew why didn't you mention
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
7
rolemixin and usermixin. how is token generated? diff between fs_uniquifier and fs_uniquifier tokens
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
8
what happens to fs_uniquifier token when a user changes password
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
9
Client Side scripting
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
10
When will vue fail to detect changes in the reactive data properties
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
11
v-if and v-show(by this time he was really enjoying asking the questions)
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
12
many other questions were there
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
13
Write a component with 1 input and 1 button it accepts 1 integer in the url 'a' when the button is clicked the output is printed on the console
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
14
Write an api to execute a celery task 'viva_celery_task' and query the db for the appointments in past 'a' and return in json format
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: Just hope that you don't get this proctor. If you do, you need to have an in-depth theory knowledge as well as how to write code.
He was joking in between and not rude but kept the pressure on and asked questions in real detail. All the best if you get him
Didn't asked to show demo Coding problem : Write api route to accept two integer in the url and return the sum Then in the frontend change the code to take two input in the field and a submit button for the form, then call the backend to get the sum and show the output in the frontend. Theoretical questions :
Times asked1
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
2
call() apply() fuctions one more i don't remember that one
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: Practice basic routes problems and frontend backend integration by api calling and his previosly asked theoretical questions and you're good to go... I think He's helpful and chill
- Proctor asked me to code a celery task (of addition of 2 numbers) connected to a backend api route & then create a .vue component with a button which executes the task
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
2
- he then asked me to open postman to check the sending_email api route to check what it returns - but my redis server gave error during viva, which was running perfectly 30 mins before viva.
Times asked1
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
3
- what is typescript coercion ?
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
4
- : is a shortform for which vue property?
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
5
- what are the function of call(), apply(), bind() properties of vue JS ?
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
6
- how does a grandparent pass on data to grandchild in case of a nested route in vue router & how does a grandchild transfer data to grandparent ?
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: Please be calm & dont panic, practise all the coding questions form the spreadsheet particular to this proctor & you are good to go.
asked to code an api route in backend for getting no.of reservations made in the past x days
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
3
asked to make changes in frontend so that frontend display those reservations
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
4
(some qns which I remember) what is vue lifecyle
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: Just practice those coding questions because he asked the same questions from past 3 vivas, then learn all the mad 2 previously asked viva questions, rest leave it to god. But he is
quite impressed with coding itself so when I asked feedback he said "you have good understanding of your project and could code well even If a lengthy code is given, just brush up theory". Overall chill if you can code
Frontend what is used cli,cdn and why which api options or composition
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
2
How does vue lifecycle work how are they made
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
3
Diff between vue3 and vue2
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
4
Other were project specific so might be different according to your project or routes Best of luck you will need it
Times asked2
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: He is strictest examiner i saw in whole projects vivas, doesnot allow code changes for any error if more than 1 line, follows a defined pattern and not supportive in my opinion much , you need complete knowledge of your backend and frontend code what does code do how it does it etc. And how to maked changes if used chatgpt heavily in app then pray to god you donot get him he asks to last detail
first checksum then run the app (no demo) and just after that a coding problem where he asked ##"(you have to create a form from scratch take user name as input and have a dropdown in the form itself where you have to show the option to select all the lots which are available in the database (updated dynamically)and a search button ,On seach you have to fetch the data of all the spots which are booked by that user on the selected lot)"## also asked for some models.py AND routes explaination Its not all but this is what i can remember
Times asked1
Official solution
Simplevenv activate → dependencies → DB create/migrate → flask run. Browser pe localhost dikhao.
SimpleProject overview: problem → roles → main entities → key flows (register, book, admin approve).
Viva tip1 minute elevator pitch ready rakho, phir demo.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
5
- Why is secret key needed in a session
Times asked1
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().
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: Examiner is chill.
Asked if I can see matplotlib documentation he allowed.
I also asked for MDN docs of HTML I knew it was too much but I was going wrong in the <select> tag (used list instead of <option> tag) as expected he didn't allow.
Overall he was polite and gave time for answering, didn't rush.
Viva got over in 30 mins
I began explaining the code models.py and app.py, the proctor never interrupted in between.
Times asked1
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
2
He then gave the coding question to fetch date as given in the previous excel row for the same proctor.
Times asked1
Official solution
SimpleLive coding: notepad/editor mein chhota Flask route / Jinja loop / model field. Calm raho, run karke dikhao.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: Make sure to thoroughly go through the models.py and app.py. Once hes convinced you thoroughly understand each and every word of these two files, he wont test you further by asking more theory questions. The proctor should just be convinced you have understood the backend ie the controller part and then he lets you leave early.
I was explaining my code in detail, he later mentioned that I had already answered many of the questions he had planned to ask in the Viva during my explanation. So he just asked me 1 coding question:
Times asked1
Official solution
SimpleLive coding: notepad/editor mein chhota Flask route / Jinja loop / model field. Calm raho, run karke dikhao.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
2
- Add a page to your application which should have a textbox input field that takes the date as input and it should return the list of parking lots that have atleast been parked in once on that given date. The list should be unique (i.e. no repetitions, even if that parking lot had 2 parkings on that date, its name should appear only once) and the list should be arranged in alphabetical order of parking lot name. Basically create both front end and backend for this. He initially gave me 10 min to do it, I was not able to complete. He gave me 10 more min, I was almost done but could not finish. But I explained the code I had written so far and also told him what remaining code I would have written if I had time. He confirmed that it was correct.
Viva tipFunction signature + 3-4 important lines + edge case.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: For theory questions - be really thorough on every line you write in your application. As long as you know the purpose of it, you'll be good.
For practical - if you are asked to write both front and backend, take a moment to plan which template you are going to use for this. For instance, since he asked input text field, I just reused the login form html page (changed input type to password) for the input. And then made few changes and wrote the route. But I could have done that earlier and saved some time which I could have used for writing the backend code.
In the Admin model (or table), why did you use @staticmethod? What is its purpose, and where did you call this method?
Times asked1
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)
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
4
What is the name attribute in the input tag, and what does it do?
Times asked1
Official solution
SimpleForm user input server ko bhejti hai. Table rows/columns dikhati hai.
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).
In the frontend code, make a change such that the customer's address in the service request table appears in all capital letters.
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: All the Best for Your Viva!
Make sure to thoroughly review your entire code and understand why you wrote every single line. The proctor will likely review your code in detail and ask random questions, so be prepared to handle any modifications or changes they might request.
Focus especially on your models, how you've defined them, and how you've implemented relationships. Pay extra attention to concepts like backref, lazy, and any custom logic you've used.
Just be confident! If there's any question you don't know the answer to, it's better to admit it honestly rather than trying to guess or over-explain unnecessarily.
And don’t worry too much—proctors usually try to wrap up the viva quickly. Best of luck, you've got this! 👍
Advice: Viva was over within 17 minutes. Seemed calm. If you dont know anything, just say right away cos u dont wanna waste his time or yours. Tell I dont know and he says its okay & moves onto another question. 8/10
SimpleAPI = Application Programming Interface — do systems predefined rules se baat karti hain. REST API HTTP + JSON use karti hai.
Controller/route HTML bhi return kar sakta hai. REST API generally JSON return karti hai, frontend alag ho (Vue/Postman).
Example
@app.route('/api/users/<int:id>')
def get_user(id):
u = User.query.get_or_404(id)
return jsonify(id=u.id, name=u.name)
MAD1 HTML apps mein 'API' kabhi-kabhi routes ko hi keh dete hain. Agar Vue nahi to bolo: server-rendered Flask, JSON APIs optional.
Boolean return: technically jsonify(True) ho sakta hai, lekin meaningful JSON object better. Flask view None return kare to error.
Test: Postman se GET/POST.
Parsing: request.get_json() body se, request.args query se.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
5
- Use of Javascript
Times asked1
Official solution
SimpleJavaScript browser pe chalta hai — click, validation, Chart.js, Bootstrap modal.
Frameworks: Vue, React, Angular. MAD1 mein vanilla JS / Bootstrap JS kaafi.
Modal: popup overlay. Bootstrap: data-bs-toggle='modal' data-bs-target='#id'.
Flash hide: setTimeout se alert remove. Form submit confirm: onsubmit='return confirm(...)'.
Agar project mein JS kam hai to sach bolo, theory example do.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
6
- For a customer making a booking, my approach was choosing a date, he asked me to change code so it always defaults to take todays' date - 1 day (have to use datetime library flask along with timedelta)
Times asked1
Official solution
SimpleFlask lightweight Python web framework — routes, request/response, templates. MAD1 ka backend yahi hai.
Viva tipFunction signature + 3-4 important lines + edge case.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
9
- Why is all html files defaulted to a 'templates' folder? If we change 'templates' to any other name, where in code do we change so it detects this folder for our html files?
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: Always read-up everything on your implementation. Anything you have added/worked on should be known thoroughly because he will ask you to tweak it in some way.
Viva tipFunction signature + 3-4 important lines + edge case.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
7
He then asked, "show me the code" i was dying inside, but managed to search through file and go to that functionality, explaiin it a lil bit confidently
SimpleVue directive = special attr: v-if, v-for, v-model, v-bind, v-show — DOM ko declarative control.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
23
he asked diff b/w v-bind and v-model
Times asked2
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)
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
26
write a component which will have an input (date) submit button when user clicks on submit button, api is sent to server, this api sends back all drives whose deadline is from that date till today should be visible, fetch on console
@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'
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
29
Then I asked his feedback, and he said "your understanding is extremely well for coding, but it looks like your code is not written by you, maybe i am wrong, but it gives me that vibe"
Times asked2
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
30
Then i deflected the subject and asked how can i improve, can i show this in CV, do you think we should not use AI at all, (he said he uses AI daily when working, but advised me to rely less on it)
Times asked2
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
31
We talked about 10-12 mins, and then he left
Times asked2
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
32
He is not rude, just maintains the tension and pressure, and can ASK ANYTHING from your code. if you don't know your exact code/function he will know you're faking it.
Times asked2
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: Strictest proctor i've ever met. Know all your functions/code. he can ask anything in theory. But his coding questions remain similar. all the best.
Viva tipFunction signature + 3-4 important lines + edge case.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
2
Write a Celery task to retrieve all appointment records from the past five days using date filtering. The task should return the results in JSON format. Additionally, implement an API endpoint that triggers the Celery task and returns the corresponding task ID.
Times asked2
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
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
3
Create a parent component that maintains a list of users containing their names and scores. Use the v-for directive to iterate over the list and pass the data to a child component using props. In the child component, display each user's details and apply conditional styling such that the score is shown in green if it is greater than 50, otherwise in red.
Times asked2
Official solution
SimpleComponent + route ya template v-if/v-for/fetch. :key dena.
Clock interval + clear. Add numbers v-model.number. New page routes.js.
Examiner 2 cheezein: simple desi line + tumhare project ki exact file.
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
3
- I downloaded the project and set it up
Times asked2
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
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
4
- Then he said to create a new file, to which I asked should I use Notepad or VS code. He said bugs would be terrible to find in the notepad so we'll stick to vs code itself. But mentioned one condition that I don't look at my project code whatsoever. To which I agreed.
Times asked2
Official solution
SimpleUngli rakhe to 4-line formula — panic ki jagah structure.
- He asked me to create a python file and add a route. I started adding app config etc to which he said no need just assume those exist and then proceed. The request was simple if someone accesses that end point they receive the today's date plus 5 days and a message. I told him I'm not familiar with syntax, to which he said I can look through documentation (no ai).
Times asked2
Official solution
SimpleServer-Sent Events: server → browser one-way stream (text/event-stream). WebSocket full duplex hai; SSE simpler notifications ke liye.
Example
# client
const es = new EventSource('/stream');
es.onmessage = (e) => console.log(e.data);
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
12
- After this he said what resources you used to do this project. I said Udemy courses and chat gpt for learning and debugging.
- He then said that's all I need to know. You may now disconnect.
Times asked2
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: He. doesn't like wasting time whole viva supposed to for 1 hr was concluded in 30mins. He also give me 5 minutes ultimatum to implement the code.
As soon as i joined, he started we will follow a structure - while you download and setup your app, i will keep asking the questions, will keep asking till your setup completes(took 20 mins due to this) - then the rapid fire:
Times asked2
Official solution
SimpleJOIN related tables ek result mein. Inner = match only; left = left side sab + match.
Project example: resources.py new Resource. Test Thunder. Optional Vue fetch.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
18
Write an api to execute a celery task 'viva_celery_task' and query the db for the appointments in past 'a' and return in json format
Times asked2
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
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: Just hope that you don't get this proctor. If you do, you need to have an in-depth theory knowledge as well as how to write code.
He was joking in between and not rude but kept the pressure on and asked questions in real detail. All the best if you get him
call() apply() fuctions one more i don't remember that one
Times asked2
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: Practice basic routes problems and frontend backend integration by api calling and his previosly asked theoretical questions and you're good to go... I think He's helpful and chill
- Proctor asked me to code a celery task (of addition of 2 numbers) connected to a backend api route & then create a .vue component with a button which executes the task
Times asked2
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.
Viva tip3+ level props drilling se better store. Navbar user info store se lo.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
9
- what is the difference between @cache.cached & @cache.memoize ?
Times asked1
Official solution
Simplecached poori view ko yaad rakhta hai, memoize function ke arguments ke hisaab se.
@cache.cached URL / key_prefix (optional query_string) se key banata hai — list endpoints ke liye. @cache.memoize arguments se key banata hai — get_user(5) aur get_user(9) alag cache.
Prefix clash se galat data mil sakta hai. Dono ka timeout same idea hai. Invalidation: delete_memoized(fn, args) vs cache.delete(prefix).
Project example: Venues list = cached. User-wise report function = memoize(user_id).
Viva tipList endpoint: cached. Function with arguments: memoize. Prefix alag rakho warna clash.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
10
- Redis is a message broker between which 2 entities ?
Times asked1
Official solution
SimpleRedis. Alternative RabbitMQ. Course Redis because cache bhi.
Between Flask client and Celery worker.
Celery Python ka distributed task queue — HTTP request ko 10s email/CSV ke liye mat rokna.
Flow: Flask .delay() → Redis broker → Worker execute. Beat alag process hai (clock): crontab padhke due time pe queue mein daalta hai. Beat khud mail nahi bhejta; Worker haath hai.
MAD2 typical: daily reminder (Beat), monthly report (Beat), user Export CSV (button, Beat nahi). JS async/await browser event loop hai, Celery server-side process — mix mat karo.
Demo: tin terminals — redis-server, celery worker, celery beat — plus Flask. MailHog :8025 inbox. Result backend se task SUCCESS poll optional.
User 'Export' click → Celery task queue → Redis message → worker CSV banaata hai → user baad mein download.
Saath isliye: Celery ko broker chahiye, Redis tez in-memory. MAD2 topic zyada, MAD1 mein optional.
Priority: task queues/routing. Caching: Redis mein key-value, DB hits kam.
Pub/Sub: publisher channel pe message, subscribers sunte hain — Redis yeh bhi karta hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
6
what is promise in javaScript
Times asked1
Official solution
SimpleAJAX page reload ke bina server se data laata hai. Aaj kal fetch() + Promises.
fetch('/api/users').then(r => r.json()).then(data => { ... })
Promise: future value (pending/fulfilled/rejected). fetch Promise return karta hai.
SPA (Vue): ek HTML, baaki routes JS se, partial update. MAD1 generally full page render (Jinja) — submit pe poora refresh.
async/await Promise ka clean syntax.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: Just practice those coding questions because he asked the same questions from past 3 vivas, then learn all the mad 2 previously asked viva questions, rest leave it to god. But he is
quite impressed with coding itself so when I asked feedback he said "you have good understanding of your project and could code well even If a lengthy code is given, just brush up theory". Overall chill if you can code
computed cache + reactive derive (filtered list). watch side-effect (query change pe API). methods events. ref() primitive, reactive() object. Vuex/Pinia global store; localStorage persist, store nahi.
SFC: template + script + style ek .vue file. Parent-child exam favourite: list parent, row child :item + @delete.
Example
watch: {
query(newQ) { this.fetchSearch(newQ) }
}
Project example: q watch → fetchSearch. remainingSeats computed from capacity-booked.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
8
Then from backend he asked about flasksecurity,userdatastore,rbac,made changes to code like change chart position, apply filters in vue frontend,in backend changes in routes etc
Times asked1
Official solution
SimpleRBAC = Role Based Access Control. Roles (admin/user) se permissions milti hain, har user pe alag list nahi.
Example
if current_user.role != 'admin':
flash('Not allowed')
return redirect(url_for('user.home'))
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
9
Other were project specific so might be different according to your project or routes Best of luck you will need it
Times asked2
Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Advice: He is strictest examiner i saw in whole projects vivas, doesnot allow code changes for any error if more than 1 line, follows a defined pattern and not supportive in my opinion much , you need complete knowledge of your backend and frontend code what does code do how it does it etc. And how to maked changes if used chatgpt heavily in app then pray to god you donot get him he asks to last detail
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)
User 'Export' click → Celery task queue → Redis message → worker CSV banaata hai → user baad mein download.
Saath isliye: Celery ko broker chahiye, Redis tez in-memory. MAD2 topic zyada, MAD1 mein optional.
Priority: task queues/routing. Caching: Redis mein key-value, DB hits kam.
Pub/Sub: publisher channel pe message, subscribers sunte hain — Redis yeh bhi karta hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
6
What is benefit of caching
Times asked1
Official solution
SimpleCache isliye taaki 100 users same dashboard pe DB ko 100 baar na maror dein.
Problem: repeated reads, slow page, extra load. Cache seconds ke liye snapshot deta hai.
Nahi use karna: har second badalne wala live stock, user-private secret data bina soch ke (key mein user_id hona chahiye).
Memoization caching ka subset hai (function args). HTTP 304 / browser cache alag layer.
Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.
MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.
Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.
Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.
Simplemodels.py tables ki blueprint. Har class ek table, har Column ek field.
PK id, FK dusri table, relationship dono taraf, serialize() JSON (password mat).
app factory db.init. resources APIs use models.
Examiner random line: type, nullable, unique, ondelete.
Suggested flow1) Har table → class
2) PK id
3) FK
4) relationship()
5) serialize()
Example
class Booking(db.Model):
id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
user = db.relationship('User', back_populates='bookings')
Project example: User, Role, Venue/Show/Booking (ya Drive/Application). Draw 1-M.
Viva tipExaminer random line poochhe: column type, FK, constraint. Draw 1-M / M-M on paper mentally.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
3
Explain how Flask handles a request from arrival to response.
Times asked1
Official solution
SimpleUngli rakhe to 4-line formula — panic ki jagah structure.
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: v-for reservations.
Project example: v-for reservations.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
14
Create a Celery task (e.g., addition of two numbers) and expose it through an API.
Times asked1
Official solution
Simple@celery.task add(a,b). Route delay return task_id. Worker must run.
Live coding. app context if DB.
Celery Python ka distributed task queue — HTTP request ko 10s email/CSV ke liye mat rokna.
Flow: Flask .delay() → Redis broker → Worker execute. Beat alag process hai (clock): crontab padhke due time pe queue mein daalta hai. Beat khud mail nahi bhejta; Worker haath hai.
MAD2 typical: daily reminder (Beat), monthly report (Beat), user Export CSV (button, Beat nahi). JS async/await browser event loop hai, Celery server-side process — mix mat karo.
Demo: tin terminals — redis-server, celery worker, celery beat — plus Flask. MailHog :8025 inbox. Result backend se task SUCCESS poll optional.
Example
@celery.task
def add(a, b):
return a + b
# return jsonify(task_id=add.delay(2,3).id)
Project example: New task ping or add. Postman.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
15
Build a Vue component that calls the API and displays the result.
Line pe ungli: input kahan, kaunsa check, query/cache/task, JSON/UI. Copilot band. Jo nahi kiya honestly bolo + kaise add karte.
Project example: Echo.vue.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
18
Create a Celery task that retrieves records from the last 5 days, expose it via an API, and return the task ID.
Times asked1
Official solution
Simple@celery.task add(a,b). Route delay return task_id. Worker must run.
Live coding. app context if DB.
Celery Python ka distributed task queue — HTTP request ko 10s email/CSV ke liye mat rokna.
Flow: Flask .delay() → Redis broker → Worker execute. Beat alag process hai (clock): crontab padhke due time pe queue mein daalta hai. Beat khud mail nahi bhejta; Worker haath hai.
MAD2 typical: daily reminder (Beat), monthly report (Beat), user Export CSV (button, Beat nahi). JS async/await browser event loop hai, Celery server-side process — mix mat karo.
Demo: tin terminals — redis-server, celery worker, celery beat — plus Flask. MailHog :8025 inbox. Result backend se task SUCCESS poll optional.
Example
@celery.task
def add(a, b):
return a + b
# return jsonify(task_id=add.delay(2,3).id)
Project example: New task ping or add. Postman.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
19
Build a parent-child Vue application using:
v-for
Props
Conditional styling based on score.
Times asked1
Official solution
SimpleParent v-for, child props score, :style color if score>x. Build parent-child v-for props conditional styling score.
key.
Examiner 2 cheezein: simple desi line + tumhare project ki exact file.
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: npm install. scripts dev/build.
Viva tipnode_modules venv ke andar nahi — project root pe. Python venv alag, npm alag.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
24
What are Vue lifecycle hooks?
Times asked11
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.
4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.
Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.
Example
// local
data() { return { q: '' } }
// global
this.$store.state.user
Project example: Login.vue local form fields. this.$store.state.user Navbar.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
48
Explain RBAC implementation.
Times asked2
Official solution
SimpleRoles table, assignment, decorator, UI meta. Example admin vs user endpoint.
Admin authenticated AND authorized. User authenticated not authorized admin.
Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"
Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).
MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX — asli deny backend pe.
Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.
Project example: roles_required admin stats. User 403 Postman.
4-line formula: input kahan se aaya, auth/validation kaunsa, DB ya cache ya Celery, kya return.
Related mix mat karo — cache ≠ Celery, authentication ≠ authorization, v-if ≠ v-show, Beat ≠ Worker. Follow-up ke liye ek difference ready rakho.
Project example: class User(db.Model, UserMixin).
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
50
How is the authentication token generated?
Times asked2
Official solution
SimpleLogin success pe server secret se sign. create_access_token / security token.
Show login route return. DevTools response JSON. jwt.io payload.
Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"
Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).
MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX — asli deny backend pe.
Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.
Difference between fs_uniquifier and authentication tokens.
Times asked1
Official solution
Simplefs_uniquifier session invalidation field. JWT signed claims. Related not same.
Don't say they are equal.
Authentication poochta hai "tu kaun hai?", Authorization poochta hai "tujhe yeh kaam karne ki permission hai?"
Authentication: login. Username + password hash check. Success pe JWT/session. Galat credentials = 401.
Authorization: uske baad role. Admin hi venue/lot delete kare, student nahi = 403 (logged in ho, allowed nahi).
MAD2: POST /api/login = authentication. @jwt_required identity. @roles_required('admin') ya Vue v-if="isAdmin" = authorization. Frontend hide sirf UX — asli deny backend pe.
Validation alag: form sahi bhara (email format, age 18+). Woh identity prove nahi karta. Password store hash (Werkzeug), JWT payload padha ja sakta hai isliye secret mat daalo.
Project example: Both in project or one. Clarify.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
52
What happens to the fs_uniquifier token after a password change?
Times asked1
Official solution
SimpleNew uniquifier old sessions die. JWT: exp or blacklist/jti.
Viva tipWorker + Redis bina Beat ke user-triggered chalega. Scheduled jobs ke liye Beat bhi chahiye.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
54
What is Redis?
Times asked21
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.
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
55
Difference between @cache.cached and @cache.memoize.
Times asked1
Official solution
Simplecached poori view ko yaad rakhta hai, memoize function ke arguments ke hisaab se.
@cache.cached URL / key_prefix (optional query_string) se key banata hai — list endpoints ke liye. @cache.memoize arguments se key banata hai — get_user(5) aur get_user(9) alag cache.
Prefix clash se galat data mil sakta hai. Dono ka timeout same idea hai. Invalidation: delete_memoized(fn, args) vs cache.delete(prefix).
Project example: Venues list = cached. User-wise report function = memoize(user_id).
Viva tipList endpoint: cached. Function with arguments: memoize. Prefix alag rakho warna clash.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
56
What is the benefit of caching?
Times asked1
Official solution
SimpleCache isliye taaki 100 users same dashboard pe DB ko 100 baar na maror dein.
Problem: repeated reads, slow page, extra load. Cache seconds ke liye snapshot deta hai.
Nahi use karna: har second badalne wala live stock, user-private secret data bina soch ke (key mein user_id hona chahiye).
Memoization caching ka subset hai (function args). HTTP 304 / browser cache alag layer.
Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.
MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.
Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.
Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
61
What is CSRF?
Times asked5
Official solution
SimpleCSRF = dusri site tumhare cookie se request chalwa de jab tum logged in ho.
Session+cookie auto-send → CSRF token chahiye.
JWT Authorization header browser automatically dusri site se nahi lagata — kam risk (unless cookie JWT).
SameSite cookies help.
Browser + API ke beech extra darwaze: CORS origin allow, HTTPS encrypt transit, CSRF cookie-auto-send attack, XSS HTML inject, SQL injection raw query.
MAD2 SPA: Vue :8080 Flask :5000 → Flask-CORS. JWT localStorage XSS se chori ho sakta — v-html user input pe avoid. Password Network tab localhost pe dikhega; prod HTTPS, response mein password echo nahi.
401 unauthenticated, 403 unauthorized, 400 validation. Hash one-way — SHA decrypt nahi hota. Secret key .env, GitHub pe nahi.
Project example: Token header APIs. Cookie session nahi to CSRF kam. Phir bhi CORS tight.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
62
What is SMTP?
Times asked3
Official solution
SimpleSMTP = email bhejne ka protocol, jaise HTTP web ka.
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
2
Run the application.
Times asked8
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.
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.
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.
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
8
Explain the Login and Logout routes.
Times asked1
Official solution
SimpleLogin GET form dikhata hai, POST credentials check karke session set karta hai.
@app.route('/login', methods=['GET','POST'])
def login():
if request.method == 'POST':
u = User.query.filter_by(email=request.form.get('email')).first()
if u and check_password_hash(u.password, request.form.get('password')):
if getattr(u, 'blacklisted', False):
flash('Blocked'); return redirect(url_for('login'))
session['user_id'] = u.id
session['role'] = u.role
return redirect(url_for('dashboard'))
flash('Invalid')
return render_template('login.html')
Logout: session.clear(); redirect login. Incognito alag cookie jar — logged out dikhega.
Single login page: role se redirect alag dashboards.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
9
Show the login form (frontend and backend).
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
10
Show all Jinja templates/files.
Times asked1
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 %}.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
11
Swap the positions of two graphs on the summary page.
Times asked1
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.
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'))
Change booking date to default to today - 1 day using datetime and timedelta.
Times asked1
Official solution
Simpledatetime date/time, timedelta farq (1 day pehle).
from datetime import datetime, timedelta, date
default = date.today() - timedelta(days=1)
Booking date past na ho: if d < date.today(): flash('Past date nahi')
UTC: datetime.utcnow default= ke liye.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
13
Convert all service names to uppercase.
Times asked1
Official solution
Yeh list filter/sort/display task hai. Query badlo, template same rakh sakte ho.
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'))
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.
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.
Create a form with:
Username input.
Dynamically populated parking lot dropdown.
Search button.
Display all spots booked by that user for the selected parking lot.
Times asked1
Official solution
Yeh live UI/CSS change hai. Examiner jo element bole uski CSS turant badlo.
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
24
What ORM have you used?
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
25
What is MVC Architecture?
Times asked2
Official solution
SimpleMVC = Model-View-Controller. Code ko 3 hisson mein baant ta hai taaki mix na ho.
Model: data + DB. models.py — User, Trek, Booking classes.
View: jo user dekhta hai. templates/*.html + Jinja.
Controller: beech ka logic. routes / app.py — request lo, model se data, view ko do.
Example flow (register):
Browser form POST → Controller register() → User model save → redirect → View dashboard.html
Draw: Browser → Controller → Model → DB, phir Controller → View → Browser.
ORM na ho to bhi MVC ho sakta hai — Model raw SQL functions ho sakte hain. Structure matter karta hai, library nahi.
MVP/MVVM doosri architectures hain; MAD1 mein MVC expected hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
26
What other software architectures do you know?
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
27
What is app = Flask(__name__)? Why is __name__ used?
Times asked1
Official solution
Simpleapp = Flask(__name__) app banata hai; if __name__ == '__main__' tabhi server start jab file directly run ho.
app = Flask(__name__)
if __name__ == '__main__':
app.run(debug=True, port=5000)
__name__ module ka naam. Direct run pe '__main__', import pe filename. Import karoge to server auto-start nahi — tests/blueprints ke liye zaroori.
debug=True: auto-reload + debugger. Production mein band rakho (security).
Port: app.run(port=8000) ya flask run --port 8000. Default 5000. Haan, change ho sakta hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
28
What is app.config["SECRET_KEY"]? Why is it needed?
Times asked1
Official solution
SimpleSECRET_KEY Flask ka secret jisse session cookies sign/encrypt hoti hain.
Iske bina session/flash unreliable ya insecure. Key leak = attacker session forge kar sakta hai.
Hardcode mat karo production mein — .env / environment variable. Flash messages bhi session use karti hain, isliye SECRET_KEY se related hain.
Hataane pe session kaam nahi / warning. Change karne pe purane sessions invalid.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
29
What happens if the Secret Key is removed?
Times asked1
Official solution
SimpleSECRET_KEY Flask ka secret jisse session cookies sign/encrypt hoti hain.
Iske bina session/flash unreliable ya insecure. Key leak = attacker session forge kar sakta hai.
Hardcode mat karo production mein — .env / environment variable. Flash messages bhi session use karti hain, isliye SECRET_KEY se related hain.
Hataane pe session kaam nahi / warning. Change karne pe purane sessions invalid.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
30
What is app.app_context().push()? Why is it used?
Times asked2
Official solution
SimpleApplication context app-level data (config, db), Request context ek HTTP request (request, session).
Request ke andar Flask khud context push karta hai. Scripts/shell mein db query ke liye:
with app.app_context():
User.query.all()
app.app_context().push() same, lekin with better (cleanup).
current_app proxy current Flask app ki taraf. Factory pattern mein import app cycle avoid.
Request context ke bahar request.form error dega.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
31
How are sessions stored?
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
32
How does backend send data to the frontend?
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
33
Can a Flask endpoint return a Boolean?
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
34
Explain flask_sqlalchemy import.
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
35
Explain @staticmethod and where you used it.
Times asked1
Official solution
SimpleOOP = objects + classes. Inheritance child parent ke fields/methods reuse karta hai.
class User(db.Model): ...
class Admin(User): ... # model inheritance (joiner ya single table)
Models inherit db.Model se taaki query/columns milen.
@staticmethod: self nahi, utility. isinstance(obj, User) type check.
SimpleCascade parent ke saath child pe automatic action (generally delete).
Company delete → uski drives bhi delete, warna orphan rows / FK error.
SQLAlchemy: db.relationship('Drive', cascade='all, delete-orphan', backref='company')
SQL: ForeignKey(..., ondelete='CASCADE')
Cascade sirf delete nahi: save-update, merge, refresh-expire, expunge, delete-orphan.
Cascade Update: parent PK change to child FK update (rare, PK mat badlo).
Parent delete jab children active hon: constraint error, ya cascade se children gayab, ya pehle children handle karo — design choice examiner poochta hai.
CSS cascading alag topic hai (styles inherit/override).
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
40
Can Cascade be used only for Delete?
Times asked1
Official solution
SimpleCascade parent ke saath child pe automatic action (generally delete).
Company delete → uski drives bhi delete, warna orphan rows / FK error.
SQLAlchemy: db.relationship('Drive', cascade='all, delete-orphan', backref='company')
SQL: ForeignKey(..., ondelete='CASCADE')
Cascade sirf delete nahi: save-update, merge, refresh-expire, expunge, delete-orphan.
Cascade Update: parent PK change to child FK update (rare, PK mat badlo).
Parent delete jab children active hon: constraint error, ya cascade se children gayab, ya pehle children handle karo — design choice examiner poochta hai.
CSS cascading alag topic hai (styles inherit/override).
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
41
What is backref?
Times asked12
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
42
What does lazy=True mean?
Times asked1
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).
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
43
What is Enum?
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
44
Is your database normalized?
Times asked3
Official solution
SimpleNormalization data ko split karke redundancy aur update-anomalies kam karti hai.
1NF: atomic values, repeating groups nahi (comma-separated skills mat rakho).
2NF: 1NF + non-key columns poori PK pe depend (composite keys pe).
3NF: 2NF + non-key columns ek doosre pe depend na hon (city→state alag table).
Examplehar booking mein user ka poora address copy vs user_id se User table.
MAD1 project generally 3NF ke kareeb. Higher NF (BCNF) theoretically, practical apps denormalize speed ke liye (cached counts).
Leaderboard: alag table better agar history/rank chahiye; sirf count hai to query se bhi ho sakta hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
45
Explain different Normal Forms.
Times asked1
Official solution
SimpleNormalization data ko split karke redundancy aur update-anomalies kam karti hai.
1NF: atomic values, repeating groups nahi (comma-separated skills mat rakho).
2NF: 1NF + non-key columns poori PK pe depend (composite keys pe).
3NF: 2NF + non-key columns ek doosre pe depend na hon (city→state alag table).
Examplehar booking mein user ka poora address copy vs user_id se User table.
MAD1 project generally 3NF ke kareeb. Higher NF (BCNF) theoretically, practical apps denormalize speed ke liye (cached counts).
Leaderboard: alag table better agar history/rank chahiye; sirf count hai to query se bhi ho sakta hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
46
What is db.func.count()?
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
47
What is an API?
Times asked8
Official solution
SimpleAPI = Application Programming Interface — do systems predefined rules se baat karti hain. REST API HTTP + JSON use karti hai.
Controller/route HTML bhi return kar sakta hai. REST API generally JSON return karti hai, frontend alag ho (Vue/Postman).
Example
@app.route('/api/users/<int:id>')
def get_user(id):
u = User.query.get_or_404(id)
return jsonify(id=u.id, name=u.name)
MAD1 HTML apps mein 'API' kabhi-kabhi routes ko hi keh dete hain. Agar Vue nahi to bolo: server-rendered Flask, JSON APIs optional.
Boolean return: technically jsonify(True) ho sakta hai, lekin meaningful JSON object better. Flask view None return kare to error.
Test: Postman se GET/POST.
Parsing: request.get_json() body se, request.args query se.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
48
What is a RESTful API?
Times asked4
Official solution
SimpleAPI = Application Programming Interface — do systems predefined rules se baat karti hain. REST API HTTP + JSON use karti hai.
Controller/route HTML bhi return kar sakta hai. REST API generally JSON return karti hai, frontend alag ho (Vue/Postman).
Example
@app.route('/api/users/<int:id>')
def get_user(id):
u = User.query.get_or_404(id)
return jsonify(id=u.id, name=u.name)
MAD1 HTML apps mein 'API' kabhi-kabhi routes ko hi keh dete hain. Agar Vue nahi to bolo: server-rendered Flask, JSON APIs optional.
Boolean return: technically jsonify(True) ho sakta hai, lekin meaningful JSON object better. Flask view None return kare to error.
Test: Postman se GET/POST.
Parsing: request.get_json() body se, request.args query se.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
49
Have you used any APIs?
Times asked2
Official solution
SimpleAPI = Application Programming Interface — do systems predefined rules se baat karti hain. REST API HTTP + JSON use karti hai.
Controller/route HTML bhi return kar sakta hai. REST API generally JSON return karti hai, frontend alag ho (Vue/Postman).
Example
@app.route('/api/users/<int:id>')
def get_user(id):
u = User.query.get_or_404(id)
return jsonify(id=u.id, name=u.name)
MAD1 HTML apps mein 'API' kabhi-kabhi routes ko hi keh dete hain. Agar Vue nahi to bolo: server-rendered Flask, JSON APIs optional.
Boolean return: technically jsonify(True) ho sakta hai, lekin meaningful JSON object better. Flask view None return kare to error.
Test: Postman se GET/POST.
Parsing: request.get_json() body se, request.args query se.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
50
How do you use the PUT method?
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
51
Explain CORS.
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
52
Why did you use Jinja?
Times asked2
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 %}.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
53
What is Template Inheritance?
Times asked10
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
54
Difference between {% include %} and {% extends %}.
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
55
Why are HTML files kept inside the templates folder?
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
56
What changes are required if the folder name is changed?
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
57
Difference between id (#) and class (.) selectors.
Times asked1
Official solution
Simple# ID selector hai (ek unique element), . class selector hai (kai elements).
ID page mein unique hona chahiye. Class reuse hoti hai — saare buttons .btn.
CSS specificity: ID > class > element. Isliye # wala style . wale ko haarata hai.
HTML: id JavaScript/getElementById ke liye, class styling groups ke liye.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
58
What does .class mean in CSS?
Times asked1
Official solution
Simple# ID selector hai (ek unique element), . class selector hai (kai elements).
ID page mein unique hona chahiye. Class reuse hoti hai — saare buttons .btn.
CSS specificity: ID > class > element. Isliye # wala style . wale ko haarata hai.
HTML: id JavaScript/getElementById ke liye, class styling groups ke liye.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
59
Difference between CSS spacing and padding.
Times asked1
Official solution
Yeh live UI/CSS change hai. Examiner jo element bole uski CSS turant badlo.
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
62
What is the name attribute in an HTML input?
Times asked1
Official solution
SimpleForm user input server ko bhejti hai. Table rows/columns dikhati hai.
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).
Pehle concept A ek line, phir B ek line, phir table-jaisa farq (input/output/side-effect).
Example hamesha MAD1 se: GET search page, POST register, PUT/PATCH API update, session vs cookie login.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
64
Explain GET vs POST using an anchor tag.
Times asked1
Official solution
SimpleGET data mangta hai (read), POST data bhejta hai (create/submit).
GETURL mein dikhta hai, bookmark ho sakta hai, browser back/refresh safe hai, data URL query mein jaata hai. Search, page open, login form dikhana.
POSTbody mein data jaata hai, URL mein password nahi dikhta, refresh pe dubara submit ho sakta hai. Login, register, form save.
Example
# page dikhana
@app.route('/login', methods=['GET', 'POST'])
def login():
if request.method == 'GET':
return render_template('login.html')
# POST: form submit
email = request.form.get('email')
...
GET se theoretically data bhej sakte ho (?q=flask), lekin create/update ke liye nahi use karna — data log/history mein save ho jaata hai, length limit hoti hai.
HTML form default GET hota hai; method='POST' likhna zaroori hai login/register pe.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
65
What is Version Control System? Give an example.
Times asked1
Official solution
SimpleVCS history track karta hai, Git ek distributed VCS hai.
VCS: kaun kab kya change kiya, rollback, branches. Example: Git, SVN.
Git distributed: har developer ke paas poori copy (commits) hoti hai. Central GitHub sirf remote hosting hai, lekin Git ka model distributed hai.
SVN centralized: bina server ke history nahi.
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
67
What is Metadata in HTML?
Times asked1
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.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
68
Difference between redirect() and render_template().
Times asked2
Official solution
Simplerender_template HTML page bana ke turant dikhata hai, redirect user ko doosre URL pe bhej deta hai.
render_template('home.html', user=user) → server template fill karke 200 response deta hai. URL same rehta hai.
redirect(url_for('dashboard')) → 302 response, browser naya GET karta hai. URL change ho jaata hai.
Examplelogin POST successful hone ke baad render_template mat use karo, warna refresh pe form dubara submit ho jaayega.
Iske bina session/flash unreliable ya insecure. Key leak = attacker session forge kar sakta hai.
Hardcode mat karo production mein — .env / environment variable. Flash messages bhi session use karti hain, isliye SECRET_KEY se related hain.
Hataane pe session kaam nahi / warning. Change karne pe purane sessions invalid.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
Tag summary
No tags.
Video explanation
Maintaine By Lazy IITians Team + IITM BS students Regualr for More data you have