Professional Documents
Culture Documents
Write a Python program that converts a temperature from Celsius to Fahrenheit. The
program should take the user's input for the temperature in Celsius and output the equivalent
temperature in Fahrenheit.
2) BMI calculator:
Write a Python program that calculates the body mass index (BMI) for a person. The program
should take the user's input for the person's weight (in kilograms) and height (in meters) and
output their BMI.
weight = float(input("Enter weight in kilograms: "))
height = float(input("Enter height in meters: "))
bmi = weight / (height ** 2)
print(f"Your BMI is {bmi:.2f}.")