#Latin Squares cont = True while(cont): #Input power = int(input("Please input the order of the square: ")) start = int(input("Please input the top left number: ")) print("The Latin Square is:") #Column for row in range(1,power+1): #Row rowStart = start for num in range(1,power+1): print(rowStart, end=" ") rowStart += 1 if rowStart > power: rowStart = 1 print("") start = start+1 if start > power: start = 1 #Continue? contInput = input("Would you like to continue? (yes/no): ") if contInput != "yes": cont = False