Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rkstudio585/temperature-converter-python

A simple Python script that converts temperatures between Celsius and Fahrenheit. It provides a user-friendly command-line interface to input and convert temperatures, displaying results clearly. Ideal for quick conversions and learning basic Python programming concepts.
https://github.com/rkstudio585/temperature-converter-python

conversater program programming python python3 rk rk-studio temperature temperature-converter-python

Last synced: 6 days ago
JSON representation

A simple Python script that converts temperatures between Celsius and Fahrenheit. It provides a user-friendly command-line interface to input and convert temperatures, displaying results clearly. Ideal for quick conversions and learning basic Python programming concepts.

Awesome Lists containing this project

README

        

# Temperature Converter 🌡️
---
[In c script](https://github.com/mdriyadkhan585/temperature-converter-C)

![Logo](logo.svg)

---
## 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](https://www.python.org/downloads/).

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

```bash
git clone https://github.com/mdriyadkhan585/temperature-converter-python.git
cd temperature-converter-python
```

3. **Run the Script**:
Execute the script using Python:

```bash
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.

---