Python3 Celsius Fahrenheit
# Python3.x Python Celsius to Fahrenheit Conversion
[ Python3 Examples](#)
The following example demonstrates how to convert Celsius to Fahrenheit:
## Example
# -*- coding: UTF-8 -*-# Filename : test.py# author by : www..com# User input Celsius temperature# Receive user input celsius = float(input('Enter temperature in Celsius: '))# Calculate Fahrenheit temperature fahrenheit = (celsius * 1.8) + 32 print('%0.1f Celsius is equal to %0.1f Fahrenheit' %(celsius,fahrenheit))
Executing the above code produces the following output:
Enter temperature in Celsius: 3838.0 Celsius is equal to 100.4 Fahrenheit
In the example above, the formula for converting Celsius to Fahrenheit is celsius * 1.8 = fahrenheit - 32. Therefore, we get the following equation:
celsius = (fahrenheit - 32) / 1.8
[ Python3 Examples](#)
YouTip