The python programming language continues to grow in popularity especially amongst those new to coding.
This is due to several reasons. For example, python’s syntax is simple to pick up compared to other languages. It also maintains good documentation and has huge support within the programming community. It’s for good reason that python is amongst the top 3 most loved programming languages according to the stackoverflow 2020 survey.
If python is your first programming language, welcome to the world of coding! A piece of advice, the best way to accelerate your journey as a coder is to actively work on coding projects.
To help you out with this, we’ve formed this list of python project ideas for beginners that you can take up to grow your knowledge of the language.
Related: See other ways you can grow your programming skills in 5 ways to help you practice coding.
No matter how simple a project is, you’ll learn a language much quicker by working on code with an end goal, than just going through tutorials.
So this post is for those of you practical folks looking to take your learning of python to a new level by working on some real coding projects! We’ll describe 5 creative but simple python project ideas for beginners.
This list is roughly from the easiest to the most difficult project. You can make this a challenge for yourself and work through these projects from 1 through to 5.
If you already consider yourself familiar with python, this challenge is also for you! Although it’s a list of python project ideas for beginners, there’s no harm getting some practice and brushing up on the basics.
Project 1: A command line quiz
A quiz over a command line interface. When the program is run, prompt the user to answer some questions and let them know if they are correct or wrong.
The type of quiz and number of questions you want to ask to the player is completely up to you! Make it as easy or as difficult as you want it to be.
Why not also try a score tracking system? Ask the player a set number of questions and on completion let them know their result.
What you’ll learn
Accepting user inputs: The program needs to read the answer from the player over the command line.
Comparing variables: The player input will be compared will the correct answers stored within your program.
Handling lists and/or dictionaries variable types: You’ll likely need to use lists, dictionaries or similar to store the quiz questions and equivalent answers. This will teach you how to handle such variable types.
Project 2: A zipped backup of a list of directories
Create your own custom backup script. This program will zip up all folders you list, acting like a backup. When run, the program will read a list of directories from a file, navigate to each one, copy them all into a single folder and zip the folder.
You can also add some additional functionality to the program such as renaming the backup folder according to date and time of the backup.
What you’ll learn
Directory handling with Python: You’ll need to go to each directory on the file system and copy it to a central location before zipping the folder.
Zipping folders using Python: You’ll also need to know how to zip directories.
Hint: See the zipfile Python module.
Reading user configuration: The list of directories to backup can be listed in a file. There are a number of ways you can do this such as using a plain text file and reading the list of directories from there. It’s also worth considering using various configuration type file formats such as .ini files.
Hint: Python has a standard module ConfigParser for handling .ini files.
Project 3: Workflow automation to setup your workspace
Create a one click method of launching your project workspace such as applications and tools needed to start your day.
As an example: You are a developer and everyday when you boot up your PC you open Visual studio code within a directory on your PC called /home/user/source, launch your browser and open GitHub and on another browser tab open your gmail account.
Take this example and write a program that in one click will launch all these applications for you. Of course, you can configure this to suit your own needs. If there are applications and other IDEs you launch for your work, automate opening these at once with a python program.
What you’ll learn
Executing OS commands through python: If launching an editor such as visual studio code, you’ll need to know how to execute OS commands using python.
Launching URLs within a browser: For example, for launching the URL for GitHub and your emails.
Hint: See the webbrowser python module.
Project 4: A personal timer
A timer to remind you to carry out certain tasks when time is up.
As an example: Every 2 hours, a sound will ring and a pop up will appear on your screen saying “Time to drink some water!”. And every day at 5pm a reminder will pop up saying “Time for your daily walk!”.
You can also make this timer and use it as a configurable timer. One way to do this is to pass in the time to run when running the program. For example, say the program is called start-timer.py. Then running the application by typing python start-timer.py 30 will start a 30minutes timer. When time is up it will ring and alert you with a pop up.
Have fun with this and in the end it’s up to you how you want to configure the application!
What you’ll learn
Handling time based tasks in Python: You’ll learn how to use timer based functions.
Producing sounds and desktop pop ups with Python: To alert you when time is up.
Taking command line arguments: This is needed when you wish to set the timer duration over command line.
Project 5: A web scraper to extract headlines from a web page
A web scraper is an application that extracts (or “scrapes”) data from websites.
Use a web scraper to launch any web page of your choice containing a list of headings and to print each of the headings on the web page to a file.
As an example: Write a web scraper that performs a google search of any word. Then on the search results page, export the first 10 search headlines to a file.
What you’ll learn
Automating a web browser: You’ll learn how to launch a browser and perform various actions on it using python.
Hint: I recommend using the selenium python package for this purpose. Selenium is purposely built for controlling web browsers in an automated manner.
Inspecting elements on a browser: Web Pages are made up of HTML elements which can be inspected on the browser. You’ll learn how to navigate around various elements on the page when you’re locating the headings on the web page.
Manipulating HTML elements on a web page: Extracting HTML elements and performing actions such as clicks and form entries are key functions of web scraping applications. This is a very useful skill to learn and will open up endless automation possibilities.
To help you out with this particular project we have a full tutorial on web scraping you can check out: Learn web scraping with Python in minutes: The basics using selenium
These are 5 creative python project ideas for beginners that anyone learning the language can try. Have a go at these projects regardless of how little or how much time you’ve spent learning python.
Remember, the best way to learn a language is to get stuck into a project!
Will you take on the challenge? Do you have any other suggestions for python project ideas for beginners? Comment below!