number_of_questions = int(input('\nNumber of Questions: '))
    perfectsq_neg_output = FactorisationGenerator.perfectsq_neg(number_of_questions)

else:
    print('\nInvalid input.')
    quit()


# Preparing output and descriptions
output = []
description = []

# Perfect squares - positive
description.append('\n\n\\item Factorise the following expressions using the algebraic fact that $(a+b)^2 = a^2 + 2ab + b^2$.')
output.append(perfectsq_pos_output)

# Perfect squares - negative
description.append('\n\n\\item Factorise the following expressions using the algebraic fact that $(a+b)^2 = a^2 - 2ab + b^2$.')
output.append(perfectsq_neg_output)


file = open("perfect_squares.txt","w")
Print.doc_format(title,set_number,date,output,description,file)
file.close()

print('\n\n\nText file have been produced. Please copy and paste onto LaTeX and compile.')
print("\nThank you for using WhyTi's review set maker :)")

any_key = input('\n\n\nPress any key to exit.')
quit()