Q:

Python program to convert meters into yards

belongs to collection: Python basic programs

0

write a Python code for converting the meters into yards.

Key: 1 meter = 1.094 yards

Example:

    Input:
    Meters: 245

    Output:
    Yards: 268.03000000000003

All Answers

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

Python code to convert Meters to yards

# Python program to convert Centimeter to Inches 
# taking input
num = float(input("Enter the distance measured in centimeter : "))

# converting from cms to inches
""" 1 inch = 2.54 centimeters"""
inc = num/2.54 

# printing the result
print("Distance in inch : ", inc)

Output

First run:
Enter the distance measured in meters : 245
Distance in yards :  268.03000000000003 

Second run:
Enter the distance measured in meters : 54
Distance in yards :  59.07600000000001

Third run:
Enter the distance measured in meters : 100
Distance in yards :  109.4 

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 to convert yards into meters... >>
<< Python program to convert Centimeter to Inches...