Python Projects with Source Code
This practice is a compilation of 4 Python projects with source code for beginner – intermediate students willing to level up their programming skills. Remember that you can buy them separately at Practity.
Connor Jones is a Mechanical Engineer and senior Python developer based in the UK. He holds a PhD of Mechanical Engineering and has participated in several research projects at the Imperial College in London.
In this Python practice project you will code a simple version of the famous TV show “The Wheel of Fortune”.
The gameshow is based on solving word puzzles to earn money. All contestants will be shown a number of blank spaces, that make up all of the characters of a common saying. When it is his/her turn, a contestant will be asked to guess a consonant, that is in the saying. If the player is right, the blank spaces will be replaced by the consonant, and they will be given the opportunity to guess the saying to win a prize.
There is no graphical interface, therefore it is a command line game where you are requested write a script to play the wheel of fortune with the same constraints and rules of the show.
The program will ask you to enter the participants, spin the wheel and print the puzzle hidden by underscores. Afterwards, it will request the players to guess the consonants contained in each saying. Finally , the script will also have to store and update the earnings of each player and display the final prize, the saying and the winner if the puzzle is correctly guessed.
It is a great Python challenge to practice “for” and “while” loops, conditional statements and lists. You will also need a few easy libraries like “random” or “string”. Don´t worry if you are not familiar with those libraries, the tasks involving the libraries are very basic. One of the goals of the following challenges is to get used to reading documentation and grasp the basics of new libraries to perform tasks more efficiently.
Write a program to simulate the software behind the street parking machines of European cities.
It is a real life application. There is no graphical interface. Your task is to build the engine embedded in these machines that calculates the final price for any driver willing to park in the city center. The program will have to display the total charge based on the user input as well as multiple conditions such as type of car, parking zone, timetable, etc. Just with conditional statements, “for&while” loops, dictionaries and dates you may complete the assignment. Therefore, it is a fantastic challenge to ensure you understand core tools of Python and you know how to implement them in real-world programs.
In addition, one of the objectives of this practice is to work with dates. Being able to deal with times, date formats, time zones and so on it is an essential skill for any Python learner, so after finishing the project you will gain a deep understanding of the datetime library, and working with dates will no longer be an issue for you.
Write a program to simulate the software that controls the elevators of a new building.
As a result, you will create a command line program that operates the elevators considering multiple factors such as the elevators position, the origin floor and the direction. Like in any building, it will have to show a floor indicator and the status of the elevator: going up or down, closing doors, on hold, and so on.
It is a cool Python challenge for beginners to practice basic Python concepts and learn how to apply and combine them in real applications.
The 3 Python projects come with an extensive guidelines section in the instructions document where you will learn to plan and define the roadmap and the variables required to complete the project before starting to code. Moreover, Connor has broken down the program in small parts, each one with a specific purpose and solved through conditionals or loops. This way you can focus on a particular task and once finished, check if your script yields the same outcome as the solution.
Emma Bateman is a software engineer based in the US. She holds a Bachelor of Science (B.S.), Computer science and a Master of Computational Linguistics.
In this project, you will have to create a keyword cipher, a program to encrypt or decrypt a message taking a keyphrase as input. You will have to combine a keyword cipher and shift cipher to encrypt and decrypt strings.
A cipher is a method to encrypt a string of text. One of the simplest ciphers is a shift cipher. It replaces each letter in a string with the following letter in the alphabet according to the number defined.
For example, using the number 3, the string ‘CAB’ would become ‘FDE’.
A keyword cipher is a little bit more complex and therefore more difficult to crack.
You have to write a program with a simple command line interface so that users can provide the inputs required. You will need to create functions to build encoder/decoder dictionaries, and to encode/decode the message. The whole program is written with dictionaries, “for” loops, if/else statements, functions and lists, so it is a great exercise to practice these Python topics.
DIGITAL DOWNLOAD / CONTENT
After purchase, you will receive an email with a zip file. The download is always available on your Practity account.
The zip includes:
1) INSTRUCTIONS: A PDF with the projects description. It includes a guidelines section and a flow diagram to help you complete the challenges step by step. The projects are broken down in several exercises or hints that you may follow in case you need guidance (36 pages).
2) SOLUTIONS: 4 Jupiter Notebooks with the projects solved. The source code of the Python projects include detailed explanations and comments about how the code works.
IMPORTANT: to see the solutions (Notebook) you need to have Jupyter or the ANACONDA package installed on your machine. If you do not have it, you may download it here. It is free.
WHAT YOU WILL PRACTICE
– Import/read csv files with the CSV library.
– Nested loops.
– Conditional statements.
– String manipulation.
– Loops (while/for).
– List comprehensions.
– “Input” command.
– “enumerate” command in “for” loop.
– Datetime library.
These Python projects are for students that have finished a Python bootcamp or online course and want to implement the theory and concepts learnt in the classes.
If you need additional information, do not hesitate to contact us.
Only logged in customers who have purchased this product may leave a review.