Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 2.32 KB

README.md

File metadata and controls

66 lines (50 loc) · 2.32 KB

Temperature Converter 🌡️


In c script

Logo


Overview

The Temperature Converter is a Python program designed to convert temperatures between Celsius and Fahrenheit. It provides a straightforward, user-friendly interface for easy and accurate temperature conversions.

Features

  • Convert temperatures from Celsius to Fahrenheit 🌡️➡️🌟
  • Convert temperatures from Fahrenheit to Celsius 🌟➡️🌡️
  • Interactive and intuitive command-line interface 🖥️

How It Works

  1. Run the Program: Execute the Python script to start the converter.
  2. Select Conversion Type: Choose whether to convert from Celsius to Fahrenheit or vice versa.
  3. Input Temperature: Enter the temperature value to be converted.
  4. Get Results: View the converted temperature displayed in the selected unit.

How to Use

Running the Program

To run the Temperature Converter script, follow these steps:

  1. Ensure Python is Installed: Make sure Python 3 is installed on your system. You can download it from python.org.

  2. Download or Clone the Repository: Clone the repository or download the temperature_converter.py file.

    git clone https://github.com/mdriyadkhan585/temperature-converter-python.git
    cd temperature-converter-python
  3. Run the Script: Execute the script using Python:

    python temperature_converter.py

Example Usage

  1. Celsius to Fahrenheit:

    • Prompt: Enter temperature in Celsius:
    • Input: 25
    • Output: 25.00 Celsius is equal to 77.00 Fahrenheit
  2. Fahrenheit to Celsius:

    • Prompt: Enter temperature in Fahrenheit:
    • Input: 77
    • Output: 77.00 Fahrenheit is equal to 25.00 Celsius

Code Explanation

  • Functions:
    • celsius_to_fahrenheit(celsius): Converts a Celsius temperature to Fahrenheit.
    • fahrenheit_to_celsius(fahrenheit): Converts a Fahrenheit temperature to Celsius.
  • Main Function:
    • Handles user interaction and displays the conversion results based on user input.

Contributing

We welcome contributions to improve the Temperature Converter. Feel free to fork the repository and submit pull requests for any enhancements or bug fixes.