0
Iam getting an continue error in this code. How can i solve it?
3 Antworten
+ 3
#You do not need "continue" before if statements and the if statements should be inside the while loop
while fighting:
monster = monster - 1
print('you attacked a monster')
print( monster)
if monster == 15 :
print('it is weakned')
print(monster)
continue
elif monster == 10:
print('almost dead')
print(monster)
continue
elif monster <= 0 :
print('dead')
break
Here for another version👇
https://code.sololearn.com/cGdt8RagvOCi/?ref=app
+ 2
Thank you very much
+ 1
poor monster 😢