📘 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
- Which data structure is mutable?
a) Tuple
b) List
c) String
d) None
Answer: b - Which is immutable?
a) List
b) Dictionary
c) Tuple
d) Set
Answer: c - Dictionary stores data as:
a) List
b) Tuple
c) Key-Value pairs
d) Array
Answer: c - Indexing starts from:
a) 1
b) 0
c) -1
d) None
Answer: b - Which function creates NumPy array?
a) list()
b) array()
c) tuple()
d) dict()
Answer: b - CSV stands for:
a) Column Storage Value
b) Comma Separated Values
c) Central System Variable
d) None
Answer: b - Which module is used for CSV?
a) numpy
b) pandas
c) csv
d) os
Answer: c - 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
- Explain lists, tuples, and dictionaries with examples.
- Explain indexing and slicing with suitable examples.
- Explain NumPy arrays and their advantages.
- Explain CSV file handling in Python.
- Explain healthcare datasets and their structure.
- 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
| Concept | Key Point |
|---|---|
| List | Mutable collection |
| Tuple | Immutable collection |
| Dictionary | Key-value pairs |
| NumPy | Fast numerical computation |
| CSV | Data file format |
| Filtering | Select data |
📥 Download Unit 3 Practice Files & Datasets
Includes ADR datasets, patient records, and coding exercises.
Recommemded readings
- Lists, Tuples & Dictionaries (with pharma data examples)
- Indexing, Slicing & Operations (Extracting patient/drug data)
- NumPy Arrays (Dose calculations, concentration arrays)
- CSV File Handling (Reading ADR datasets, writing reports)
- Understanding Healthcare Datasets (Structure, columns, patient data interpretation)
- Data Access & Manipulation (Filter, select, basic operations)
For more details: Basics of Python Programming for Pharmaceutical Sciences