Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Feedback on battle system I made

I note that you're importing random twice. That's not required.

I have only ever used Python 3.x and don't know the Python 2.x syntax well, but I would think that using the second line would make more sense.

enemyhp = enemyhp-legs
enemyhp -= legs
while enemyhp <= 0:
if enemyhp <= 0:
while hp <= 0:
if hp <= 0:

I don't know how much code you have written, but this looks very well written and clean. Beautiful code is good code, so this is pretty good code. Keep up the good work!

Thanks!