Control Flow & Functions Lab

Basics of Python Programming for Pharmaceutical Sciences (BP101T) · Semester 1 · Unit 2: Control Structures & Functions

Practise nested conditions, bounded loops, break/continue, functions, arguments, and return values through non-clinical BMI and workflow examples.

What this unit covers

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.

Apply it

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

How this lab works

A visible browser-native teaching interaction updates illustrative states, scores, or visual summaries from authored values.

Data used

Fictional or browser-generated teaching inputs; no patient, proprietary manufacturing, or clinical-record data.

Limits

Educational simulation only. Outputs are not clinical advice, patient-specific predictions, release specifications, regulatory decisions, or professional competency evidence.

Go to the BP101T courseAll practice labs