Python VS Javascript VS Haskell

preview_player
Показать описание
writing a binary to decimal converter, using all3 languages
Рекомендации по теме
Комментарии
Автор

Thanks, Noam! I find it incredibly helpful for learning programming languages to compare how to perform the same task in different languages. I found this video very informative. One potential improvement in the Python code might be to replace the imperative loop with an expression like: return sum(n * 2**I for (i, n) in enumerate(num)). Use of the sum and enumerate functions, as well as a generator expression, may have been outside the scope of this video, but this form is generally considered to be more "pythonic" than using the range and len functions together in the pattern you showed. But your video was quite instructive, so perhaps these points were best left out. Good job anyways!

malcolmolatunji
visit shbcf.ru