Calculating the percentage on Python 2.7
I take it from your code the game works like this:


Each player enters their names. The names can't be blank nor the same with each other.
A coin is tossed to determine the turn order.
The turn player decides the amount of damage (M) he wants to deal against the other player. The chance of dealing damage is calculated by (100 - M).


With that, I have this code:

player1, player2 = input_player_names()
print("Welcome to the game {} and {}".format(player1, player2))
print("Tossing coin... Heads for {}; tails for {}".format(player1, player2))
turn_order = determine_turn_order([player1, player2])
print(turn_order[0], "plays first")
play(turn_order)


And the respective implementations:

def input_player_names():
    player1 = ""
    player2 = ""
    while player1 == "":
        player1 = input("Player 1, please enter your name.")
    while player2 == "" or player2 == player1:
        player2 = input("Player 2, please enter your name.")
    return player1, player2

def determine_turn_order(player_list):
    turn_order = []
    toss = random.randint(0, 1)
    turn_order.append(player_list[toss])
    turn_order.append(player_list[toss + 1 % 2])
    return turn_order

def play(turn_order):
    player_health_points_list = [50, 50]
    turn_number = 0
    while there_are_no_winners_yet(player_health_points_list):
        turn_player = turn_order[turn_number % 2]
        player_is_sure = False
        chance = 100
        damage_to_deal = 0
        while not player_is_sure:
            damage_to_deal = input(turn_player + " enter damage you want to deal: ")
            damage_to_deal = int(damage_to_deal)
            chance = chance - damage_to_deal
            if chance &lt; 50:
                player_is_sure = bool(input("You have only a {}% chance of dealing damage. Are you sure you want to push through? Input 1 for yes; 0  for no.".format(chance)))
            else:
                player_is_sure = True

        # Here's how I'd calculate determine whether the attack hits or not
        if chance &gt; random.randint(1, 100):
            player_health_points_list[(turn_number + 1) % 2] -= damage_to_deal
        turn_number = turn_number + 1
        print(turn_order[0], '|' * player_health_points_list[0])
        print(turn_order[1], '|' * player_health_points_list[1])
    declare_winner(turn_order, player_health_points_list)

def there_are_no_winners_yet(player_health_points_list):
    return player_health_points_list[0] &gt; 0 and player_health_points_list[1] &gt; 0

def declare_winner(turn_order, player_health_points_list):
    print("The winner is {}".format(turn_order[0] if player_health_points_list[0] &gt; player_health_points_list[1] else turn_order[1]))