All courses

BP101T · Core · Semester 1

Basics of Python Programming for Pharmaceutical Sciences

Learn Python foundations, control structures, data and file handling, Pandas, and Matplotlib through carefully labelled pharmaceutical teaching datasets and browser practice.

Unit 1: Introduction to Python programming

Use an IDE conceptually, then trace variables, integers, floats, strings, Booleans, type casting, operators, and input/output in a fictional pharmacy-data example. Library installation is discussed as a controlled learning concept, not performed by this browser workspace.

Choose a suitable data type for each field in a simulated medicine record, then explain one type conversion and output.

Open the Python Foundations Lab

Unit 2: Control Structures & Functions

Use conditions, nested decisions, bounded loops, break/continue, arguments, return values, and small functions to model a fictional workflow. Dosage and BMI formulas remain programming practice—not patient-specific recommendations.

Trace a bounded loop and write a function with arguments and a return value for a fictional BMI practice input.

Open the Control Flow & Functions Lab

Unit 3: Data Structures & File Handling

Organise a fictional formulary with lists, tuples, dictionaries, indexing, slicing, string handling, NumPy arrays, and a transparent CSV read/write concept before interpreting structured healthcare data.

Add and retrieve values from a practice formulary, then identify a safe CSV field and a NumPy arithmetic operation.

Open the Data Structures & CSV Lab

Unit 4: Data Handling with Pandas

Inspect fictional PK and ADR practice records as Series and DataFrames. Use head, tail, info, describe, cleaning, filtering, selecting, grouping, and aggregation without treating a teaching summary as clinical evidence.

Inspect a simulated ADR table, handle a missing follow-up value, then distinguish a filter from a grouped count.

Open the Pandas Data Handling Lab

Unit 5: Data Visualization with Matplotlib

Use line, histogram, scatter, and box-plot concepts with titles, axes, and legends to communicate fictional concentration-time, ADR, and dissolution data. Scientific interpretation remains bounded by the stated assumptions.

Choose a suitable visual display for a fictional pharmaceutical dataset and state one interpretation limit.

Open the Matplotlib Visualisation Lab