Examples; Example: Branching And Looping - HP -15C Owner's Handbook Manual

Hide thumbs Also See for HP-15C:
Table of Contents

Advertisement

Examples

Example: Branching and Looping

A radiobiology lab wants to predict the
diminishing radioactivity of a test amount of
131
I, a radioisotope. Write a program to figure
the radioactivity at 3-day intervals until a
given limit is reached. The formula for N
amount of radioisotope remaining after t days,
is
N
= N
(2
t
o
where k = 8 days, the half-life of
The following program uses a loop to calculate the number of millicuries
(mci) of isotope theoretically remaining at 3-day intervals of decay.
Included is a conditional test to check the result and end the program when
radioactivity has fallen to a given value (a limit).
The program assumes t
– the initial amount of isotope – is stored in R
radioactivity is stored in R
Keystrokes
| ¥
´ CLEAR M
´ b A
l 0
´ ©
8
÷
"
2
®
Y
Section 8: Program Branching and Controls
-t/k
),
– the first day of measurement – is stored in R
1
.
2
Display
000-
000-
001-42,21,11
002-
003-
004-
005-
006-
007-
008-
009-
, the
t
131
I, and N
is the initial amount.
0
45
0
42 31
8
10
16
2
34
14
and the limit value for
1,
Program mode.
(Optional.)
Each loop returns to this
line.
Recalls current t which
changes with each loop.
Pauses to display t.
k
–t/k.
–t/k
2
.
93
, N
0
0

Advertisement

Table of Contents
loading

Table of Contents