Convert Celsius to Fahrenheit using Python
You may use the following Python script to convert Celsius to Fahrenheit. Get temperature in Celsius from user. Convert Celsius to Fahrenheit. Print the result.
You may use the following Python script to convert Celsius to Fahrenheit.
# Get temperature in Celsius from user
celsius = float(input("Enter temperature in Celsius: "))
# Convert Celsius to Fahrenheit
fahrenheit = round((celsius * 9/5) + 32, 1)
# Print the result
print("Temperature in Fahrenheit: {:.1f}°F".format(fahrenheit))