#cs50 #lecture-1
In fact, when we write algorithms to solve problems, we need to think about cases when something unexpected happens. For example, the input might not be within the range of what we expect, so our computer might freeze or come up with an incorrect solution.
If you want to change selection, open document below and click on "Move attachment"

Lecture0
on the plate". Then "unscrew the jam", "grab the knife", and "stick the knife in the jam". We continue with these instructions that get more and more specific, until David completes his sandwich. <span>In fact, when we write algorithms to solve problems, we need to think about cases when something unexpected happens. For example, the input might not be within the range of what we expect, so our computer might freeze or come up with an incorrect solution. We can see this in action with trying to find a name in the phone book, Mike Smith. One correct algorithm might be flipping through the phone book, page by page, until we find t