15% off e-learning, plus packs & blended courses

20% off virtual courses

Use offer code: EARLY0624NZ
Learn now, pay later – payment options available

6 fun Python projects to build your data science portfolio

Who said creating Python projects to build your data science portfolio couldn’t be fun?

When it comes to learning a new language like Python, it’s hard to know where to start, especially when you’re looking to improve your data science repertoire.

However, the good news is that your journey of development from Python beginner to whizz doesn’t have to be a drab and uninspiring affair. In fact, learning by play for adults is critical. It’s also great for improving brain functionality and stimulating creativity too.

So, if you want to learn Python quickly, don’t feel like you have to get lost in complex articles or books all the time. Instead, mix up your learning by trying these top learning project ideas and games designed to build your data science portfolio.

Rolling the dice

One of the easiest ways of learning how to program in Python is to build a simple dice game.

Using the random module, you set two variables (min and max), plus the lowest and highest numbers for the dice.

The addition of a loop will allow you to roll the dice again and again, with the roll again set to any value. However, you can always add other variations to mix it up.

For inspiration, use PythonForBeginners’ rolling the dice Python script.


One of the coolest ways of dipping your toe into the world of Python is to build the classic game of Hangman.

The word to guess is represented by a row of dashes and the script will automatically write in all of the correct positions when the player guesses a correct letter.

You can download a ‘SOWPODS’ dictionary file or CSV file to use as a way of generating a random word to use.

There are several ways to change the variables to make it more challenging – such as reducing the number of lives for guessing wrong letters. To see how it’s done, PythonForBeginners has written a handy Hangman script.

Rock, Paper, Scissors

The next Python game to try building is Rock, Paper, Scissors.

This project will give you a better understanding of while loops and if statements, as there are many variables based on the outcome of the computer’s decision and yours.

Once the while loop starts, the computer will wait for you to make a play and the if statements will check every possible outcome of the game to display a message stating the winner or a tie.

Here’s a basic Python script for Rock, Paper, Scissors, courtesy of The HelloWorld Program.


The next on our list is a game you play, rather than build. Although CodeCombat is aimed at teachers and students, it’s a highly effective Python tutorial for beginners too.

Start on the Dungeon Level, moving your hero through the game only using basic coding commands, as instructed with the handy tutorials.

This fantasy extravaganza is a great way to add some adventure into your journey from Python beginner to expert. CodeCombat is also very good for learning JavaScript, CoffeeScript or the Lua game scripting language as well.

Guess the number

While a guess the number game might not be as riveting as a vast open-world game, it’s an exciting way of learning the art of using random modules.

Write a program where the computer generates any number between 0 and 20, with the user tasked with guessing what number it is.

If the user is wrong, the program will tell them whether they’re too high or too low. You can find a basic Python guess the number script on Code Maven.

Password generator

A password generator is a fun Python project to build your data science portfolio and protect important online information.

Simply write a program which generates a random password for the user. When coded, it’ll ask them how long they want their password to be and how many letters and numbers they want it to consist of. You can also build it to ask how many uppercase and lowercase letters users want to use as well.

Follow the guide and try your luck at building an effective Python password generator at Raspberry Pi Projects.

So, ready to level up?

At ILX, we provide first-class certification training for professionals looking to excel in the real world of data science.

If you’d like to take one step closer to mastering Python coding, then explore our full range of data science courses here.

Or if you’re struggling to decide which language to learn first, feast your eyes on our previous blog; Python, R or SAS: which language should data scientists learn first?