Dummy Exercise

There is no exercise for the programming paradigm part of the unit. However there is a dummy exercise that you should complete to make sure you can handle the automated checking tool that will be used for all the proper exercises you will need to complete in the upcoming weeks.

Installing check50

In a terminal:

pip3 install check50
echo "export PATH=$PATH:$HOME/.local/bin" >> ~/.bashrc
source ~/.bashrc

If the command fails with error: externally-managed-environment, try pip3 install --break-system-packages check50. If the command fails with pip3: command not found, you can install pip3 on a computer for which you have admin access as follows:

sudo apt update
sudo apt install python3-pip git

You should now be able to avoid check50 from a terminal. Simply invoking it as follows should print a few guidelines about its usage:

check50

If you get a check50: command not found error, try adding pip3's executable folder to your path. For the bash shell:

echo "export PATH=$PATH:$HOME/.local/bin" >> ~/.bashrc
source ~/.bashrc

For other models of shell (e.g. zsh) you'll probably need to adapt this code.

Dummy Exercise

This is a dummy exercise asking you to create an empty C program. To succeed in this exercise, simply write the following program:

int main() {
    return 0;
}

To check the correctness of your program, use a Linux distribution with check50 installed and write your solution in a file named sample-exercise.c. In a terminal, with that file in the local directory, check with this command:

check50 -l --ansi-log olivierpierre/comp26020-problems/2024-2025/week1-intro/01-sample-exercise