2012 | OriginalPaper | Chapter
2. Data: The First Ingredient of a Program
Abstract
Chapter 2, on top of the basic knowledge provided in Chap. 1, gets the reader familiar with how “information” is represented by a computer in the form of “data”. The chapter starts by introducing why data is essential and how it relates to the representation of a real-world problem on a computer. Afterwards data is classified into two types based on their representational complexity and internals: “basic data” and “structured data”. After presenting the basic data types in details, the string, list, and tuple containers are introduced as structured data. While doing so, the chapter discusses how the different basic data types are represented internally by the computer and how the structured data is organized in the memory. As case studies, the corresponding data types in Python are introduced. Lastly, the chapter covers the concept of “variables”, i.e., names that can be used to store and access data in memory.