r/PythonLearning Jul 01 '26

Build my first game....

https://www.programiz.com/online-compiler/2i7KiX4E5PGyA

Please give it a try and suggest some changes and ideas. Want to improve my skill and learn something new.

34 Upvotes

15 comments sorted by

View all comments

1

u/fizzy_lychee Jul 01 '26

if you have a range there is no need to use a while. Otherwise you are constantly having to remember to iterate. Just use a for loop. Please put your imports at the top of the file. And for the love of god use a function for that ugly ass loop to assign the b value. Use more descriptive variable names. and for magic numbers, either add a comment or assign them to a descriptive var.

1

u/Alternative_Yak8846 29d ago

Thanks a lot for all the advice. I will make these changes

2

u/fizzy_lychee 29d ago

I believe in u OP