Chemistry or physics teachers should find this program useful to predict the mass and atomic number of the isotope that results from one of 4 different types of radioactive decay.
'Radioactive Decay Program Version 1.0'May 2011'by Scott Ausbrooks'this program calculates the mass and atomic number of a radioactive isotope'after one of 4 types of decay.nomainwin
array$(0)="alpha decay"
array$(1)="beta decay"
array$(2)="positron emission"
array$(3)="electron capture"WindowWidth=700WindowHeight=440'groupbox #1, "Choose One",5,5,400,300combobox#1.combo1, array$(,[action],20,50,240,200textbox#1.textbox1,460,120,150,50textbox#1.textbox2,460,20,150,50textbox#1.textbox3,460,220,150,50textbox#1.textbox4,460,320,150,50statictext#1.choose,"Choose Type of Decay",20,90,350,40statictext#1.atomicnumber,"Atomic number",350,120,80,80statictext#1.atomicmass,"Atomic mass",360,25,80,80statictext#1.resultsmass,"mass =",380,230,70,80statictext#1.resultsnumber,"Z = ",410,320,50,80button#1.button1,"E&xit",[quit], LL,60,60'create a buttonopen"Radioactive Decay"forwindowas#1print#1,"font times_new_roman 18 BOLD"print#1,"trapclose [quit]"wait[action]print#1.combo1,"selection?"input#1.combo1, decay$
print#1.textbox1,"!contents?"input#1.textbox1,atomicnumber$
print#1.textbox2,"!contents?"input#1.textbox2,atomicmass$
SELECTCASE decay$
CASE"alpha decay"print#1.textbox4,val(atomicnumber$)-2print#1.textbox3,val(atomicmass$)-4CASE"beta decay"print#1.textbox4,val(atomicnumber$)+1print#1.textbox3,val(atomicmass$)CASE"positron emission"print#1.textbox4,val(atomicnumber$)-1print#1.textbox3,val(atomicmass$)CASEelseprint#1.textbox4,val(atomicnumber$)-1print#1.textbox3,val(atomicmass$)ENDSELECTwait[quit]confirm"Really quit?";answer$
if answer$ ="no"thenwaitclose#1:end
Chemistry or physics teachers should find this program useful to predict the mass and atomic number of the isotope that results from one of 4 different types of radioactive decay.