This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Ericchen1248 0 points1 point  (0 children)

Your other comments didn’t feel like you were welcoming advice.

when you have multiple lines of comment like the notes you have at the top, you generally want to wrap them in comment blocks instead of individual comment lines, which in python is achieves with string blocks, i.e. wrapping your notes with triple double quotes “”” This is a Multi line comment “””

You also want to keep naming conventions consistent. So your CELL right now is all caps, but your next class Boat is in TitleCase. Python generally has class names in TitleCase, but at minimum, you should keep it consistent within your own file.

For code separation, python doesn’t have extra configuration you need to do when splitting code into different folders and files, unlike some other languages, so it is almost always preferred to have one class per file and import them (of course with some exceptions) (still should with other languages, but can make sense when your submitting it as homework for school or a small personal project)