52
What was the smallest python hobby project you worked on?
(sh.itjust.works)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
I first built a dice roller : the core is just a call to random.randint module, but you need to have the terminal interface to get the instruction ( like "4d6" means you need to have 4 times random generation between 1 and 6). You can do it only with regexp, and if you want to get fancy you can try and find solutions to have compounded formulas, try to have the results stored during a game session, etc.
Second project was a small game: the idea was to have a map of coordinates (xy), and each game has random spawning of 2 goblins and 3 gold within the map ; the goal is to move around (nswe) getting the 3 gold without hitting a goblin.
So also no graphic representation of the map, you just have the game running at each keystroke.
You just need to be able to define functions and do string manipulation ; for logic you can stay with if-then-else and while loop.
And good luck with the learning !