Light Mode
Dark Mode
I don't understand conditions

If in the end of the turn the first warrior has > 0 health and the other one doesn’t, the function should return True, in the other case it should return False.

If fight() function should return result of one turn, it won't get to True in the first round.

If fight() function goes on until one of the warriors is dead, it will never return False. Why is asserting

fight(chuck, bruce) == True
fight(dave, carl) == False

?

Created: Jan. 16, 2019, 4:13 a.m.
Updated: March 25, 2019, 4:05 p.m.
1
14
User avatar
Marlen_Nurmakov