49
1.2 Computer science glossary
17
to use the term input data, or just input, for the information that must
be known on beforehand. The result from a program is similarly referred
to as output data, or just output. In our example,v
0
,g, andt constitute
input, whiley is output. All input data must be assigned values in the
program before the output can be computed. Input data can be explicitly
initialized in the program, as we do in the present example, or the data
can be provided by the user through keyboard typing while the program
is running (see Chapter 4). Output data can be printed in the terminal
window, as in the current example, displayed as graphics on the screen,
as done in Section 5.3, or stored in a file for later access, as explained in
Section 4.6.
The word user usually has a special meaning in computer science:
It means a human interacting with a program. You are a user of a
text editor for writing Python programs, and you are a user of your
own programs. When you write programs, it is difficult to imagine how
other users will interact with the program. Maybe they provide wrong
input or misinterpret the output. Making user-friendly programs is very
challenging and depends heavily on the target audience of users. The
author had the average reader of the book in mind as a typical user when
developing programs for this book.
Acentral part of a computer is the operating system. This is actually a
collection of programs that manages the hardware and software resources
on the computer. There are three dominating operating systems today
on computers: Windows, Mac OS X, and Linux. In addition, we have
Android and iOS for handheld devices. Several versions of Windows
have appeared since the 1990s: Windows 95, 98, 2000, ME, XP, Vista,
Windows 7, and Windows 8. Unix was invented already in 1970 and comes
in many different versions. Nowadays, two open source implementations
of Unix, Linux and Free BSD Unix, are most common. The latter forms
the core of the Mac OS X operating system on Macintosh machines,
while Linux exists in slightly different flavors: Red Hat, Debian, Ubuntu,
and OpenSuse to mention the most important distributions. We will use
the term Unix in this book as a synonym for all the operating systems
that inherit from classical Unix, such as Solaris, Free BSD, Mac OS X,
and any Linux variant. As a computer user and reader of this book, you
should know exactly what operating system you have.
The user’s interaction with the operation system is through a set of
programs. The most widely used of these enable viewing the contents of
folders or starting other programs. To interact with the operating system,
as a user, you can either issue commands in a terminal window or use
graphical programs. For example, for viewing the file contents of a folder
you can run the commandls in a Unix terminal window ordir in a
DOS (Windows) terminal window. The graphical alternatives are many,
some of the most common are Windows Explorer on Windows, Nautilus
and Konqueror on Unix, and Finder on Mac. To start a program, it is