Q:

Python program to convert yards into meters

belongs to collection: Python basic programs

0

Example:

    Input:
    Yards: 54

    Output:
    Meters: 49.36014625228519

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Python code to convert Yards to meters

# Python program to convert yards into meters
# input
num = float(input("Enter the distance measured in yards : "))

# converting from yards into meters
""" 1 meter = 1.094 yards"""
met = num/1.094 

# printing the result
print("Distance in meters : ", met)

Output

First run:
Enter the distance measured in yards : 54
Distance in meters :  49.36014625228519

Second run:
Enter the distance measured in yards : 1.094
Distance in meters :  1.0

Third run:
Enter the distance measured in yards : 245
Distance in meters :  223.9488117001828

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Python basic programs

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Python program capitalize the character without us... >>
<< Python program to convert meters into yards...