Professional Documents
Culture Documents
output
enter the amount in Rs
4556
the converted currency in $ is
61.1492652
----------------------------------------------------------------------------------
output
enter the distacne
KM of total distance to be covered
5
M of total distance to be covered
34
distance covered by each runner is 1258.5
-----------------------------------------------------------------------------------
-
#length of diagonal
a=float(input('enter the perimeter\n'))
b=float(input('enter the length\n'))
#P = 2 * w + 2 * l w=p-2l/2
w=(a-2*b)/2
diagonal=(a*a+b*b)**0.5 #double ** for square root
print('the diagonal is\n',diagonal)
output
enter the perimeter
5
enter the length
5
the diagonal is
7.0710678118654755
-----------------------------------------------------------------------------------
-
#bmi
a=float(input('enter the weight(in pound)\n'))
b=float(input('enter the height(in inches)'))
c=a*0.453592 #pound to kg
d=b*0.0254 #inches to m
print('BMI is',(c/d*d))
output
enter the weight(in pound)
55
enter the height(in inches)
66
BMI is 24.94756
-----------------------------------------------------------------------------------
-
output
enter the duration of work on first day
4
enter the duration of work on second day
5
6enter the duration of work on third day
7
enter the duration of work on fourth day
8
enter the duration of work on fifth day
9
average hours worked in a week is
6.6
-----------------------------------------------------------------------------------
-