# Variables
v_ts = 105.0 ; # velocity of train wrt station-[cm/s]
v_mt = 30.0 ; # velocity of man wrt train-[cm/s]
v_hm = 2.0 ; # velocity of hot dough wrt man-[cm/s]
v_am = 1.0 ; # velocity of ant wrt man- [cm/s]
# By careful reading of problem you can see that ant is moving away from man's mouth at 1 cm/s , so ant's velocity wrt station
#is say v_as
# Calculation
v_as = v_ts + v_mt + v_am;
# Results
print ' The ant is moving towards station at the rate of %.1f cm/s.'%v_as
# Variables
n_un= 7 ; # Number of unknowns in the given problem- 3 values of xi and 4 values Fi
n_ie = 5 ; # Number of independent equations
# Calculations
d_o_f = n_un-n_ie ; # No. of degree of freedom
# Results
print 'Number of degree of freedom for the given system is %i .'%d_o_f
# variables
n_un=8 ; # Number of unknowns in the given problem- 8 values of mole fractions
n_ie =6 ; # Number of independent equations- six elemental balances
# Calculation
d_o_f= n_un-n_ie ;# Number of degree of freedom
# Results
print 'Number of degree of freedom for the given system is %i .'%d_o_f
#Note: Experiments show that the change in CH1.8O.5N.16S.0045P.0055 and the change in C(alpha)H(beta)O(gamma) prove to be
#related by amount of biomass present and the maintenance coefficient(the moles of substrate per mole of biomass per second)
#so the respective quantities cannot be chosen independently.Consequently with this extra constraint,only one degree of freedom
#remains to be specified, the basis