April 29, 2026

Question Bank Unit 3: Data Structures & File Handling

📘 Unit 3 Question Bank – Data Structures & File Handling

Includes MCQs, short answers, long answers, case-based questions, and mini projects with pharmaceutical applications.


🔷 Section A: MCQs

  1. Which data structure is mutable?
    a) Tuple
    b) List
    c) String
    d) None
    Answer: b

  2. Which is immutable?
    a) List
    b) Dictionary
    c) Tuple
    d) Set
    Answer: c

  3. Dictionary stores data as:
    a) List
    b) Tuple
    c) Key-Value pairs
    d) Array
    Answer: c

  4. Indexing starts from:
    a) 1
    b) 0
    c) -1
    d) None
    Answer: b

  5. Which function creates NumPy array?
    a) list()
    b) array()
    c) tuple()
    d) dict()
    Answer: b

  6. CSV stands for:
    a) Column Storage Value
    b) Comma Separated Values
    c) Central System Variable
    d) None
    Answer: b

  7. Which module is used for CSV?
    a) numpy
    b) pandas
    c) csv
    d) os
    Answer: c

  8. np.mean() calculates:
    a) Sum
    b) Average
    c) Max
    d) Min
    Answer: b

🔷 Section B: Short Answer Questions

  • Define list with example.
  • Differentiate between list and tuple.
  • What is dictionary?
  • Explain indexing and slicing.
  • What is NumPy?
  • Write syntax to create NumPy array.
  • What is CSV file?
  • Explain csv.reader().
  • What is dataset?
  • Define data manipulation.

🔷 Section C: Long Answer Questions

  1. Explain lists, tuples, and dictionaries with examples.
  2. Explain indexing and slicing with suitable examples.
  3. Explain NumPy arrays and their advantages.
  4. Explain CSV file handling in Python.
  5. Explain healthcare datasets and their structure.
  6. Explain data access and manipulation with examples.

🔷 Section D: Case-Based Questions

💊 Case 1: Dose List Analysis

A dataset contains doses: [500, 650, 400, 700]

  • Find high doses
  • Extract first 2 values
  • Calculate average using NumPy
💊 Case 2: Patient Record System
  • Create dictionary for patient data
  • Access dose value
  • Modify dose
💊 Case 3: ADR Dataset
  • Read CSV file
  • Identify severe reactions
  • Print drug names
💊 Case 4: Clinical Data Filtering
  • Filter patients with dose > 600
  • Reduce dose for elderly patients
  • Display updated dataset

🔷 Section E: Mini Projects

  • Project 1: Dose Analyzer using List & NumPy
  • Project 2: Patient Record System using Dictionary
  • Project 3: ADR Alert System using CSV
  • Project 4: Clinical Data Filter & Modifier

🧠 Quick Revision

ConceptKey Point
ListMutable collection
TupleImmutable collection
DictionaryKey-value pairs
NumPyFast numerical computation
CSVData file format
FilteringSelect data

📥 Download Unit 3 Practice Files & Datasets

Includes ADR datasets, patient records, and coding exercises.

Recommemded readings

  1. Lists, Tuples & Dictionaries (with pharma data examples)
  2. Indexing, Slicing & Operations (Extracting patient/drug data)
  3. NumPy Arrays (Dose calculations, concentration arrays)
  4. CSV File Handling (Reading ADR datasets, writing reports)
  5. Understanding Healthcare Datasets (Structure, columns, patient data interpretation)
  6. Data Access & Manipulation (Filter, select, basic operations)

For more details: Basics of Python Programming for Pharmaceutical Sciences