memory_based_questions
memory_based_questions
Case Study: WasteClassifier — Smart City Waste
Recognition Using CNN
In the fast-growing Smart City of Ecotown, waste management was becoming a big
challenge. The city wanted to promote recycling but faced one major problem —
people were often confused about where to throw waste items like bottles, plastic
wrappers, food waste, and cans.
The input to the model was a 128x128 RGB image of the waste item captured by a
small camera. The first convolution layer of his model used 32 filters of size 3x3,
followed by pooling layers to reduce size, and ReLU activations to introduce
non-linearity. The output layer used Softmax activation to predict the probability of
each class.
The model had about 896 parameters in the first Conv Layer and used a Flatten layer
before the final output.
During testing, Rehan realized that the model worked great on training images but
not so well on real-world images, indicating overfitting. To fix this, he used Data
Augmentation and Transfer Learning techniques to improve performance on unseen
data.
Rehan’s WasteClassifier model is now a part of Ecotown’s smart waste management
system, making the city cleaner and greener.
a) 64x64x1
b) 128x128x3
c) 128x128x1
d) 256x256x3
a) 3
b) 5
c) 2
d) 10
a) Softmax
b) ReLU
c) Sigmoid
d) Linear
a) Underfitting
b) Overfitting
c) Data Leakage
d) Transfer Learning
a) First Layer
b) Hidden Layer
c) Last Layer
d) Pooling Layer
a) Tabular Data
b) Image Data
c) Text Data
d) Audio Data
Whenever the drone faced strong wind, DroneNav calculated the Eigenvalues of the
environment force matrix to detect instability.
Rotation of 90°, 180°, or any arbitrary angle was handled by multiplying the drone's
direction vector with the appropriate Rotation Matrix.
a) Determinant is 1
b) Orthogonal matrix
c) Non-invertible
d) Used for scaling
a) Changing direction
b) Moving to new coordinates
c) Changing speed
d) Rotating along Z-axis
a) Detecting instability
b) Reducing matrix dimension
c) Finding rotation angles
d) Identifying scaling factors
a) [[2 , 0]
[0 , 3]]
b) [[0 , -1]
[1 , 0]]
c) [[k , 0]
[0 , k]]
d) [[1 , 0]
[1 , 1]]
Q5. Which operations involve matrices in drone movement?
a) Rotation
b) Translation
c) Speed Control
d) Signal Transmission
Bonus question -
Q11.
D=[[4 , 0]
[0 , 9]]
In the city of Healthopolis, doctors were facing a serious challenge — patients were
coming in with mixed symptoms of different diseases like Diabetes, Heart Problems,
and Thyroid Disorders. The traditional diagnosis method required multiple tests and
days of waiting for accurate results.
The dataset contained 2000 patient records, with 6 input features per patient.
The MedScan system used SVM for clear linear separable cases (like Diabetes or
Thyroid, where symptoms had clear boundaries) and KNN for non-linear or
overlapping cases (like heart disease where data patterns were not obvious).
● Kernel: Linear
This hybrid model helped doctors to quickly screen new patients based on their
medical history and suggest further tests only when necessary, reducing diagnosis
time by 60%.
Q1.
Q2.
If the value of K in KNN is very large (close to total data points), the model will mostly:
A) Memorize noise in data
B) Predict majority class always
C) Increase variance
D) Create a complex decision boundary
Q3.
Which of the following would make SVM with RBF kernel perform poorly?
A) Feature scaling not applied
B) Data with clear linear separation
C) Optimal gamma value
D) Low-dimensional feature space
Q4.
Q5.
If SVM finds that 80% of training points are support vectors, it means:
A) Data is highly linearly separable
B) Model is likely overfitting
C) Kernel used is inappropriate
D) Margin found is very large
Q6.
Q7.
Q8.
Q9.
Q10.
In SVM, the role of the kernel trick is to:
A) Add regularization
B) Transform non-linear data to a higher dimension
C) Increase overfitting probability
D) Avoid explicit computation of new features
MetroCity has introduced a Smart Traffic Signal System (STSS) to manage traffic flow
efficiently at a busy 4-way junction. The system uses a Markov Chain model to
predict the next traffic signal state based on current conditions.
The system records the transition probabilities between these states based on
real-time traffic data collected over months.
From \ S1 S2 S3 S4
To
MCQs (Conceptual)
Q1.
Q2.
The sum of probabilities in any row of the transition matrix must be:
A) 0
B) 1
C) Between 0 and 1
D) Equal to the number of states
Q4.
Q5.
Q7.
Q8.
Q9.
If the system stays in S3, calculate the expected number of steps before moving to
any other state.
(Hint: Expected steps = 1 / (1 - P(S3 → S3)))
Q10.
The Smart City Department wanted to develop a system that could analyze traffic
patterns efficiently and predict congestion zones based on historical traffic data.
However, the dataset had many highly correlated features, making the model
complex and slow.
A data scientist proposed using Principal Component Analysis (PCA) to reduce the
dimensionality of the dataset while preserving maximum variance. PCA helped
compress the original 20-dimensional dataset into 3 principal components that
retained 95% of the total variance. These transformed features were then used to
develop faster predictive models for traffic management and signal optimization.
9. PCA was applied on a traffic dataset with 50 features, and only 5 components
were selected explaining 90% variance. What does this indicate?
a) Remaining 45 features are not useful
b) Remaining 45 features add very little new information
c) Data was not suitable for PCA
d) PCA failed to compress
This system worked when there were fewer books, but now with hundreds of
members and frequent borrowing and returning of books, the register became
messy. Searching for a book’s record took a long time, and sometimes the
handwriting wasn’t readable.
To solve this problem, a young coder named Aarya built LibraryBot — an intelligent
program written in Python that used simple file handling techniques to manage all
book records.
LibraryBot maintained a .txt file where every line stored one book's details in this
format:
CopyEdit
BookID, BookName, AuthorName, Status
For example:
rust
CopyEdit
101, Python Programming, John Zelle, Available
102, Data Science Basics, Cathy O'Neil, Borrowed
Whenever a new book was purchased, Aarya added it to the file without disturbing
the existing records.
If a user wanted to search for a book by its name or author, LibraryBot quickly
scanned the file and returned matching records.
When a book was borrowed or returned, LibraryBot updated the status accordingly in
the file.
It could also count the number of available and borrowed books, and display all the
records in a clean and readable way.
This smart solution made the library fast, error-free, and easy to manage — all by
using simple file operations in Python.
1. Which file mode should be used to add a new book without deleting existing
data?
a) 'r'
b) 'w'
c) 'a'
d) 'r+'
3. What data structure would speed up searching the book records in memory?
a) Tuple
b) List
c) Dictionary
d) Set
4. What error occurs if LibraryBot tries to open a non-existing file in 'r' mode?
a) File will be created
b) FileNotFoundError
c) File gets overwritten
d) No Error
5. What is the correct method to update the status of a book in the text file?
a) Overwrite using write() directly
b) Read all data, modify, and rewrite file
c) Append at the end of the file
d) Use truncate() method
7. Which string method removes \n from each line read from the file?
a) strip()
b) split()
c) join()
d) find()
8. What is the correct mode for both reading and writing without deleting the file
content?
a) 'w'
b) 'r+'
c) 'a+'
d) 'x'
10. Which method in Python automatically closes the file after use?
a) close()
b) with open(...) as f
c) exit()
d) os.close()
Case Study:
Background:
Pixel Town Library is one of the largest libraries in Codetopia. It maintains thousands
of books across various sections like:
● Science
● History
● Fiction
● Comics
● Technology
Every year during the Annual Book Fair or when New Book Arrivals come in bulk, the
library faces a major challenge — arranging and displaying books quickly and
efficiently.
Problem Statement:
To overcome this challenge, the library decided to automate its book arrangement
process using Sorting Algorithms in their Library Management System (LMS).
a) Bubble Sort
b) Selection Sort
c) Merge Sort
d) Linear Search
a) O(n²)
b) O(n log n)
c) O(n³)
d) O(log n)
a) Merge Sort
b) Insertion Sort
c) Bubble Sort
d) Heap Sort
5. Which sorting algorithm uses a "Divide and Conquer" approach?
a) Selection Sort
b) Merge Sort
c) Insertion Sort
d) Bubble Sort
a) Bubble Sort
b) Merge Sort
c) Insertion Sort
d) Quick Sort
9. In which situations is Insertion Sort efficient?
a) Small Dataset
b) Nearly Sorted Data
c) Large Random Data
d) Already Sorted Data
Choose the most suitable sorting technique for the given scenario.
Scenario 1:
Library wants to sort a small list of newly arrived books (less than 20 books).
→ Suitable Algorithm: ________
Scenario 2:
Library needs to sort very large dataset of books (more than 10,000 books) based on
Book Titles.
→ Suitable Algorithm: ________
Scenario 3:
Library wants to sort books where the data is already nearly sorted.
→ Suitable Algorithm: ________
Scenario 4:
Library wants stable sorting where the order of equal elements should not change
(example: same author books should maintain original order).
→ Suitable Algorithm: ________
Scenario 5:
Library wants best average-case performance for sorting large books data.
→ Suitable Algorithm: ________
In case of any help, contact Prakhar Gupta (student batch 1) on +91 955 565 8787 or
[email protected]
Thank You!