r/PythonLearning • • Sep 17 '26

Discussion Recently started learning python from BroCode and I’m 1 and a half days in.(around 5 hours of actual learning) and when he said to do an input validation project I did it myself before looking at his example. Which one is better? Wanna see if I should use his style for input validation or not

Left one is mine and right one is BroCode’s

169 Upvotes

41 comments sorted by

View all comments

1

u/Sea-Ad7805 Sep 17 '26

And separate the error checking from your "normal" code, and don't mix your logic and printing, so maybe do it like this.

1

u/abt-dabest Sep 17 '26

This all sounds and looks pretty foreign to me right now considering I’m only 5 hours in, but i will definitely save this advice to use later when I’ve learned more, thanks!

1

u/Sea-Ad7805 Sep 17 '26

Cool, good luck on your learning journey.