I am trying to write a program using the Mathematica function IsotopeData, but am finding the code troublesome. Due to my (relative) familiarity with Python, I am puzzled as to how Mathematica works, as they are very different.
$\require{mhchem}$
What I am trying to do, is to find the elements in a decay chain which end with either $\ce{^{191}_{77}Ir}$ or $\ce{^{193}_{77}Ir}$.
In Python syntax, what I'm trying to do would look a bit like this:
#A would be the Atomic Mass and Z the Atomic Number
#DaughterNuclide(Z,A) would return the Daughter Nuclides of the isotope
def IsoCheck(z,a):
try:
x = DaughterNuclide(z,a)
if x in Isotopes:
return [z,a]
else:
return [0,0]
except:
return [0,0]
L=[]
Isotopes = [[76,191],[78,191]]
for a in xrange(1,295):
for z in xrange(1,119):
if IsoCheck(z,a) != [0,0]:
L.append(IsoCheck(z,a))
repeat = 1
#Then, repeat until all chains are over
while repeat == 1:
repeat = 0
for x in L:
if IsoCheck(x) != [0,0] #Lets just pretend it isn't a list
L.append(x)
repeat = 1
Now, my question is this: what would the equivalent code to perform this task in Mathematica look like?

