Real thinking

In this chapter we will write larger programs, see how they can be broken down and become easier to understand, what the subject of computer science is all about, and build our own AI!

Common programs and apps that we use daily consist of tens or hundreds of thousands of lines of code. The only way to keep them organised is to break them up into functions, which also explain what that code is about.

The website you are currently on is delivered by a server, a computer whose task is to listen to the internet. When you enter a certain address or click a button, one of many functions on the server is called. Each function responds to your computer with the content of the particular chapter and section you were interested in.