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...")