Skip to main content

A simple temperature conversion package

Project description

Degrees converter

Simple library that converts temperature from one unit to another one(e.g. from Celsius to Fahrenheit).

Every method of the class Converter returns a float rounded to the second decimal figure.

Usage

Import the class Converter and create an instance of the class Converter:

from degreesConversion.converter import Converter

conv = Converter()

and then call the methods of the instance with an int or a float value:

print(conv.celFah(0))
# output: 32.0

The methods can accept a string as argument if it's still a number:

print(conv.celFah("0"))
# output: 32.0

print(conv.celFah("zero"))
# output: Couldn't convert string to float.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

degreesconversion-0.0.2.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

degreesconversion-0.0.2-py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page