Problem Set 4
Collaboration on problem sets is not permitted except to the extent that you may ask classmates and others for help so long as that help does not reduce to another doing your work for you, per the course’s policy on academic honesty.
What to Do
- Log into code.cs50.io using your GitHub account
- Run
update50
in your codespace’s terminal window to ensure your codespace is up-to-date and, when prompted, click Rebuild now - Submit one of:
- Filter (Less) 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/4/filter-less.zip
followed by Enter in order to download a ZIP called
filter-less.zip
in your codespace. Take care not to overlook the space betweenwget
and the following URL, or any other character for that matter!Now execute
unzip filter-less.zip
to create a folder called
filter-less
. You no longer need the ZIP file, so you can executerm filter-less.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
filter-less
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. - Filter (More) 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/4/filter-more.zip
followed by Enter in order to download a ZIP called
filter-more.zip
in your codespace. Take care not to overlook the space betweenwget
and the following URL, or any other character for that matter!Now execute
unzip filter-more.zip
to create a folder called
filter-more
. You no longer need the ZIP file, so you can executerm filter-more.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
filter-more
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.
- Filter (Less) if feeling less comfortable
- Submit one of:
- Recover
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/4/recover.zip
followed by Enter in order to download a ZIP called
recover.zip
in your codespace. Take care not to overlook the space betweenwget
and the following URL, or any other character for that matter!Now execute
unzip recover.zip
to create a folder called
recover
. You no longer need the ZIP file, so you can executerm recover.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
recover
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. - Reverse
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/4/reverse.zip
followed by Enter in order to download a ZIP called
reverse.zip
in your codespace. Take care not to overlook the space betweenwget
and the following URL, or any other character for that matter!Now execute
unzip reverse.zip
to create a folder called
reverse
. You no longer need the ZIP file, so you can executerm reverse.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
reverse
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.
- Recover
- Submit this form
If you submit both versions of Filter, we’ll record the higher of your two scores. If you submit both Recover and Reverse, we’ll similarly record the higher of your two scores.
When to Do It
How to Get Help
- Browse or search for answers on Ed or post your own questions!
- Browse the CS50 Manual Pages for functions that might be useful.
-
Watch Shorts for any topics that you still have questions about.
- Sign up for a tutorial!
- Attend office hours!
Advice
- Try out any of David’s programs from Week 4.
- 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 askinghelp50
for help. For instance, if trying to compilefilter
, andmake filter
is yielding errors, try running
help50 make filter
instead!