Skip to content

HarveyPunsalan/Temperature_Converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒก๏ธ Temperature Converter

A flexible temperature conversion tool that converts between Celsius, Fahrenheit, and Kelvin with input validation.

โœจ Features

  • Converts between Celsius, Fahrenheit, and Kelvin
  • Single function handles all conversion combinations
  • Input validation for temperature units
  • Returns multiple values simultaneously
  • Handles edge cases (absolute zero validation)

๐Ÿ› ๏ธ Technologies Used

  • Python 3.11
  • Dictionaries for formula mapping

๐ŸŽฏ Learning Goals

This project focuses on:

  • Function parameters and return values
  • Dictionary-based lookup tables
  • Tuple unpacking
  • Input validation
  • Mathematical formula implementation

๐Ÿš€ How to Run

python temp_converter.py

๐Ÿ“ Usage Example

Enter temperature value: 100
Enter current unit (C/F/K): C
Enter target unit (C/F/K): F

100.0ยฐC = 212.0ยฐF = 373.15K

๐Ÿง  What I Learned

  • How to use dictionaries to store conversion formulas
  • Returning multiple values from a function using tuples
  • The importance of input validation for user experience
  • Working with floating-point precision in Python

๐Ÿ“ Conversion Formulas Implemented

  • Celsius to Fahrenheit: (C ร— 9/5) + 32
  • Celsius to Kelvin: C + 273.15
  • Fahrenheit to Celsius: (F - 32) ร— 5/9
  • Fahrenheit to Kelvin: (F - 32) ร— 5/9 + 273.15
  • Kelvin to Celsius: K - 273.15
  • Kelvin to Fahrenheit: (K - 273.15) ร— 9/5 + 32

๐Ÿ”ฎ Future Improvements

  • Add Rankine and Rรฉaumur scales
  • Create a GUI version
  • Batch conversion from file input

Built as part of my ML Engineering Roadmap - December 2025

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages