Problem Set 2

What to Do

  1. Log into code.cs50.io using your GitHub account
  2. Run update50 in your codespace’s terminal window to ensure your codespace is up-to-date and, when prompted, click Rebuild now
  3. Submit Readability

    Getting Started

    Start by clicking inside your terminal window, then execute cd by itself. You should find that its “prompt” resembles the below.

    $

    Click inside of that terminal window and then execute

    wget https://cdn.cs50.net/2022/fall/psets/2/readability.zip

    followed by Enter in order to download a ZIP called readability.zip in your codespace. Take care not to overlook the space between wget and the following URL, or any other character for that matter!

    Now execute

    unzip readability.zip

    to create a folder called readability. You no longer need the ZIP file, so you can execute

    rm readability.zip

    and respond with “y” followed by Enter at the prompt to remove the ZIP file you downloaded. Finally, right-click or control-click on the readability folder and click “Open in CS50 Lab”. You should see the specification for this problem on the left-hand side and its distribution code on the right-hand side.

  4. Submit one of:
    • Bulbs, if feeling less comfortable
      Getting Started

      Start by clicking inside your terminal window, then execute cd by itself. You should find that its “prompt” resembles the below.

      $

      Click inside of that terminal window and then execute

      wget https://cdn.cs50.net/2022/fall/psets/2/bulbs.zip

      followed by Enter in order to download a ZIP called bulbs.zip in your codespace. Take care not to overlook the space between wget and the following URL, or any other character for that matter!

      Now execute

      unzip bulbs.zip

      to create a folder called bulbs. You no longer need the ZIP file, so you can execute

      rm bulbs.zip

      and respond with “y” followed by Enter at the prompt to remove the ZIP file you downloaded. Finally, right-click or control-click on the bulbs folder and click “Open in CS50 Lab”. You should see the specification for this problem on the left-hand side and its distribution code on the right-hand side.

    • Caesar, if feeling less comfortable
      Getting Started

      Start by clicking inside your terminal window, then execute cd by itself. You should find that its “prompt” resembles the below.

      $

      Click inside of that terminal window and then execute

      wget https://cdn.cs50.net/2022/fall/psets/2/caesar.zip

      followed by Enter in order to download a ZIP called caesar.zip in your codespace. Take care not to overlook the space between wget and the following URL, or any other character for that matter!

      Now execute

      unzip caesar.zip

      to create a folder called caesar. You no longer need the ZIP file, so you can execute

      rm caesar.zip

      and respond with “y” followed by Enter at the prompt to remove the ZIP file you downloaded. Finally, right-click or control-click on the caesar folder and click “Open in CS50 Lab”. You should see the specification for this problem on the left-hand side and its distribution code on the right-hand side.

    • Substitution, if feeling more comfortable
      Getting Started

      Start by clicking inside your terminal window, then execute cd by itself. You should find that its “prompt” resembles the below.

      $

      Click inside of that terminal window and then execute

      wget https://cdn.cs50.net/2022/fall/psets/2/substitution.zip

      followed by Enter in order to download a ZIP called substitution.zip in your codespace. Take care not to overlook the space between wget and the following URL, or any other character for that matter!

      Now execute

      unzip substitution.zip

      to create a folder called substitution. You no longer need the ZIP file, so you can execute

      rm substitution.zip

      and respond with “y” followed by Enter at the prompt to remove the ZIP file you downloaded. Finally, right-click or control-click on the substitution folder and click “Open in CS50 Lab”. You should see the specification for this problem on the left-hand side and its distribution code on the right-hand side.

    • Wordle50 if feeling more comfortable
      Getting Started

      Start by clicking inside your terminal window, then execute cd by itself. You should find that its “prompt” resembles the below.

      $

      Click inside of that terminal window and then execute

      wget https://cdn.cs50.net/2022/fall/psets/2/wordle.zip

      followed by Enter in order to download a ZIP called wordle.zip in your codespace. Take care not to overlook the space between wget and the following URL, or any other character for that matter!

      Now execute

      unzip wordle.zip

      to create a folder called wordle. You no longer need the ZIP file, so you can execute

      rm wordle.zip

      and respond with “y” followed by Enter at the prompt to remove the ZIP file you downloaded. Finally, right-click or control-click on the wordle folder and click “Open in CS50 Lab”. You should see the specification for this problem on the left-hand side and its distribution code on the right-hand side.

  5. Submit this form

You may submit more than one of Bulbs, Caesar, Substitution, or Wordle50. We’ll record the single highest of your scores among those problems.

When to Do It

By 2022-09-18T23:59:00-04:00.

How to Get Help

  • Browse or search for answers on Ed!
  • Verbalize your logic to a rubber duck (whether actual or virtual!) and see if you hear any illogic in your own words!

  • Sign up for a tutorial!
  • Attend office hours!

Advice

  • Try out any of David’s programs from class via Week 2’s examples.
  • To see the manual pages for C functions, visit manual.cs50.io.
  • If you see any errors when compiling your code with make, focus first on fixing the very first error you see, scrolling up as needed. If unsure what it means, try asking help50 for help. For instance, if trying to compile readability, and
    make readability
    

    is yielding errors, try running

    help50 make readability
    

    instead!