def main():
x = int(input("Enter number:\n"))
while (x < 1 or x > 30):
x = int(input("wrong input. Try again:\n"))
n = int(input("Ok. Now enter power of x:\n"))
print(x**n)
if __name__ == "__main__":
main()
def main():
x = int(input("Enter number:\n"))
while (x < 1 or x > 30):
x = int(input("wrong input. Try again:\n"))
n = int(input("Ok. Now enter power of x:\n"))
print(x**n)
if __name__ == "__main__":
main()