#if the user enters 1, it means the square and 2 means the triangle
print("1) Square \n2) Triangle\n")
num1 = int(input("Enter a number: "))
while num1 == 1:
length = int(input("Enter the length(cm): "))
length = length * length
print("The area of the square is:", length)
while num1 == 2:
base = int(input("Enter the base(cm): "))
height = int(input("Enter the height(cm): "))
base = 0.5 * base * height
print(base)
if the user enters 5 for example, how do i make the code repeat back to:
num1 = int(input("Enter a number: "))