Skip to content

nicola-lamaddalena/Degrees-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Create an instance of the class 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.

About

Python library that converts temperatures between Celsius, Kelvin and Fahrenheit

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages