Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Tools in Data Science
End Term · 13 Apr 2025 (Forenoon)
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- MSQ: One or more options correct. Select all to score.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
- Q1MCQ1 Mark·Choose one option
You receive a tab-delimited file where some numeric fields are interpreted as dates (e.g., "3/10" becomes "March 10" in Excel). What is the most effective way to handle this in Text to-Columns?
- AChange the delimiter to commas before opening the file
- BFormat the column as Text before applying Text-to-Columns
- CUse the General data format option in Text-to-Columns
- DManually change the affected cells back to numbers after splitting
- Q2MCQ1 Mark·Choose one option
In Python, which statement correctly handles exceptions and ensures that cleanup code is executed?
- A

- B

- C

- D

- A
- Q3MCQ1 Mark·Choose one option
A research team has a pandas dataframe of medical trial participants. To quickly identify how many different treatment groups exist, which Pandas method would be most efficient?
- A`len(set(column))`
- B`column.count()`
- C`column.nunique()`
- D`column.value_counts()`
- Q4MCQ1 Mark·Choose one option

- ATo track changes to specific files
- BTo specify files that Git should not track
- CTo define Git repository settings
- DTo list contributors to the repository
- Q5MCQ1 Mark·Choose one option
A developer wants to examine API request headers and responses to debug an issue with a failing API call. Where in Chrome DevTools should they look?
- AConsole tab
- BApplication tab
- CNetwork tab
- DSources tab
- Q6MCQ1 Mark·Choose one option
A pharmaceutical researcher is testing a new drug's effectiveness. If the p-value is 0.03 in a regression analysis, what can be concluded about the drug's impact?
- AThe drug has no significant effect
- BThe result is statistically significant at a 5% significance level
- CMore data collection is needed
- DThe sample size is too small
- Q7MCQ1 Mark·Choose one option
A data analyst receives a messy dataset with inconsistent company names like "Apple", "Apple Inc.", and "Apple Incorporated". Which tool would best standardize these entries?
- AExcel's Find and Replace
- BOpenRefine's clustering feature
- CPython's string manipulation
- DManual editing
- Q8MCQ1 Mark·Choose one option
A web developer wants to analyze the load time and resources of a webpage. Which Chrome DevTools feature provides comprehensive network request information?
- AConsole tab
- BNetwork tab
- CElements tab
- DSources tab
- Q9MCQ1 Mark·Choose one option
Which of the following is NOT a feature typically found in modern IDEs?
- ASyntax highlighting
- BIntegrated debugger
- CVersion control integration
- DNative hardware virtualization
- Q10MCQ1 Mark·Choose one option
Which of the following describes the primary use of Kumu?
- ABuilding financial models
- BCreating system maps and visualizing relationships
- CPerforming real-time data analysis
- DDesigning geographic maps for navigation
- Q11MCQ2 Marks·Choose one option
Which HTTP method is idempotent, meaning multiple identical requests have the same effect as a single request?
- APOST
- BPUT
- CGET
- DDELETE
- Q12MSQ2 Marks·Choose all correct options
A researcher needs to perform spatial data operations like buffering and visualize the results on an interactive map. Which libraries would be most suitable?
- AGeopandas
- BFolium
- CMatplotlib
- DShapely
Read the passage below, then answer Q13–Q15
Scenario 1:
Sarah is working on a research paper about renewable energy technologies and decides to use an LLM to help her draft some sections.
Based on the above data, answer the given subquestions.
Q13MCQ1 Mark·Choose one optionSarah prompts the LLM: "Write a comprehensive overview of solar energy advancements in the last decade." The instructor wants to ensure that the LLM provides concise, clear, and helpful answers. What is the role of the system prompt in guiding the LLM's behavior?
- AIt defines the LLM’s tone, behavior, and response style to align with the instructor's teaching goals.
- BIt provides a list of pre-written responses to be used in all classroom scenarios.
- CIt prevents the LLM from ever deviating from pre-determined responses, regardless of the context.
- DIt configures the LLM to only respond to specific commands, disregarding any other input.
- Q14MSQ2 Marks·Choose all correct options
When Sarah submits increasingly complex prompts about solar energy, which of the following statements are TRUE regarding LLM cost and usage
- ALLM costs are primarily calculated based on the number of tokens processed
- BLLM usage is always free for academic research
- CThe total length of both input prompt and output response impacts the overall cost
- DLLM costs are fixed regardless of the complexity of the query
- EToken count has no relation to computational resources required
- Q15MCQ1 Mark·Choose one option
Sarah wants to improve the specificity of her LLM prompt. Which prompt is likely to generate the most precise and useful response?
- A"Tell me about solar energy"
- B"Discuss solar energy advancements"
- C"Outline 4 key solar energy technological breakthroughs from 2014-2024, including specific efficiency improvements and implementation challenges"
- D"Write a paragraph about solar energy"
Read the passage below, then answer Q16–Q20
Scenario 2
Wildfire Emergency Evacuation Planning
Background:
A wildfire is threatening a rural mountain region, and emergency services need to coordinate evacuation routes for four remote communities. The Emergency Management Center is located at a central command post, and must plan the most efficient evacuation route to ensure rapid and safe community evacuation.
The four communities are:
Pine Ridge Settlement (Latitude: 38.7456, Longitude: -120.8765)
Mountain View Village (Latitude: 38.6987, Longitude: -120.9234)
River Valley Community (Latitude: 38.7123, Longitude: -120.7654)
Forest Creek Hamlet (Latitude: 38.6789, Longitude: -120.8901)
Central Command Post Location:
(Latitude: 38.7200, Longitude: -120.8500)
Based on the above data, answer the given subquestions.
Q16MCQ1 Mark·Choose one optionDuring the wildfire emergency, multiple teams are updating evacuation plans. Which Git command would a team member use to get the latest evacuation route updates?
- Agit commit
- Bgit checkout
- Cgit pull
- Dgit add
- Q17MCQ1 Mark·Choose one option
An emergency responder needs to search through evacuation logs to find all entries related to "Pine Ridge". Which command would be most useful?
- A

- B

- C

- D

- A
- Q18MCQ1 Mark·Choose one option
In a resource-constrained emergency environment, which deployment method would be MOST appropriate for the Python-based evacuation management system?
- ARunning scripts locally on a single emergency responder's laptop
- BDistributing Python source code to all emergency personnel
- CContainerized deployment with Docker for consistent execution across multiple devices
- DFull cloud migration requiring constant internet connectivity
- Q19MCQ1 Mark·Choose one option
Which computational tool would be MOST APPROPRIATE for optimizing the complex evacuation route considering multiple communities?
- AMicrosoft Excel for manual distance calculations
- BGoogle Maps for route visualization
- CPython libraries like NetworkX or OR-Tools for route optimization
- DQGIS for static route mapping
- Q20MCQ1 Mark·Choose one option
What is the primary advantage of using the Haversine formula in emergency route planning?
- ACalculating exact road distances
- BDetermining travel time under specific conditions
- CComputing great-circle distances on a spherical Earth
- DMeasuring elevation changes in mountainous terrain
Read the passage below, then answer Q21–Q31
Scenario 3
You are provided with a Gzipped Apache log file from a website having the below data in each row.

The fields are separated by spaces and quoted by double quotes ("). Unlike CSV files, quoted fields are escaped via "and not". All data is in the GMT-0500 timezone and the questions were based in this same time zone.
Use the information given and answer the sub-questions.
Note: Assume that you are using Python codes for log analysis
Q21MCQ2 Marks·Choose one optionWhich of the following is a valid log entry based on the provided format?
- A192.168.1.1 - - [12/Dec/2024:14:05:59 -0500] "GET /image.jpg HTTP/1.1" 200 1234 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" www.s-anand.net 192.254.190.217
- B192.168.1.1 - - [12/Dec/2024:14:05:59 -0500] "POST /image.jpg INVALID" 200 1234 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" www.s-anand.net 192.254.190.217
- C192.168.1.1 - - [12/Dec/2024:14:05:59 -0500] "PUT /image.jpg HTTP/1.1" OK 1234 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" www.s-anand.net 192.254.190.217
- D203.0.113.7 - - [14/Dec/2024:16:45:11 -0500] "GET /index.html HTTP/1.1" 200 3500 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36" www.s-anand.net 192.254.190.219
- Q22MCQ1 Mark·Choose one option
Which of the following fields are necessary to filter "POST requests made for pages under /images/ from 15:00 to 18:00 on Mondays"?
- ATime, Request, Method, URL
- BTime, Method, Status, Size
- CTime, Method, URL, Referer
- DTime, Status, URL, Server
- Q23MCQ1 Mark·Choose one option
If the time in the log is stored in the format [01/May/2024:00:00:00 -0500], which of the following time formats should you use to parse it correctly?
- A

- B

- C

- D

- A
- Q24MCQ2 Marks·Choose one option
Which of the following methods is best for identifying if a log entry’s timestamp corresponds to a Sunday?
- ACheck if timestamp.dayname() == 'Sunday'
- BCheck if timestamp.weekday() == 5
- CCheck if timestamp.strftime('%A') == 'Sunday'
- DCheck if timestamp.weekday() == 6
- Q25MCQ1 Mark·Choose one option
How would you identify log entries where the time is between 16:00 and 18:59 on Sundays?
- ACheck if 16 <= timestamp.hour < 18
- BCheck if 16 <= timestamp.hour < 19
- CCheck if 16 < timestamp.hour < 19
- DCheck if timestamp.hour in range(16, 20)
- Q26MCQ1 Mark·Choose one option
How would you extract the HTTP protocol version (e.g., HTTP/1.1) from the Request field "GET /blog/ HTTP/1.1"?
- AUse request.split('/')[1]
- BUse request.split(' ')[2]
- CUse request.split(' ')[1]
- DUse request.split('/')[2]
- Q27MCQ1 Mark·Choose one option

- A

- B

- C

- D

- A
- Q28MCQ1 Mark·Choose one option

- A

- B

- C

- D

- A
- Q29MCQ1 Mark·Choose one option
How would you identify if the log entry’s HTTP status code indicates a redirection request? (Assume that status is correctly stored in the variable ‘status’)
- Astatus in [301, 302, 303]
- B200 < status < 400
- C300 <= status < 400
- Dstatus in range(299, 400)
- Q30MCQ1 Mark·Choose one option
After filtering the log entries (in a list filtered_entries), which of the following is the best way to count the number of requests with a 404 status code for pages under /error/?
- AUse len(filtered_entries)
- BUse len(entries)
- CUse sum(1 for entry in entries)
- DNone of these
- Q31MCQ1 Mark·Choose one option
If the count of log entries appears much larger than expected, which of the following could be the reason?
- AThe filter for Monday is incorrect.
- BThe filter for time range is incorrect.
- CThe filter for HTTP method is incorrect.
- DAny of these could be the reason.
Read the passage below, then answer Q32–Q35
Scenario 4
A climate science professor is developing an AI-powered learning assistant called ClimateBot to help students understand complex climate modeling techniques and computational approaches to environmental data analysis.
Guidelines for ClimateBot:
- Engage students through thought-provoking questions
- Encourage independent problem-solving
- Guide students to discover solutions autonomously
- Provide conceptual insights, not direct answers
- Help students develop robust computational and analytical skills
Based on the above data, answer the given subquestions.
Q32MCQ1 Mark·Choose one optionWhat is the primary purpose of the system prompt in controlling an AI learning assistant's behavior?
- ATo create a fixed set of predetermined responses for every possible student query
- BTo define the core communication strategy, learning approach, and interaction guidelines
- CTo replace the need for human instructor guidance completely
- DTo limit the AI's ability to understand complex scientific concepts
- Q33MCQ1 Mark·Choose one option
Choose the best system prompt that achieves the instructor's goals.
- A"You are a climate science assistant. Provide direct answers and complete code solutions whenever students ask."
- B"You are an interactive learning assistant for climate science. Guide students through complex concepts by asking reflective questions. Avoid giving direct solutions. Encourage independent thinking and help students develop problem-solving skills."
- C"You are a simple computational tool. Provide exact numerical answers and full code implementations for any climate modeling question."
- D"You are a climate science assistant. Help students and tell them to consult textbooks for all information."
- Q34MCQ1 Mark·Choose one option
A student asks: "How do I calculate the global warming potential of different greenhouse gases?" Choose the most pedagogically effective response:
- A"The global warming potential (GWP) is calculated by multiplying the gas's radiative efficiency by its atmospheric lifetime. Here's the exact formula: [provides complete formula and calculation method]"
- B"Global warming potential (GWP) is determined by factors like a gas's molecular structure, atmospheric lifetime, and interaction with radiation. Different gases have different GWPs based on these characteristics."
- C"Let's break this down. What do you already know about greenhouse gases and their impact on climate? Have you considered how different molecules might have varying abilities to trap heat?"
- D"I cannot help you with this calculation. Please refer to your textbook for a complete explanation."
- Q35MCQ1 Mark·Choose one option
Assume that the ClimateBot, an advanced learning assistant for climate science students.Its primary mission is to foster critical thinking, scientific reasoning, and deep understanding of complex environmental systems by using a RAG (Retrieval-Augmented Generation) system. The RAG system works as follows: 1. Climate Data Storage: Comprehensive climate research materials (like reports, research papers and notes) are split into smaller chunks. Each chunk is vectorized using an embedding model. 2. Vector Database: The vectorized chunks are stored in a FAISS or Weaviate vector database. 3. Retriever: When a student asks a question, the system retrieves the most relevant content (based on semantic similarity) from the vector database. 4. LLM Contextualization: The retrieved content is added as context in the assistant's prompt, which is then used by the LLM (like GPT-4) to generate a personalized, context-aware response. Which of the following correctly describes the process flow of a RAG-based system for the IITM TDS Teaching Assistant?
- A

- B

- C

- D

- A