37,743
社区成员




crystalSystem = input("Please enter the crystal system of your phase:")
if crystalSystem == 'cubic' or 'tetragonal':
if crystalSystem == 'cubic':
a1 = input("Please enter the lattice parameter: a=")
a2 = float(a1)
Y = (a2 - 5.1159)/0.001547
print("the content of YO1.5 is " + str(Y) + "mol%")
else :
a1 = input("Please enter the lattice parameter: a=")
c1 = input("Please enter the lattice parameter: c=")
a2 = float(a1)
c2 = float(c1)
Y= (1.0225 - (c2/(a2*2**0.5)))/0.0016
print("the content of YO1.5 is " + str(Y) + "mol%")
else:
print("You entered a wrong crystal system")]
if crystalSystem in ('cubic', 'tetragonal')
更好看些.if crystalSystem == 'cubic' or crystalSystem == 'tetragonal':