Am I wrong with the coding porting Javascript to Python

subhanshuja

Subhan Nooriansyah

Posted on July 16, 2020

Am I wrong with the coding porting Javascript to Python

Today, i have notification from inspiration @codr [Road to be Genius Superior #51 (https://dev.to/codr/road-to-genius-superior-51-2c3f). Sometimes i used to Javascript for developing web client. My focus already change from software engineering to Data Scientist or Machine Learning. So, i am trying to port javascript to python, i am already creating this gist.Okey, this is the code of Javascript.

Alt Text

The next, it is my code of python. I have tried to understand line by line and porting to syntax python.

Alt Text

I think is not quite different with Javascript but, the result is different, maybe i have missed something in python code.

Alt Text

For better known the result check the blog of @codr , or any idea about this python coding, you can comment here.

💖 💪 🙅 🚩
subhanshuja
Subhan Nooriansyah

Posted on July 16, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related