# Ask the user for input N = int(input("Enter an integer N (1 ≤ N ≤ 45): ")) # Check if N is within the valid range if 1 <= N <= 45: print("N squared is:", N ** 2) else: print("Invalid input. N must be between 1 and 45.")