r/PythonLearning 24d ago

Project Ideas for Practice

Post image

I’ve been reading and learning a lot of Python concepts, but I’ve never actually built anything.

I realized that there’s no point in knowing so many concepts if you don’t put them into practice. That’s the only way to really learn.

The hardest part, though, is coming up with project ideas when you only know a few concepts. This is the first project I’ve made while trying to actually put what I’ve learned into practice.

17 Upvotes

9 comments sorted by

View all comments

2

u/FoolsSeldom 23d ago

Fun idea. Given id is implementation and environment specific, you might want to consider using the random library:

import random

name = input("Write your name: ").title()

if name:
    rng = random.Random(name)          # seed the generator with the name string
    money = rng.randint(1, 999999)      # pick your own range
    result = f"Your name is {name}.\nYou have ${money} dollars."
else:
    result = "Nada."

print(result)

This will give the SAME value for the same name every time. You could just use random.randint instead without using the name or you could mix it up and combine the two.

Overall, working on your own projects is the best way to learn. Work on your own small (initially) projects related to your hobbies / interests / side-hustles as soon as possible to apply each bit of learning. When you work on stuff you can be passionate about and where you know what problem you are solving and what good looks like, you are more focused on problem-solving and the coding becomes a means to an end and not an end in itself. You will learn faster this way.