import random l = 10 lx = 10 a = 10 d = 10 ax = 10 dx = 10 while l or lx > 0 : dam = random . randint ( 0 , ax ) - random . randint ( 0 , d ) if dam < 0 : dam = 0 damx = random . randint ( 0 , a ) - random . randint ( 0 , dx ) if damx < 0 : damx = 0 l = l - dam lx = lx - damx print ( 'You' ) print ( l ) print ( '' ) print ( 'Enemy' ) print ( lx ) print () input () if l != 0 : print ( 'You Win!' ) if l == 0 : print ( 'You Lose!' )