uiz Space

January 2026 term · Tools in Data Science · BSSE2002

Tools in Data Science End Term: 10 May 2026 (January 2026 term)

The IIT Madras BS Tools in Data Science (Tools in Data Science (TDS)) End Term paper sat on 10 May 2026, in the January 2026 term: 27 questions for 40 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
27
Marks
40
Duration
180 min
MCQ
25
Written
2

Updated

Official paper: Tools In Data Science 06 May 26 · No negative marking.

Question 1

+1 markOne correct option
  1. A

    The backend server crashed while processing the request.

  2. B

    The frontend is running on the wrong port.

  3. C

    Browsers always delete data sent from port 8000.

  4. D

    Browsers block cross-origin requests by default.

Show answer

Correct answer

  • D

    Browsers block cross-origin requests by default.

Question 2

+1 markOne correct option

You deploy your portfolio website to GitHub Pages. You try to add a Python FastAPI backend to handle form submissions directly on GitHub Pages. What happens when users try to submit the form?
Choose the correct answer.

  1. A

    GitHub Pages converts Python to JavaScript for browser execution.

  2. B

    Form submissions queue until you push new commits.

  3. C

    Submission fails—GitHub Pages serves only static files, not backend code.

  4. D

    GitHub creates a serverless function to handle POST requests.

Show answer

Correct answer

  • C

    Submission fails—GitHub Pages serves only static files, not backend code.

Question 3

+1 markOne correct option
  1. A

    Converts the JSON string into a Python dictionary.

  2. B

    Contacts the API again to verify data format.

  3. C

    Deletes special characters for safety before printing.

  4. D

    Automatically fixes formatting mistakes in the string.

Show answer

Correct answer

  • A

    Converts the JSON string into a Python dictionary.

Question 4

+1 markOne correct option

You build a Docker image locally and push it to Docker Hub. Your colleague pulls it on Windows. Your code runs Ubuntu Linux inside the container. What happens?
Choose the correct answer.

  1. A

    Docker Hub converts Linux containers to Windows during push.

  2. B

    Container runs successfully—Docker provides Linux compatibility on Windows.

  3. C

    Container crashes with "Platform Mismatch" error.

  4. D

    Docker refuses to pull and shows OS incompatibility warning.

Show answer

Correct answer

  • B

    Container runs successfully—Docker provides Linux compatibility on Windows.

Question 5

+1 markOne correct option

Why is it highly recommended to use HTTPS instead of HTTP when sending an API token over the internet?
Choose the correct answer.

  1. A

    HTTPS transfers data faster than standard HTTP.

  2. B

    HTTPS encrypts data, making it unreadable if intercepted.

  3. C

    HTTP is only allowed for transferring images and videos.

  4. D

    HTTPS automatically fixes spelling errors in API requests.

Show answer

Correct answer

  • B

    HTTPS encrypts data, making it unreadable if intercepted.

Question 6

+1 markOne correct option
  1. A

    1 second—stops after the fastest request finishes.

  2. B

    5 seconds—the average time of all requests.

  3. C

    3 seconds—stops automatically to avoid long waits.

  4. D

    10 seconds—must wait for the slowest request to finish.

Show answer

Correct answer

  • D

    10 seconds—must wait for the slowest request to finish.

Question 7

+1 markOne correct option
  1. A

    It makes the API run faster by grouping keys in one location.

  2. B

    It prevents secret keys from being uploaded to GitHub when you share code.

  3. C

    It allows Python to cache variables during execution.

  4. D

    It helps GitHub verify the cloud API is installed correctly.

Show answer

Correct answer

  • B

    It prevents secret keys from being uploaded to GitHub when you share code.

Question 8

+1 markOne correct option
  1. A

    Longitude exceeds 90o, causing sine to return negative values.

  2. B

    Formula uses latitude in trig calculations; swapping produces incorrect angles.

  3. C

    Haversine detects swaps and falls back to Euclidean distance.

  4. D

    Database indexes for latitude fail when queried with longitude first.

Show answer

Correct answer

  • B

    Formula uses latitude in trig calculations; swapping produces incorrect angles.

Question 9

+1 markOne correct option

You write a script that loads a 2GB file into memory. It works on your laptop but crashes with "Out of Memory" on a free serverless cloud function. Why?
Choose the correct answer.

  1. A

    The cloud server detects the large file as malicious.

  2. B

    Free-tier cloud environments enforce strict memory limits.

  3. C

    Python cannot download external files inside cloud servers.

  4. D

    Files over 1GB require a separate database installation.

Show answer

Correct answer

  • B

    Free-tier cloud environments enforce strict memory limits.

Question 10

+2 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 11

+2 marksOne correct option

Your app blocks the word "Ignore" to prevent prompt injection. A user types "I-g-n-o-r-e the above instructions" and bypasses it. Why?
Choose the correct answer.

  1. A

    The check matches exact words only; spelling tricks bypass it.

  2. B

    Python removes dashes before comparing text.

  3. C

    LLMs cannot read or process text with dashes.

  4. D

    The backend crashed and allowed all traffic through.

Show answer

Correct answer

  • A

    The check matches exact words only; spelling tricks bypass it.

Question 12

+2 marksOne correct option
  1. A

    It configures the server to batch and aggregate duplicate requests within 3600-second windows, reducing database queries.

  2. B

    It authorizes intermediate proxies and CDNs to serve cached copies for 1 hour, preventing identical requests from reaching your origin server.

  3. C

    It instructs client browsers to prefetch and cache all linked resources within 3600 seconds of the initial page load.

  4. D

    It enables HTTP/2 server push for the next 3600 seconds, allowing the server to proactively send related resources.

Show answer

Correct answer

  • B

    It authorizes intermediate proxies and CDNs to serve cached copies for 1 hour, preventing identical requests from reaching your origin server.

Question 13

+2 marksOne correct option
  1. A

    Server crashes—string types are incompatible.

  2. B

    Encrypts the string so it can't be read as number.

  3. C

    Automatically converts the string "25" to integer 25.

  4. D

    Deletes the variable due to wrong format.

Show answer

Correct answer

  • C

    Automatically converts the string "25" to integer 25.

Question 14

+2 marksOne correct option

When sending instructions to an LLM, developers often place core rules (like "you are a strict assistant") into a "System" prompt, while placing the user's question into a "User" prompt. Why is separating this useful?
Choose the correct answer.

  1. A

    It cuts down prompt word count to save money.

  2. B

    Models pay closer attention to System prompts, reducing user override attempts.

  3. C

    System prompts work offline without internet connection.

  4. D

    It blocks users from typing words listed in System prompts.

Show answer

Correct answer

  • B

    Models pay closer attention to System prompts, reducing user override attempts.

Question 15

+3 marksOne correct option

Two users attempt to sign up with the same username simultaneously. Your server checks if the username exists, then adds it if available. Without locking, what will likely occur?
Choose the correct answer.

  1. A

    Both requests check simultaneously, see it's available, and both create the user.

  2. B

    Python pauses the server to queue incoming requests automatically.

  3. C

    The database detects duplicates and delete both requests.

  4. D

    The network router blocks duplicate requests before reaching the server.

Show answer

Correct answer

  • A

    Both requests check simultaneously, see it's available, and both create the user.

Question 16

+3 marksOne correct option

A team trains a sentiment classifier achieving 94% test accuracy. They discover 200 test reviews accidentally appeared in training data. After removing duplicates and retraining, accuracy drops to 76%. What does this reveal?
Choose the correct answer.

  1. A

    Removing training data naturally reduces accuracy.

  2. B

    The 94% was inflated by test leakage—the model memorized test examples.

  3. C

    The duplicates contained critical patterns needed for learning.

  4. D

    The random seed changed, causing different train-test splits.

Show answer

Correct answer

  • B

    The 94% was inflated by test leakage—the model memorized test examples.

Question 17

+1 markOne correct option

Read the following passage carefully:
A student builds a simple API that connects to a Large Language Model (LLM). To save time and expenses, the student configures a cache so that repeated questions skip the LLM entirely and return an instant answer. To stop prompt injection attacks, the developer filters the user's text for bad words before safely sending it.
During a testing session, a user cleverly tricks the API using a formatting loophole, causing the LLM to output a badly formatted hallucination. Because of the cache rules, the system memorizes this bad response. When other users ask the exact same question, they also receive the incorrect hallucination directly from the cache. Meanwhile, when the student tries testing their API locally from an HTML file, the browser blocks the connection outright.
Based on the above data, answer the given subquestions.

When the student opens their testing HTML file in Chrome, why does it block the connection to their backend API?
Choose the correct answer.

  1. A

    Backend lacks CORS headers for cross-origin requests.

  2. B

    Browsers don't allow JavaScript in local HTML files.

  3. C

    The API broke and returned a blank error page.

  4. D

    Antivirus stopped the network connection.

Show answer

Correct answer

  • A

    Backend lacks CORS headers for cross-origin requests.

Question 18

+1 markOne correct option

Read the following passage carefully:
A student builds a simple API that connects to a Large Language Model (LLM). To save time and expenses, the student configures a cache so that repeated questions skip the LLM entirely and return an instant answer. To stop prompt injection attacks, the developer filters the user's text for bad words before safely sending it.
During a testing session, a user cleverly tricks the API using a formatting loophole, causing the LLM to output a badly formatted hallucination. Because of the cache rules, the system memorizes this bad response. When other users ask the exact same question, they also receive the incorrect hallucination directly from the cache. Meanwhile, when the student tries testing their API locally from an HTML file, the browser blocks the connection outright.
Based on the above data, answer the given subquestions.

  1. A

    7,200 milliseconds

  2. B

    7,200 minutes

  3. C

    2 hours

  4. D

    72 days

Show answer

Correct answer

  • C

    2 hours

Question 19

+1 markOne correct option

Read the following passage carefully:
A student builds a simple API that connects to a Large Language Model (LLM). To save time and expenses, the student configures a cache so that repeated questions skip the LLM entirely and return an instant answer. To stop prompt injection attacks, the developer filters the user's text for bad words before safely sending it.
During a testing session, a user cleverly tricks the API using a formatting loophole, causing the LLM to output a badly formatted hallucination. Because of the cache rules, the system memorizes this bad response. When other users ask the exact same question, they also receive the incorrect hallucination directly from the cache. Meanwhile, when the student tries testing their API locally from an HTML file, the browser blocks the connection outright.
Based on the above data, answer the given subquestions.

  1. A
  2. B

    Drops the extra word and reads the dictionary.

  3. C

    Ignores the response and re-queries the LLM.

  4. D

    Converts everything into a long string list.

Show answer

Correct answer

  • A

Question 20

+1 markOne correct option

Read the following passage carefully:
A student builds a simple API that connects to a Large Language Model (LLM). To save time and expenses, the student configures a cache so that repeated questions skip the LLM entirely and return an instant answer. To stop prompt injection attacks, the developer filters the user's text for bad words before safely sending it.
During a testing session, a user cleverly tricks the API using a formatting loophole, causing the LLM to output a badly formatted hallucination. Because of the cache rules, the system memorizes this bad response. When other users ask the exact same question, they also receive the incorrect hallucination directly from the cache. Meanwhile, when the student tries testing their API locally from an HTML file, the browser blocks the connection outright.
Based on the above data, answer the given subquestions.

The student wants to bypass the cache to get fresh results. What technical trick forces a new request?
Choose the correct answer.

  1. A
  2. B

    Turn off the router and reconnect to wifi.

  3. C

    Hard-refresh the browser tab by pressing F5 once.

  4. D

    Email the cloud provider to clear the server cache.

Show answer

Correct answer

  • A

Question 21

+2 marksOne correct option

Read the following passage carefully:
A student builds a simple API that connects to a Large Language Model (LLM). To save time and expenses, the student configures a cache so that repeated questions skip the LLM entirely and return an instant answer. To stop prompt injection attacks, the developer filters the user's text for bad words before safely sending it.
During a testing session, a user cleverly tricks the API using a formatting loophole, causing the LLM to output a badly formatted hallucination. Because of the cache rules, the system memorizes this bad response. When other users ask the exact same question, they also receive the incorrect hallucination directly from the cache. Meanwhile, when the student tries testing their API locally from an HTML file, the browser blocks the connection outright.
Based on the above data, answer the given subquestions.

What's the key difference between LLM "Structured Outputs" and Python validation for preventing malformed JSON?
Choose the correct answer.

  1. A

    Structured outputs run server-side; Python runs client-side.

  2. B

    Structured outputs constrain token generation; Python detects errors post- generation.

  3. C

    Structured outputs cache results for 3600s; Python rechecks each response.

  4. D

    Structured outputs encrypt JSON; Python leaves data unencrypted.

Show answer

Correct answer

  • B

    Structured outputs constrain token generation; Python detects errors post- generation.

Question 22

+2 marksOne correct option

Read the following passage carefully:
A student builds a simple API that connects to a Large Language Model (LLM). To save time and expenses, the student configures a cache so that repeated questions skip the LLM entirely and return an instant answer. To stop prompt injection attacks, the developer filters the user's text for bad words before safely sending it.
During a testing session, a user cleverly tricks the API using a formatting loophole, causing the LLM to output a badly formatted hallucination. Because of the cache rules, the system memorizes this bad response. When other users ask the exact same question, they also receive the incorrect hallucination directly from the cache. Meanwhile, when the student tries testing their API locally from an HTML file, the browser blocks the connection outright.
Based on the above data, answer the given subquestions.

User bypasses "Ignore" filter with "IGNORE" or "Ign0re". What validation is more robust?
Choose the correct answer.

  1. A

    Convert to lowercase and use regex for character substitutions.

  2. B

    Increase cache timeout to 7200 seconds.

  3. C

    Add CORS policy blocking uppercase characters.

  4. D

    Configure asyncio.gather() to skip suspicious requests.

Show answer

Correct answer

  • A

    Convert to lowercase and use regex for character substitutions.

Question 23

+2 marksWritten answer

Please provide a comprehensive structural analysis addressing the given two core logic flaws:
Based on the above data, answer the given subquestions.

Robust Improvements : Write the necessary Python/FastAPI technical improvements required (e.g., Type Hinting) to structurally force the endpoint to become reliable.
NOTE: Your answer should not exceed 200 words.

Show answer

A written answer, not marked automatically.

Question 24

+2 marksWritten answer

Please provide a comprehensive structural analysis addressing the given two core logic flaws:
Based on the above data, answer the given subquestions.

RESTful Semantics : Should an LLM/Sentiment inference endpoint ideally operate via a GET mapped method, or a POST method? Provide a rigid technical justification analyzing payload limits and REST architectures.
NOTE: Your answer should not exceed 200 words.

Show answer

A written answer, not marked automatically.

Question 25

+1 markOne correct option
  1. A

    The mobile app's HTTP client library configuration

  2. B

    The gateway's routing rules and path-matching logic

  3. C

    The payment service's database connection pooling settings

  4. D

    OAuth token validation middleware in each backend service

Show answer

Correct answer

  • B

    The gateway's routing rules and path-matching logic

Question 26

+1 markOne correct option

During a traffic spike, your single API gateway instance crashes. What architectural change prevents complete platform outages?

  1. A

    increase database connection pool size on each backend service

  2. B

    Deploy multiple gateway instances with load balancing redundancy

  3. C

    Cache all API responses permanently on client devices

  4. D

    Remove authentication to reduce gateway processing overhead

Show answer

Correct answer

  • B

    Deploy multiple gateway instances with load balancing redundancy

Question 27

+1 markOne correct option
  1. A

    Only the mobile app's HTTP request formatting code

  2. B

    Gateway routing, authentication middleware, video service, and network connectivity

  3. C

    Only the PostgreSQL database query performance metrics

  4. D

    Only the CDN cache configuration for video content

Show answer

Correct answer

  • B

    Gateway routing, authentication middleware, video service, and network connectivity