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

Publicado em: 03 Novembro 2020
no 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


Nesta página do site você pode assistir ao vídeo on-line Working Units Converter in Python for Length | Learn Python From Scratch 7 | Kovolff duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário kovolff 03 Novembro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 523 vezes e gostou 9 espectadores. Boa visualização!