Working Units Converter in Python for Length | Learn Python From Scratch 7 | Kovolff

Publicado el: 03 noviembre 2020
en el canal de: kovolff
523
9

In this video we brought our unit converter a step closer to the one found in Google Search, in that we’re now able to convert from any length dimension to any other length dimension

To do this:
We require from the user three inputs:
Value to be converted
Unit to convert from
Unit to convert to

Based on the last two inputs, we create an elaborate dictionary with all possible length conversions. The keys in this dictionary follow the pattern from_unit-to_unit

Once our dictionary and inputs are set up, our application is then ready to go.

As a final touch we added an if condition that prints the converted value if the user inputs the right info. However should the user input any incorrect data,the app would then state that he’s made an error in his inputs.

The code of this iteration is upload on GitHub:
https://github.com/zaittworks/baselin...

#python #beginner #app


En esta página del sitio puede ver el video en línea Working Units Converter in Python for Length | Learn Python From Scratch 7 | Kovolff de Duración hora minuto segunda en buena calidad , que subió el usuario kovolff 03 noviembre 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 523 veces y le gustó 9 a los espectadores. Disfruta viendo!