Programming Examples

Python program to convert the distance in feet to inches yards and miles


Program to convert the distance (in feet) to inches, yards,  and miles

Solution

dis_ft=int(input("Input distance in feet :"))
dis_inches=dis_ft*12
dis_yards=dis_ft/3.0
dis_miles=dis_ft/5280.0
print(" The distance in inches is %i inches." % dis_inches)
print("The distance in inches in yards is %.2f yards." % dis_yards)
print("The distance in miles is %.2f miles." %dis_miles)
Output

Input distance in feet :200

 The distance in inches is 2400 inches.

The distance in inches in yards is 66.67 yards.

The distance in miles is 0.04 miles.

Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2025 Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz