Python3 Health System I made a code for a health system for the game I'm creating. I made it myself and I wanted some criticism on how to make it better. Thanks for viewing.

## Health system
import time
SH = 100
PA = True
while PA == (True):
  DMG = input("How much damage would you like to take?" )
  Output = int(SH) - int(DMG) 
  if Output == (80):
    print("You took 20 damage!")
    print(" --------------")
    print("|■■|■■|■■|■■|  |")
    print(" --------------")
  elif Output == (60):
    print("You took 40 damage!")
    print(" --------------")
    print("|■■|■■|■■|  |  |")
    print(" --------------")
  elif Output == (40):
    print("You took 60 damage!")
    print(" --------------")
    print("|■■|■■|  |  |  |")
    print(" --------------")  
  elif Output == (20):
    print("You took 80 damage!")
    print(" --------------")
    print("|■■|  |  |  |  |")
    print(" --------------")
  elif Output == (0):
    print("You took 100 damage!")
    print(" --------------")
    print("|  |  |  |  |  |")
    print(" --------------")
    print("You died!")
  else:
    print("That isn't a command")

  PA = input("Would you like to play again? |Y/N| ")
  if PA == ("Y"):
    PA = True
  elif PA == ("N"):
    PA = False
    print("The program will now close")
    time.sleep(5)
  else:
    print("That is not a command...")
I gotta start by saying it's weird to ask how much damage you want to take, my answer would always be zero, you know!

Your variable names could be more descriptive.

I understand that DMG means damage, SH would be.. something health? 

Well I guess you see my point, if we don't know what the variable name means, it's harder to figure out what it does.

Considering the PEP8 guidelines towards Python, your variable should never contain upper case.

So I would change : 

DMG -&gt; damage
SH -&gt; total_health
Output -&gt; remaining_health
PA -&gt; play_again


In your input you ask how much damage should be dealt. There are much more options that are invalid than valid ones. I mean, I can enter 0,20,40,60,80,100 but I can't enter any other number, so there are much more chances I face the "That isn't a command" error message than anything else.

If the only options are the values from 0 to a 100 that are multiples of twenty, you should specify it in your message : 

"How much damage would you like to take? [0,20,40,60,80,100]"


There is no real advantage for the Output variable at this moment. You want to print how much damage is dealt and an health bar that corresponds to the remaining life.

if damage == 20:
    print("You took 20 damage!")

Or, even better, use the .format method. 

print("You took {0} damage!".format(str(damage))


Then you could print the health bar. I don't want to go deep in details but you could write a function like print_remaining_health_bar(total_health,remaining_health) that would print according to the parameters instead of repeating this piece of code every time.

All in all you could remove the whole if/else business (except for your input validation, which is important) and have :

print("You took {0} damage!".format(str(damage))
remaining_health = total_health - damage
print_remaining_health_bar(total_health,remaining_health)


There's also a small problem with your code. When asked if I want to play again, if I enter an invalid command, I'd just restart the game.