1hp_cur=int(input("Enter the current number of HP (1-75): "))
2hp_max= int(input("Enter the maximum number of HP (1-75): "))
3hp_dif=(hp_max-hp_cur)
1while True:
2 try:
3 hp_cur=int(input("Enter the current number of HP (1-75): "))
4 except ValueError: # used to check whether the input is an int
5 print("please insert a int type number!")
6 else: # is accessed if the input is a int
7 if hp_cur < 1 or hp_cur > 75:
8 print("please insert a number in the given limit")
9 else: # if number is in limit, break the loop
10 break