11 Python Projects Junior Developers Can Build for Coding Practice

11 Python Projects Junior Developers Can Build for Coding Practice:

 

To build mastery in software development, you should build projects.

Not one.

Not two.

Lots of projects!

But you have to start right. If you jump into any random project as a beginner or junior developer, you’ll not only feel lost, you’ll begin to doubt if programming is for you. So work smart.

Start small.

First, build your confidence from one tiny project. Then another tiny project. After multiple small projects, move on to something bigger, and go as big as your imagination allows.

Before you build any project, learn the basics

If you don’t learn the basics, you’ll build on a shaky foundation.

Colorful Stack

No matter the level of mastery you hope to get to in Python, you’ll need these fundamentals in place before you jump into any project.

You need to know how to:

  • declare variables
  • collect user input
  • store information
  • repeat an action through loops
  • write functions to repeat blocks of code

That’s it.

Of course there’s more to learn in Python, but these are standard things you need to know and they’ll be good enough for you to jump into beginner projects.

There’s that tempting feeling that you need to finish lots of Python tutorials before you work on any project.

Don’t do it.

Many fall into the trap of learning back to back Python tutorials waiting to feel super ready. Instead, learn the basics first. Next, build some tiny projects. Then return to learning with more tutorials.

Trust me, you can finish 100 Python tutorials and still feel you’re not ready to build any projects.

Studying alone is not enough.

You need to build.

How to use these projects

  • First, read through the instructions and make sure you understand what you’ve read. Try to say what you read in your own words.
  • Attempt to solve it on your own without going through the YouTube tutorial or example code on Github. You’ll most likely struggle. That’s fine. Push yourself. This is the idea of deliberate practice from Behavioral Psychology.
  • If you haven’t made any progress at all, watch the YouTube tutorial where available then look through the example code. You can also search online to see more example tutorials and Python code for the same problem.
  • After going through, go back and try to write the code by yourself without looking at the tutorial. Again, push yourself. This is grit also from Behavioral Psychology. You need it.
  • Whatever you do, do not blindly copy out the code in the tutorial, then pat yourself on the back. You may finish quickly but the reality is you haven’t learned anything.
  • If you feel you’re completely stuck after lots of attempts, take a break. When you step away, we know from Neuroscience research that your subconscious will continue the learning. This is because your mind has shifted from focused mode to diffused mode.
  • Whenever you solve something, celebrate it! You need the positive reinforcement to build internal references that you did it. In the future when your mind whispers “you can't do it” during a moment of doubt, you’ll reply “that's not true, here's proof of what I did in the past so I can do this too”.
  • Repeat, repeat, repeat.

You can also use this breakdown for any project beyond the ones listed below. Let’s get to the Python projects.

Projects for junior Python developers

Here are some beginner-friendly projects for you to work on:

  1. Odd or even
  2. Mad Libs Game
  3. Word Count
  4. Biography info
  5. What’s my acronym?
  6. Rock, Paper, Scissors
  7. Guess the number
  8. Is a palindrome
  9. Calculate the tip
  10. Email slicer
  11. Lyrics generator

Odd or even

Welcome a user then ask them for a number between 1 and 1000.

When the user gives you the number, you check if it’s odd or even and then you print a message letting them know.

Example:

  • Prompt: What number are you thinking?
  • Input: 25
  • Output: That's an odd number! Have another?  

Mad libs game

Ask the user for an input.

This could be anything such as a name, an adjective, a pronoun or even an action. Once you get the input, you can rearrange it to build up your own story.

Word count

Ask the user what’s on their mind. Then after the user responds, count the number of words in the sentence and print that as an output.

Example:

  • Prompt: what's on your mind today?
  • Input: well, it's just a day for me to be an expert in coding
  • Output: oh nice, you just told me what's on your mind in 13 words!

To take this a step further, open a file that is handed to you, count the number of words in there, then print it out.

Here’s some example code on Github.

Biography info

Ask a user for their personal information one question at a time. Then check that the information they entered is valid. Finally, print a summary of all the information they entered back to them.

Example: What is your name? If the user enters * you prompt them that the input is wrong, and ask them to enter a valid name.

At the end you print a summary that looks like this:

- Name: John Doe
- Date of birth: Jan 1, 1954
- Address: 24 fifth Ave, NY
- Personal goals: To be the best programmer there ever was.

What’s my acronym?

Ask the user to enter the full meaning of an organization or concept and you’ll provide the acronym to the user. For example:

  • Input -> As Soon As Possible. Output -> ASAP.
  • Input -> World Health Organization. Output -> WHO.
  • Input -> Absent Without Leave. Output -> AWOL.

Rock, Paper, Scissors

This is a popular game played between two people. Each player gets to form one of three shapes using their hand:

  • rock (a closed fist)
  • paper (a flat hand)
  • scissors (a fist with the index finger and middle finger extended, forming a V)

Here’s a youtube tutorial on coding up rock-paper-scissors in Python.

Guess the number

You ask a user to guess a number between 1 and 50.

If they guess outside that range, you prompt with an error encouraging them to choose a number within the proper range.

Whenever they guess the wrong number you ask if they want to keep playing or if they’d like to quit.

Finally, when the user eventually guesses the right number you congratulate them and show the number of attempts they had.

Here’s a youtube tutorial on coding up a number guessing game in Python.

Is a palindrome

Ask the user to give you five words. Then check if any of the five words is a palindrome.

A palindrome is a word that remains the same whether it’s read forward or backward.

Example:

  • madam is a palindrome.
  • so is malayalam.
  • But not geeks.

Here’s some example code from Github.

Calculate the tip

Your goal is to find out exactly how much tip you should give after receiving a service. In this scenario, ask for the total bill. Then display the tip for 18%, 20% and 25%.

Example:

  • Prompt: what's the total bill for today, please?
  • Input: $55.87
  • Output: 18% tip is $10.06, which brings your total to $65.93

Remember you want to be nice, so don’t forget to round up. To push this more, ask for the number of people involved, then evenly split the tip and total cost among them.

To go even a step further, split unevenly (for example, one person pays 70% of the bill while the other pays 30%)

Email slicer

Collect an email address from the user and then find out if the user has a custom domain name or a popular domain name. For example:

  • Input: mary.jane@gmail.com
  • Output: Hey Mary, I see your email is registered with Google. That's cool!.
  • Input: peter.pan@myfantasy.com
  • Output: Hey Peter, looks like you've got your own custom setup at MyFantasy. Impressive!.

This is a convenient python project that has a lot of use in the future. The program helps get you the username and domain name from an email address.

If you want to push this further, you can customize the application and send a message to the host with this information.

Here’s a Youtube tutorial and example code from Github.

Lyrics generator

Ask a user to choose from a list of 10 songs. When the user does, you print out the lyrics to the song they selected.

Example:

Welcome, please select a select a song from this top 10 songs:

1. Baby by Bieber
2. Hotline Bling by Drake
3. Flawless by Beyonce
4. Fall by Eminem...
You chose Flawless by Beyonce. Here you go:

------- Flawless by Beyonce ------------
I'm out that H, town coming coming down
I'm coming down, drippin' candy on the ground
H, Town, Town, I'm coming down, coming down
Drippin' candy on the ground...

Press * to choose again.

To push it further, have at least 3 songs by the same artist.

Next, ask the user to put the name of the artist so you can show them only options by that artist. Then the user can select a specific song from that list.

Closing out

Working on these projects, you might hit a road block and get completely discouraged. It’s okay. You’ll get through.

from Tumblr https://generouspiratequeen.tumblr.com/post/642753776498982912

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s