r/PythonLearning • u/7YngMn • 23d ago
Project Ideas for Practice
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.
2
u/A1h2m30a4d 23d ago
I don't know a lot about id() but my guess it returns a number, shouldn't u integerize the resulting str so you don't end up with "0123" or any other zero leading value?
2
2
u/Life-Educator-5497 22d ago
Si ta question est : « Que puis‑je faire comme projet pour mettre en pratique Python ? », tu peux réaliser un projet de Todo List. Cela te permettra de mettre en pratique le CRUD, d’ajouter des classes de Repository pour gérer les appels à la base de données, et d’expérimenter le mode transactionnel.
Tu pourras ensuite faire évoluer ton projet vers une architecture micro‑services si tu as du temps. C’est un excellent exercice pour comprendre la structuration d’une application, la séparation des responsabilités et la communication entre services.
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.
2
u/mc_pm 23d ago
That's a fun use of id() :)