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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file degreesconversion-0.0.2.tar.gz.

File metadata

  • Download URL: degreesconversion-0.0.2.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for degreesconversion-0.0.2.tar.gz
Algorithm Hash digest
SHA256 3ac032b677cb6ffe8c6ee5c3bccae9806bbba42066417fe648e57190901c25c4
MD5 015b23d784d46c3e4299f881c45c0b1c
BLAKE2b-256 4d951f0705fe42a222d9d79ca37879f1da3f6311b306780d023a0fdebf770676

See more details on using hashes here.

File details

Details for the file degreesconversion-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for degreesconversion-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1b9742735ac1c245d42b167825608db243fd60b8e550c4a7ad7418208a49d24e
MD5 ed343de85135ec6e360692c138dca054
BLAKE2b-256 ffa9f45653660eff8f2046ee98269161b56d579410f1bc9ab818b8c870adae38

See more details on using hashes here.

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