I am writing code that will take an integer input from a user. If the integer is greater than 0 then the program will ask the user for a second integer input. If the second integer input is greater than 1 then the program will compute the first number raised to the power of the second number. I am unsure how to correctly implement a while true loop such that when a user enters a wrong input it will reprompt the user for that respective integer i.e. int 1 or 2. Really appreciate some help :)!
while True:
first_num= int(input("Enter the first integer:"))
if(first_num>0):
while True:
sec_num= int(input("Enter the second integer:"))
if(sec_num>1):
print(first_num**sec_num)
break