We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10
Question 1
Write a Python program to input a
distance in meters and convert it to kilometres.
Solution # Python program to convert meters to kilometres
# Taking input from the user
meters = float(input("Enter distance in meters: "))
# Converting meters to kilometres
kilometres = meters / 1000
# Displaying the result
print(f"{meters} meters is equal to {kilometres} kilometres") Question 2 Write a Python program to input a temperature in Fahrenheit and convert it to Celsius.
Solution # Python program to convert Fahrenheit to Celsius
# Taking input from the user
fahrenheit = float(input("Enter temperature in Fahrenheit: "))