Write a Python function to convert the distance (in feet) to inches, yards, and miles.


Topic: Write a Python function to convert the distance (in feet) to inches, yards, and miles.

Solution

def distance_converter(d_ft):
    d_inches = d_ft  * 12
    d_yards = d_ft  / 3.0
    d_miles = d_ft  / 5280.0
    return f"Distance in Inches:{d_inches}\nDistance in Yards :{d_yards}\nDistance in Miles :{d_miles}"



List all Python Programs