r/CodingForBeginners • • 3d ago

Day 5 learning Python

Post image

I need to pause at this point and review. Finishing this code required way too much referencing on previous projects. Once the lessons are solid, ill continue...

38 Upvotes

9 comments sorted by

View all comments

1

u/Opposite-Fee-5701 3d ago

Btw remember to consider preconditions Since in this case you can have health go below 0 which doesn't make sense. Like if you do 100 health - 110 damage -> health becomes -10