#initiation of variable
mvo=1116.0;mp=938.0;mpi=140.0; #mass of various particles
#calculation
Q=(mvo-mp-mpi); #Q value of energy
Pp=100.0;Ppi=100; #momentum of various particles
Kp=5.0;Kpi=38-Kp; #kinetic energy of particles
#result
print "The kinetic energy of the particles Kp and Kpi are", Kp," MeV and",Kpi," MeV respectively"
#initiation of variable
Q=105.2 # The Q value for the given decay
Muc2=105.80344 #mass energy
#calculation
Ke= Q**2/(2*Muc2); #Ke=Ee-mec2;
#result
print "The maximum kinetic energy in MeV is",round(Ke,3);
#initiation of variable
from __future__ import division
from sympy.solvers import solve
from sympy import Symbol
from sympy import *
from math import sqrt
mkc2=494.0; mpic2=135.0;mec2=0.5;# mass of various particles
#calculation
Q1=mkc2-mpic2-mec2; #Q of reaction
# the neutrino has negligible energy
x = symbols('x')
k=solve((x**2+135.0**2)**(0.5)+x-494,x);# assigning the Q to sum of energies and simplifying
print "The value of maximum kinetic enrgy for pi-meson and positron are",266,"MeV &",k," MeV";
#initiation of variable
mpi_=140;mp=938;mKo=498;mLo=1116; #mass of various particles
#calculation
Q1= mpi_+mp-mKo-mLo; #Q value of reaction 1
mK_=494.0;mpio=135.0;
Q2=mK_+mp-mLo-mpio; #Q value of reaction 2
#result
print"The Q values of reactions 1 and 2 are", Q1," MeV and",Q2,"MeV";
#initiation of variable
mpic2=135.0; #mass ennergy of pi particle
#calculation
Q=-mpic2;
mp=938.0;mpi=135.0;
Kth=(-Q)*((4*mp)+mpi)/(2*(mp)); #threshold energy
#result
print"The threshold kinetic energy in MeV is",round(Kth,3);
#initiation of variable
mpc2=938.0; #rest energy of proton
#result
Q=mpc2+mpc2-(4*mpc2); #Q value of reaction
Kth=(-Q)*(6*mpc2/(2*mpc2)); # thershold kinetic energy
#result
print "The threshold kinetic energy in MeV is",round(Kth,3);