<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convert(filename, num_questions=None, solution=False, pages_per_q=DEFAULT_PAGES_PER_Q, folder='question_pdfs', output='gradescope.pdf', zoom=1):
 """ Public method that exports nb to PDF and pads all the questions. If num_questions is specified, will also check the final PDF for missing questions. If the output font size is too small/large, increase or decrease the zoom argument until the size looks correct. If solution=True, we'll export solution cells instead of student cells. Use this option to generate the solutions to upload to Gradescope. """

    check_for_wkhtmltohtml()
    save_notebook(filename)

    nb = read_nb(filename, solution=solution)
    pdf_names = create_question_pdfs(nb,
                                     pages_per_q=pages_per_q,
                                     folder=folder,
                                     zoom=zoom)
    merge_pdfs(pdf_names, output)

    # The first pdf generated is the email PDF
    n_questions_found = len(pdf_names) - 1
    if num_questions is not None and n_questions_found != num_questions:
        logging.warning(
            'We expected there to be {} questions but there are only {} in '
            'your final PDF. Gradescope will most likely not accept your '
            'submission. Double check that you wrote your answers in the '
            'cells that we provided.'
            .format(num_questions, len(pdf_names))
        )

    try:
        from IPython.display import display, HTML
        display(HTML(DOWNLOAD_HTML.format(output)))
    except ImportError:
        print('Done! The resulting PDF is located in this directory and is '
              'called {}. Upload that PDF to Gradescope for grading.'
              .format(output))
        print()

    print('If the font size of your PDF is too small/large, change the value '
          'of the zoom argument when calling convert. For example, setting '
          'zoom=2 makes everything twice as big.')