This is a simple Python program that converts temperature between Celsius and Fahrenheit. It allows the user to choose the conversion type and then displays the result with proper formatting.
- Conditional statements (
if,elif,else) - Basic arithmetic operations
- User input using
input() - Type conversion (
float,int) - String formatting (
f-strings)
-
Save the file as
temperature_converter.py -
Open your terminal or command prompt
-
Navigate to the folder where your file is saved
-
Run the program using:
python temperature_converter.py
Temperature Converter
1. Celsius to Fahrenheit
2. Fahrenheit to Celsius
Enter your choice (1 or 2): 1
Enter temperature in Celsius: 37
37.0°C = 98.60°F
- Add a GUI interface using
tkinter - Support for Kelvin conversion
- Include input validation and error handling