why should you learn to write programspowerful capabilities of python and how to compose those capabilities together to create useful programs there are some low-level conceptual patterns that we use to construct programs these constructs are not just for python programsthey are part of every programming language from machine language up to the high-level languages input get data from the "outside worldthis might be reading data from fileor even some kind of sensor like microphone or gps in our initial programsour input will come from the user typing data on the keyboard output display the results of the program on screen or store them in file or perhaps write them to device like speaker to play music or speak text sequential execution perform statements one after another in the order they are encountered in the script conditional execution check for certain conditions and then execute or skip sequence of statements repeated execution perform some set of statements repeatedlyusually with some variation reuse write set of instructions once and give them name and then reuse those instructions as needed throughout your program it sounds almost too simple to be trueand of course it is never so simple it is like saying that walking is simply "putting one foot in front of the otherthe "artof writing program is composing and weaving these basic elements together many times over to produce something that is useful to its users the word counting program above directly uses all of these patterns except for one what could possibly go wrongas we saw in our earliest conversations with pythonwe must communicate very precisely when we write python code the smallest deviation or mistake will cause python to give up looking at your program beginning programmers often take the fact that python leaves no room for errors as evidence that python is meanhatefuland cruel while python seems to like everyone elsepython knows them personally and holds grudge against them because of this grudgepython takes our perfectly written programs and rejects them as "unfitjust to torment us primt 'hello world!file ""line primt 'hello world!syntaxerrorinvalid syntax primt ('hello world'traceback (most recent call last)file ""line in nameerrorname 'primtis not defined