Welcome to python!

Being a Computer Science engineer (the nerd in the pic) who is about to complete graduation in a few months, I found python to be one of the easiest to learn languages and also have various implementations and high demand in the market. Like every python professional once did, you need to download and install python from the official website.

Download Python

Installed? Welcome to the family. Now you need a place to write all those python codes that you will learn. I would recommend downing PyCharm but there other great options as well.

Download Pycharm

You are done with all the installation for now. Don’t be intimidated by the dialog boxes and new feel. Just create a new project so you can start writing your code.

Null

Learning theory is as mundane as it gets so just watch the video given below and let's create something! Wanna straight up spam ‘The Bee Movies’ subtitles on someones WhatsApp using 5 lines of python code. Yes? Well okay, but you probably wouldn’t understand the code right now. So we will do it in the blog and video. Let’s make something less dubious yet still fun.


Ever heard of MAD-LIBS! You are about to program it on python. Let’s just clear the prerequisites real quick. We can ask the user for an input using guess what? ‘input()’! See, that is how easy python is. We use ‘print()’ to have output. That’s all you need to know to create mad-libs. Ask the user for all the answers to the blanks, we do that using “input(‘enter a noun:’). This will prompt the user ‘enter a noun:’, user can of course enter any string. You can store the input in a variable [x = input(‘enter a noun:’)]. Now we can print the input along with our mad-lib[print(‘hit me with’, x)]. See what I did there, x will be replaced by your input. Do notice that there is a comma before x and after the string.

Null

Now you know the input-output stuff so we can finally make the game. First, take all the inputs you need to fill the mad-libs line by line. It should look like the image. You can ignore the three print statements at the top. After that, I have stored the inputs in variables with reasonable names. The variable names should be something that is easy to interpret. After you are done with taking inputs, get started with the print statements that will print your mad-lib along with the variables. I would encourage you to find a way to do the next step yourself. If you get an error, try googling it. It’s the most important skill for a programmer. You can also just enjoy the show for now and have a peek at the image below.

Null

You can also copy the code from here. Press shift+f10 to run the code in PyCharm. You can also do it from the nav bar at the top. This is how it looked like when I filled it.

Null

LMFAO right?

Vader in Python Mar 16 2 min vid

Categories: Python Tags: Instagram spambot

Leave a comment

Newsletter Subcribe

We would never unnecessarily distrub you. We just wanna look professional.