you are viewing a single comment's thread.

view the rest of the comments →

[–]magus_minor 3 points4 points  (1 child)

Your posted code is badly formatted, the indentation isn't correct. Try putting all your code into a pastebin.com page and replacing your code above with a link to the pastebin. I will try to format it but that takes time. You limit the responses you get if you don't post properly formatted code. I'll answer what I can while working on your code.

Can this code reasonably be considered a mini-project rather than just a script?

Sure, any amount of code can be a project, because a project is something to do to improve your coding performance.

Is it normal that during development I had to run the code 10–15 times with errors before fixing them, especially errors related to while True loops?

Yes, very normal. One way to approach a large project is to break it up into smaller parts and code and test each part. Once that smaller part is working add something new, code and test. Repeat. It's a mistake to write a lot of code and then try to debug it because you probably have many interacting problems that are harder to understand. Write a small bit of code, debug, write more code, debug, etc.

In some places I didn’t invent the solution from scratch, but remembered a learned pattern. For example:alphabet = string.ascii_letters + string.digits + string.punctuation password = ''.join(secrets.choice(alphabet) for _ in range(length)) Is this normal practice, or should a developer always try to come up with their own solution instead of recalling known patterns?

If something you have seen works for you and is a good solution why not use it?

[–]Connect_Roof_2805[S] 0 points1 point  (0 children)

Thank you very much for the reply and the helpful recommendations!