← Back to Blog

Your First Mini Project — Put It All Together

The problem...

You've learned variables, strings, methods, input, and output.

But you've never used them all together. Not yet.

It's time to build something real.

The idea!

You're going to build a username generator.

The user types their name and birth year. Your program creates a username.

Simple. But real.

What you'll use

  • input() — to get data from the user
  • string methods — to clean and transform the input
  • f-strings — to build the final output
  • slicing — to take only what you need

Step by step

First, get the data:

name = input("Enter your name: ")
year = input("Enter your birth year: ")

Clean and transform:

name_clean = name.strip().lower()
year_short = year[-2:]

Build the username:

username = name_clean + year_short
print(f"Your username is: {username}")

If the user types "Bull" and "2001":

Output → Your username is: bull01

The full program

name = input("Enter your name: ")
year = input("Enter your birth year: ")

name_clean = name.strip().lower()
year_short = year[-2:]

username = name_clean + year_short
print(f"Your username is: {username}")

Six lines. Real output. Your first mini project.

Going further

Make it more interesting — add a fixed prefix:

name = input("Enter your name: ")
year = input("Enter your birth year: ")

name_clean = name.strip().lower()
year_short = year[-2:]

username = "rhd_" + name_clean + year_short
print(f"Your username is: {username}")

Output → Your username is: rhd_bull01

What's really happening

You didn't learn anything new in this article.

You just used everything you already know — together.

That's what programming is. Small pieces, combined.

Heads up!

  • If the user types extra spaces, strip() handles it
  • If the user types their name in uppercase, lower() handles it
  • year[-2:] always takes the last two characters — works for any year format

The mindset shift

Stop thinking: "I need to learn more before I can build something."

Start thinking: "What can I build with what I already know?"

What you should understand now

  • Small concepts combine into real programs
  • You already know enough to build useful things
  • Clean input before you use it — always
  • Every project starts with a simple idea
[ login to bookmark ] // copied! 49 views · 1 min
// resources
Exercise username_generator.py
← prev Your Program Is Listening next → Common String Mistakes
// 0 comments
// No comments yet. Be the first.
// leave a comment

// Your comment will appear after approval.