# Initialisation of Variables
Sn=2.#Amount of Tin Dissolved in alpha solid solution
Sn2=10.;#Amount of Tin Dissolved in alpha+beeta solid solution at 0 degree celsius
m=100.;#Total mass of the Pb-Sn alloy in gm
Pbm=90.#Total mass of the Pb in Pb-Sn alloy in gm
#CALCULATIONS
B=((Sn2-Sn)/(m-Sn))*100;#The amount of beeta Sn that forms if a Pb-10% Sn alloy is cooled to 0 Degree celsius
B2=100-B;#The amount of alpha Sn that forms if a Pb-10% Sn alloy is cooled to 0 Degree celsius
Sn1=(Sn/100.)*(B2);#The mass of Sn in the alpha phase in g
Sn2=Sn2-Sn1;#The mass of Sn in beeta phase in g
Pb1=B2-Sn1;#The mass of Pb in the alpha phase in g
Pb2=Pbm-Pb1;#The mass of Pb in the beeta phase in g
print "c.Amount of beeta forms of Pb-Sn in gm:",B
print "d.The mass of Sn in the alpha phase in g:",Sn1
print "d.The mass of Sn in beeta phase in g:",round(Sn2,1)
print "e.The mass of Pb in the alpha phase in g:",Pb1
# Initialisation of Variables
M=200.;#Mass of alpha phase of alloy in gm
Sn=61.9;#Percentage of the Sn in the eutectic alloy in percent
Pb=19.;#Percentage of the Pb in the alpha phase in percent
Pb2=97.5;#Percentage of the Sn in the beeta phase in percent
#CALCULLATIONS
W1=(Pb2-Sn)/(Pb2-Pb);#Weight fraction of alpha phase
W2=(Sn-Pb)/(Pb2-Pb);#Weight fraction of beeta phase
Ma=M*W1;#The mass of the alpha phase in 200g in g
Mb=M-Ma;#The amount of the beeta phase in g at 182 degree celsius
MPb1=Ma*(1-(Pb/100));#Mass of Pb in the alpha phase in g
MSn1=Ma-MPb1;#Mass of Sn in alpha phase
MPb2=Mb*(1-(Pb2/100));#Mass of Pb in beeta phase
MSn2=123.8-MSn1;#mass of Sn in beeta Phase
print "Weight fraction of alpha phase",W1
print "Weight fraction of beeta phase",W2
print "The mass of the alpha phase in 200g in g:",Ma
print "The amount of the beeta phase in g at 182 degree celsius:",Mb
print "Mass of Pb in the alpha phase in g:",MPb1
print "Mass of Sn in alpha phase",MSn1
print "Mass of Pb in beeta phase:",MPb2
print "mass of Sn in beeta Phase:",round(MSn2,1)
# Initialisation of Variables
Sn=61.9;#Percentage of the Sn in the eutectic alloy in percent
Pb=19.;#Percentage of the Pb in the alpha phase in percent
Sn2=30.;#Percentage of the Sn in the eutectic alloy in percent
#CALCULATIONS
Pa=(Sn-Sn2)/(Sn-Pb);#The amount of compositions of primary alpha in Pb-Sn
L=(Sn2-Pb)/(Sn-Pb);#The amount of composition of eutectic in Pb-Sn
print "The amount of compositions of primary alpha in Pb-Sn:",round(Pa*100)
print "The amount of composition of eutectic in Pb-Sn:", round(L*100)
per_L_200=((40.-18.)/(55.-18.))*100
Per_L_210=((40.-17.)/(50.-17.))*100
print "L200 in percentage",round(per_L_200)
print "L210 in percentage",round(Per_L_210)
#answer variation is due to round off