The algorithm used is shown by the flow diagram below.
BEGIN
INPUT Age
INPUT Gender
YES
Age <20
NO
Dose Age 0.1
=
Dose = 2
YES
NO
Gender = "Female"
INPUT isPregnant
isPregnant=TRUE
AND
Dose > 1.5
YES
Dose = 1.5
ON
NO
END
Dose = Dose 0.5

Write this flowchart as a pseudo code