Q. Write a program to calculate the distance of 1056 feet in term of yards and mile.


Given fixed values are 1 mile = 1760yards and 1 yard = 3 feet

Answer =

a = 1056        #given
print ("In yards = ", a/3, "\nIn miles = ", a / 3 * 1760)


Output :-

In yards =  352.0
In miles =  619520.0

>>>

5 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. there is correction in line (a / 3 * 1760)
    you need to add brackets in (3 * 1760)
    otherwise it will divide first instead of multiplying

    ReplyDelete
  2. we multiply first and then we divide.
    1056 Feet = 352 Yards
    1056 Feet = 0.2 Miles

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post