Monday, 14 August 2017

Monday fun with Python : Collatz sequence

Hello everyone. Today is Monday..well not a big deal and I know everyone knows today is a Monday. Like you I'm not a big fan of Monday, although nowadays I'm waiting eagerly for this day of the week as I get to watch a Game of Thrones episode on this day and I'm sure most of you can reciprocate the same feeling. The only thing I hate the most is the long wait till Monday night till I return to home from office and get to watch that episode for which I wait for one whole week and here I am in office waiting for the day to get over soon.

The plan

To kill the time I do one of the thing that I love the most. Yes, you guessed right? I code. So, I decided to fool around some python programming code to kill the boredom. Without much ado let's code :) I decided to device a python program that would help me to devise a "collatz sequence" In case you are thinking what a "collatz sequence" is then dive into this link here.

The code

The below function is collatz() has one parameter named number. If number is even, then collatz() should print number // 2 . If number is odd, then collatz() should print and return 3 * number + 1.

The below program let's user provide an integer and the program then keeps calling the function collatz() till the function returns 1. It's a simple program but trust me it's very interesting, the reason why it's interesting can be found in the link . Go ahead and have some fun and thank me later.

Subscribe to my youtube channel to watch the coding in this tutorial in action.

If you have any questions, suggestions or comments you can post your comment here or you can also bug me on Quora, Twitter or on Facebook.

Friday, 4 August 2017

Where are the new Python Blogs?

Hello friends I welcome you back after a long long time. It's been nearly 3 weeks since I have posted any blog post here or any new tutorial videos on my youtube channel. Recently I have been involved in many of my pet projects. One of them being studying machine learning, I am a geek at heart and I love to learn new tech things and machine learning is one that ha got me hooked and this is the reason I am spending most of my time studying ML. Meanwhile I am also trying to learn and android development and trying to build an app on my own which is again a totally new field for me and it's taking up a very large chunk of my time not to mention my full time job.

Then there's my youtube channel for which I am trying to develop the best content for you guys and doing this involves a long planning, building the content, editing the videos etc. and this take a lot of time as I am able to devote 30 mins daily at the best to my youtube content creation and that explains the very long gap at which I post blogs or videos.

Oh, there is another thing . I have kind of outgrown blogger in terms of creative freedom so I am also trying to put together a website for you all (like minded geeks like me). This again takes lots of learning as I am not from a coding background and whatever time I am left with after devoting to the above mentioned projects/full time job etc. I use to learn the skills of the trade and put together my website. So in short I want to say that do stay along with me for a while as I haven't disappeared completely, I will be back soon enough.