0% found this document useful (0 votes)
32 views78 pages

Information Technology I

The document is a textbook titled 'Information Technologies 1' by Mariano Avalos, published by Alfaomega in 2019, aimed at secondary education. It covers fundamental concepts of information technology, including the structure and operation of digital information systems, hardware and software functions, computational thinking, and programming strategies. The book is designed for educational purposes and includes practical activities, summaries, and questions to reinforce learning.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views78 pages

Information Technology I

The document is a textbook titled 'Information Technologies 1' by Mariano Avalos, published by Alfaomega in 2019, aimed at secondary education. It covers fundamental concepts of information technology, including the structure and operation of digital information systems, hardware and software functions, computational thinking, and programming strategies. The book is designed for educational purposes and includes practical activities, summaries, and questions to reinforce learning.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 78

Information

technologies "
Mariano Avalos

-=freshink XAlphaomega
Information
Technology 1
Mariano Avalos

Ax Alpha Omega
Buenos Aires • Bogota • Mexico • Santiago de Chile
Avalos, Mariano
Information Technologies 1 / Mariano Avalos. - the ed. - Autonomous City of Buenos Aires: Alfaomega Argentine
Publishing Group, 2019.
84 p.; 27 x 20 cm.
ISBN 978-987-3832-39-0

1. Information Technology. 2. Secondary Education. 3. Textbook. YO. Qualification.


CDD 607.1

Total or partial reproduction of this work, its computer processing and/or transmission by any other form or means is prohibited
without written authorization from Alfaomega Grupo Editor Argentino S.A. TO.

Edited by: Damian Fernandez


Cover design: Melina Daffunchio
Style review: Adriana Scaglione
Photographs and illustrations: Alfaomega Grupo Editor Argentino Image Archive, Wikimedia Commons.

Internet: http://www.alfaomega.com.mx

All rights reserved © 2019, by Alfaomega Grupo Editor Argentino S.A. TO.
Av. Córdoba 1215, Floor "10", Autonomous City of Buenos Aires, Argentina, CP 1055
ISBN 978-987-3832-39-0
The deposit provided for in Law 11,723 has been made.

IMPORTANT NOTE: The information contained in this work is for educational purposes only. Therefore, it is not intended for professional or industrial use. The
technical information and programs included have been prepared with great care by the author and reproduced under strict control standards. Alfaomega
Argentine Publishing Group S. TO. shall not be legally liable for: errors or omissions; damages that may be attributed to the use of the information contained in
this book, or for any improper use that may be made of it. The trade names appearing in this book are registered trademarks of their owners and are mentioned
for educational purposes only, therefore Alfaomega Grupo Editor Argentino S. TO. assumes no responsibility for the use made of this information, as it does not
infringe any trademark registration rights. Data in examples and screens are fictitious unless otherwise specified.
The hyperlinks referred to are not necessarily managed by the publisher, so we are not responsible for their content or their online availability.

Group companies:

Argentina: Alfaomega Argentine Publishing Group. 8. TO.


Av. Córdoba 1215, Floor "10", Autonomous City of Buenos Aires, Argentina, CP 1055
Tel: (54-11) 4811-7183/0887
E-mail: [email protected]

Mexico: Alfaomega Group Editor, S. TO. from CV


Or. Isidoro Olvera 74, Col. Doctors, Cuauhtemoc, Mexico City, Mexico, CP 06720
TeL: (52-55) 5575-2420 - Fax: (52-55) 5575-2420/2490. Toll Free: 01-800-020-4396
E-mail: [email protected]

Colombia: Alfaomega Colombiana S. TO.


62nd Street No. 20-46. Bogota, Colombia
Tel. (57-1)7460102 - Fax: (57-1) 2100415
Email: [email protected]

Chile: Alfaomega Group Editor, S. TO.


Av. Providencia 1443, Office 24, Santiago de Chile, Chile
Tel.: (56-2) 235-4248/2947-5786 - Fax: (56-2) 235-5786
Email: [email protected]
Content
CHAPTER 1 How to systematize problem solving
Structure and operation of computational................................................. 45
digital information systems Summary....................................................... 47
Questions.........................................................48
Introduction....................................................... 7
The main functions of a computer ... 8 Parts of a CHAPTER 4
computer ......................................................... 8 Solving computational problems
Input and output peripherals .................. 11
The parts and functions of digital information Introduction .....................................................51
processing systems .......................................... 17 Recognition of data (inputs) .... 52 How to plan and
The different types of computers .................... 18 represent an algorithm as a contribution to
Summary......................................................... 21 modeling a problem .. 55 The black box
Questions........................................................ 22 methodology ................................................... 57
How to use modularization and decomposition
strategies.......................................................... 59
CHAPTER 2 Problem solving using bottom-up and top-down
The functions of hardware and software methodologies 60 Summary...............................61
Questions ................................................... 62
Introduction....................................................25
Definition of software .................................... 26
Types of software .......................................... 26
CHAPTER 5
Free software and proprietary software......... 26 Programming Strategies and Structures
Operating systems: Windows and Huayra. 29
Huayra .......................................................... 29 Introduction ................................................. 66
Windows........................................................ 31 Programs as sequences of actions
Intellectual property rights.............................. 31 ordered in time.............................................. 66
Systems programmed to the user are not How to combine various repetitive programming
can modify...................................................... 34 structures .......................................................... 66
Programmable systems that can be modified by The concept of data........................................ 67
the user ............................................................. 34 Data types ...................................................... 67
Low-level software ........................................ 34 Definition of variables...................................... 68
High-level software ......................................... 34 Structured programming: modularity, reusability
Summary ........................................................ 35 and readability of programs ........68 How to use
Questions........................................................ 36 procedures and functions .......69 Introduction to
programming logic
CHAPTER
3Introduction to computational thinking.
Computational problems
object oriented ................................................ 69
Introduction......................................................39 Iconographic programming languages.... 70
Computational problems................................ 40 Features of Scratch App ............................... 70
The programs ............................................... 40 Scratch Main Commands............................... 71
The pseudocode . ..................................... 40 Programming by succession of lines of code. 78
The algorithms .............................................. 41 Programming applied to the development of
animations, simulations and video games. 79

ALFAOMEGA
II Preliminaries

How to program stories that include characters, Activities...........................................................81


scenes and interactions..................................... 80 Summary..........................................................82
Programming applied to robotics................... 81 Questions........................................................ 83
Programming applied to art (artistic-digital
developments applying programming principles
and strategies)................................................... 81

About the
author
Mariano Ávalos has a degree in Educational Technology (UTN-FRBA) and a Master's degree in Education,
Languages and Media (UNSAM). He works as an ICT and IT teacher in secondary schools in the Province of
Buenos Aires and the Autonomous City of Buenos Aires.

Conventions used in the text


Activities is one of the most attractive and distinctive sections of the work. In each chapter you will find
several sections of Activities with practical proposals that address the topics studied.

AlTIpliemOS is a section present in those developments in which the student will require some additional
concept or definition to understand the depth of the text.

Questions is the final section that reinforces the knowledge acquired in the chapter.

ALFAOMEGA
Information Technology 1 III

Introduction
This book was written by an experienced teacher of Information Technology 1 at the New Secondary
School of the Autonomous City of Buenos Aires. The work covers the contents of the subject in a didactic way.
The main topics covered are:
Structure and operation of digital information systems: to cover the basic concepts that the student needs
to understand the fundamentals of digital data transfer and processing technology.
Hardware and software functions: so that the student understands how the equipment he/she is going to
use works.
Introduction to computational thinking: so that the student learns to think in terms of algorithms and
processes that solve problems.
Computational problems: to discern what data you have and what data you will obtain from your actions.
Computational problem solving: to see the complete process from the statement to the solution.
Programming strategies and structures: to practice the systematic, orderly and optimal resolution of
problematic situations.

ALFAOMEGA
CHAPTER 1

u Structure and
operation of digital
information systems
Contents

■ Introduction
Goals
■ The main functions of a computer
■ The parts of a computer ■ Know the main functions of a computer
■ Input and output peripherals as well as the computational process.

■ Architecture and components of a computer ■ Identify the basic structure of a computer


(CPU, memory unit, input/output unit,
■ Digital information processing systems in environmental
artifacts and systems interconnection buses between units)

■ The parts and functions of digital information processing ■ Recognize the presence of digital
systems information processing systems in the
artifacts and systems of the environment.
■ The different types of computers
■ Distinguish between different types of
■ Summary
computers.

introduction

Computers are currently one of the most widely used systems for fulfilling the function of controller of an
automatic system. For this reason, we will detail the parts of a computer, from the central processing unit, the
motherboard to the memories, and we will study the input and output devices (peripherals) that link them to
their environment.
We will also study in depth the different types of computers in order to recognize not only the common
aspects, but also the specific ones of each model; and we will propose the recognition of the presence of
digital information processing systems in artifacts and systems of the environment. In these cases, emphasis
will be placed on identifying the basic functions present in all of them.

The main functions of a computer


Today, we live in a world increasingly marked by constant technological changes in information and
communication. In this context, computer literacy encompasses all knowledge about how computers work,

MARIANO AI/ALOS ALFAOMEGA


8 Structure and operation of digital information systems

from computing units and electronic devices to computer systems.


In this sense, the constant appearance of technological devices arises from man's need to improve
those already designed and invented previously. Invention is the first step in the creation of a product, followed
by innovation, which consists of implementing continuous improvement processes to obtain new articles.

Data and information

A data is a symbolic representation (numeric, alphabetical, algorithmic, spatial) of a quantitative or qualitative


attribute or variable. It is an isolated element, collected for a specific purpose, but which has not gone through
a process that interrelates it with others in a functional way for the intended purpose. In the same vein,
information could be defined as the set of data, aggregated, processed and related in such a way that they can
guide correct decision-making.

The computational process

A computer system allows information to be stored and processed. It is made up of a set of interrelated parts:
hardware and software. On the one hand, hardware includes computers or any type of smart electronic device,
i.e. processors, memory, external storage systems, etc. On the other hand, software includes the operating
system, firmware and applications, where database management systems are of special importance.

The parts of a computer

Architecture and components of a computer

The CPU
The central processing unit (CPU) interprets the instructions of a computer program, performing the basic
arithmetic, logic, and input/output operations of the system. All modern CPUs are microprocessors, meaning
they contain a single integrated circuit (chip).
Two typical components of a CPU are the arithmetic logic unit (ALU) that performs arithmetic and logical
operations; and the control unit (CU) that fetches instructions from memory, decodes and executes them, and
when necessary calls the ALU.

C Let's expand
The main internal parts of the processor are

Arithmetic logic unit (ALU). This is where arithmetic operations (add, subtract, sometimes multiplication and

division) and logical operations (and, or, not, etc.) are performed.

Instruction decoder. There, the instructions that arrive and make up the program are interpreted.

Block of records. Registers are memory cells where data is stored temporarily. There is a special register

called flags that reflects the operating state of the microprocessor.

Data bus. It is where the CPU receives data from the outside or where it sends data to the outside.

ALFAOMEGA Mariano Avalos


Information Technology 1 9
Address bus. It is used by the CPU to send the value of the memory address or of an external peripheral that

the CPU wants to access.

Control bus. It uses a series of lines through which various control signals enter or exit, which are used to

send actions to other parts of the computer.

System clock. It is an oscillator circuit or quartz crystal that oscillates several million times per second. It is

the one that sets the pace, the one that dictates at what speed any operation (such as addition, subtraction,

multiplication) or logical operations (if, and, or, not) between two numbers will be executed.

The UC

The control unit (CU) is one of the main functional blocks into which the central processing unit (CPU) is
divided. Its function is to search for instructions in the main memory, decode them (interpret them) and
execute them, using the processing unit for this purpose.

USB ports

The term port is used to name a type of connection that enables the sending and receiving of information,
while the acronym USB, for its part, corresponds to Universal Serial Bus, an interface that allows the
connection of peripherals to a computer.
Therefore, the USB port is a component of a computer that is used to connect different devices such as
a printer, a mouse, a webcam or speakers are some examples of peripherals that can be connected to a USB
port.

MARIANO, LET'S GO ALFAOMEGA


10 Structure and operation of digital information systems

USB 1.1 USB 3.0

Mini-A Mini-B

kri )

Micro-A Micro-B
Micro-B
Various USB inputs. Source: De Milos.bmx, CC BY-SA 3.0,
https://commons.wikimedia.org/w/lndex.php?curid=3O414864

The Motherboard

The motherboard or main board is a printed circuit board to which the components that make up the computer
are connected. It is one of the fundamental parts for assembling any desktop or laptop personal computer. It
has a series of integrated circuits installed, among which is the auxiliary integrated circuit (chipset) that serves
as a connection center between the microprocessor (CPU), the random access memory (RAM), the expansion
slots and other devices. It is usually installed inside a case, which is usually made of sheet metal and has a
panel for connecting external devices, and many internal connectors and sockets for installing internal
components.

The memory

It is the part of the computer where programs are loaded or certain data is stored for a certain period of time. It
can be composed of a single chip or several chips mounted on an electronic board.

The unit of measurement of a computer's memory is the Byte, which in turn is composed of a set of 8
Bits.
Types of memory
• RAM memory (RANDOM ACCESS MEMORY). It is a random access memory, since the data is
saved dynamically. It is volatile, since it loses its information when the electricity is interrupted. The
acronym RAM literally means memory.

ALFAOMEGA Mariano Avalos


Information Technology 1 11

random access. The term is related to the characteristic of presenting equal access times to any of its
positions (whether for reading or writing). This feature is also known as "direct access", as opposed to
sequential access. RAM temporarily stores information, data and programs that the Processing Unit
(CPU) reads, processes and executes.
• ROM memory (READ ONLY MEMORY). It is a read-only memory that contains information about the
motherboard configuration and its compatibility with certain hardware. Here you control the system
date, system boot sequence, security, fixed disks, CD-ROMs, etc. It is recognizable because it is a
large chip that is almost always near a watch battery. ROM memory is a storage medium used in
computers and electronic devices that only allows the reading of information and not its writing,
regardless of the presence or absence of a power source. Data stored in ROM cannot be modified, at
least not quickly or easily.

• Virtual memory. It is the free space left on the computer's hard drive, which the operating system (Ms-
Windows, for example) uses to facilitate and speed up the tasks required by the user.

• Cache memory. It is a memory used to store information about the CPU's UAL operations.

Input and output peripherals

They are devices that allow communication between an information processing system (for example: the
computer) and the outside world, where human interaction is very important in relation to the processing and
analysis of information.

The keyboard
In general, keyboards have a standard layout that includes all the letters of the alphabet, special characters
and numbers. In addition, laptop or PC keyboards have some keys with special functions. Keyboards are input
peripherals, as they allow data and information to be entered into the computer.

How to access the main keyboard keys?


• Scroll cursors. These keys allow us to move through all applications, in all directions (up, down,
left and right).
• Enter. In general, by pressing this key we accept a query or action that is requested of us. For
example: when we are working with a word processor, pressing this key will automatically move
the cursor down one line.
• Shift. By pressing this key together with another key that has another character on top, we will

PC keyboard. Source: By S. de Vries - User SdeVries on nl.wikipedia - Own work, CC BY-SA 3.0,
https://commons.wikimedia.org/w/index.php?curid=1312040

Mariano Avalos ALFAOMEGA


12 Structure and operation of digital information systems

obtain as a result the character that was on top of the key we selected. For example: if we press
shift and the 4 key, the $ sign will appear, which is located at the top of the 4 key.
• Ctrl. Pressing this key together with another key can activate certain actions. For example,
using a word processor, if we press the Ctrl key and the c key at the same time, a text that we
have previously selected will be copied.
• Caps Lock. Turns uppercase or lowercase on or off for the entire keyboard. In general, it is
widely used in working with word processors.
• Alt. It is used in combination with other keys to execute various specific commands and actions.
For example: in office programs, such as Writer or Ms-Word, if we want to access the file menu,
we can press the alt key and simultaneously the a key. Doing so will bring up all the file menu
options.
• Spreader bar. The space bar is usually located at the bottom center of the keyboard. For
example, in a word processor, pressing the space bar will advance one blank space to the right.
• Recoil. This key is used to go back one space at a time, deleting what has already been written.
• Special symbols. These are the symbols that accompany various keys (such as &, / or $). If we
want to write, for example, parentheses, we will have to simultaneously press the shift key and
the number 8 (for the symbol ().
• Function keys. The function keys are located at the top, and each one performs a specific
function.
• Print screen. Pressing this key will take a screenshot of the screen with the applications and
programs that we are working on at that time. The screenshot will be temporarily saved to the
clipboard of your PC or laptop, so you can paste it into another application in the future.

ALFAOMEGA Mariano Avalos


Information Technology 1 13

Laptop

The Printer

The printer is an output peripheral that allows us to obtain one or more copies of the work we do. Nowadays,
there are multifunction printers, meaning that a single device offers the possibility of printing, copying and
scanning a document or photograph. There is a wide variety of printers on the market with different formats,
sizes and print quality.

The scanner

This input device allows us to incorporate and capture photographs, images or documents. These screenshots
can be obtained, for example, in JPEG or PDF.

The camera

It is a very important device, as it allows you to record many school events, the process of a project, various
classroom activities, etc. Cameras have specific memory of various sizes. In order to share and download
images, we need to connect a USB cable to one of the ports on the PC or laptop.

The speakers

Speakers are output peripherals. When connected to the PC (usually there is a green or blue connector) it

Mariano Avalos ALFAOMEGA


14 Structure and operation of digital information systems

allows you to expand the audio, increasing the sound quality and volume on both the PC and the laptop.

The IWB (Interactive Whiteboard)

The IWB must be connected to a computer and a projector; it can be fixed in one place or mobile, that is, it can
be moved from one place to another. In general, when turning it on and connecting it to the PC, the first thing
we have to do is calibrate it (mark the area that the interactive zone of the whiteboard will occupy).

Camera sensor
Interactive Whiteboard. Modified from: https://blog.ipevo.com/wp-contenVuploads/2013/08/is01.jpg

Digital information processing systems in environmental artifacts and systems

Analog systems and digital systems

Electronic circuits can be divided into two broad categories: digital and analog. A digital system is any device
intended for the generation, transmission, processing or storage of digital signals. In other words: a digital
system is a combination of devices designed to manipulate information that is represented in digital form. Most
of the time these devices are electronic, but they can also be mechanical, magnetic or pneumatic.
Boolean algebra is used as a tool for the analysis and synthesis of binary digital systems. Therefore, for
the implementation of digital circuits, logic gates (AND, 0, NOT) and transistors are used. These gates follow
the behavior of some boolean functions.
On the other hand, a system is said to be analog when the magnitudes of the signal are represented by
continuous variables, that is, analogous to the magnitudes that give rise to the generation of this signal. An
analog system contains devices that manipulate physical quantities represented in analog form. In such a
system, quantities vary over a continuous range of values.
Most things that can be measured quantitatively appear in nature in analog form; for example: humidity
over a day, time, pressure, distance, and sound.

The Binary System

ALFAOMEGA Mariano Avalos


Information Technology 1 15

The binary or base 2 number system is a positional system that uses only two symbols to represent a number:
1 and 0. The word binary has the prefix bi which means two. This numbering system is extremely important,
since computers use it to carry out all their operations.

Units of measurement

A bit is an electronic signal that can be on (1) or off (0). It is the smallest unit of information used by a
computer. It takes 8 bits to create a byte. Most often bits are used to describe transmission speeds, while
bytes are used to describe storage capacity or memory. The operation is as follows: the electronic circuit in
computers detects the difference between two states (high current and low current) and represents them as
one of two numbers: 1 or 0. The term bit is derived from the phrase binary digit.
Decimal and Binary Numbers
Non-negative integers Binary Equivalent

In recent years, the widespread use of computers and the predominance of digital culture have
influenced the way people live in society, producing a significant change in individual and economic
interactions. Later, with the emergence of the Internet, digital technology created an infinite amount of data
and information, which could be accessed by people from all over the world, regardless of where the
communication began. This made communication faster, more intense and simpler.
Therefore, we can affirm that the beginnings of the digital era originate in electronics, since all these
devices and appliances require the use of electrical energy to carry out the proper functioning of their
components, which are called analogue. Electronic devices have evolved in their various components,
improving their technology.

Disruptive technologies

Today we can share the following certainties:

• We have more data than ever before. But it does not mean that we can do or know more: a
change of scale leads to a change of state; and a quantitative change to a qualitative one.

• Changes in the way we gather and interact with information have profound consequences for
our understanding of the economy.

• It will take time before practices and attitudes change to sensibly incorporate technology into our

Mariano Avalos ALFAOMEGA


16 Structure and operation of digital information systems

lives, our institutions and our values.

• • The important thing about big data is that it allows us to do new things. They represent one of
the most promising ways in which data can be used.

These days we hear more and more frequently terms such as big data, the Internet of Things, artificial
intelligence or cloud computing. Disruptive technologies are here to stay. The foundation of society's
entrepreneurship is information and what to do with it: how to process it, store it, share it, analyze it. We now
have the capacity to collect, store and use more information, but the nature of the data and its importance
have not essentially changed. According to this interpretation, the expression big data is just a grandiose way
of describing society's ability to control more data than ever before.
Just by measuring the computing capacity of the latest generation of cell phones, taking as a reference
the amount of data that can be stored and retrieved from its internal memory, a growth rate is revealed that no
other technology, neither ancient nor modern, has achieved. In the coming years, the convergence of
applications that host their information in the cloud and that use multiple devices to obtain information on user
consumption will be very significant.

ALFAOMEGA Mariano Avalos


Information Technology 1 17

Cloud computing

An example will be the possibility of living in a smart home, where the various devices and artifacts are
connected, interact with each other, providing information about everything we do throughout the day (washing
clothes, dishes, alarm control, camera monitoring, etc.). All this control is monitored by computer systems.

The parts and functions of digital information processing systems

The design of digital systems

We could simulate the vision of the system as a black box with inputs, outputs and operation. From there, we
could make divisions into different smaller blocks, defined in terms of input/output and operation, and
interconnected with each other. This design structuring is known as hierarchical design or top-down
methodology.
In extremely complex systems, it is possible to view the system as a series of different levels, which we
can call levels of complexity, each of which is characterized by a specific type of components and links. To
examine the internal structure of a component of a certain level of complexity, we must go down to the next
lower level.
The complexity of an electronic circuit (IC) can be measured by the number of logic gates it contains.
Current manufacturing methods allow the construction of electronic circuits whose complexity is in the range of
1 to 105 or more gates per chip. According to this, electronic circuits are classified into the following levels or
scales of integration:
• SSI (small scale): less than 10 doors.
• MSI (medium scale): between 10 and 100 doors.
• LSI (high scale): between 100 and 10,000 gates.
• VLSI (very high scale): from 10,000 gates.
The integration capacity will depend fundamentally on two factors:
• The area occupied by each gate, which in turn depends on the type and number of transistors
used to create it. The smaller this area, the greater the capacity for large-scale integration.
• Power consumption. In an integrated circuit, many gates are made in a small space. The total
power consumption of the chip is equal to the power consumption of each gate times the
number of gates. If the consumption of each door is high, a lot of heat will be generated.

MARIANO AVALOS ALFAOMEGA


18 Structure and operation of digital information systems

Structure and behavior of systems

In general, a system with a given behavior can be built in many different ways, that is, with different internal
structures. The behavior of a system with many components can be determined from the specific behavior of
the components and the structure of the system.
The structure of a system includes both the elements that form it and the links that relate these
elements. The behavior of a system refers to the dependency that exists between the output channels, the
input channels and the state of the system.
The study of systems has two fundamental aspects, analysis and synthesis. Analysis is related to
determining the behavior of a system, based on its structure and the behavior of its elements. Reciprocally,
synthesis or design is the determination of the structure of a system so that it exhibits certain behavior.

The different types of computers

There are many types of computers, but they all share the same set of components including: memory, central
processing unit, storage device (hard drive), input devices (keyboard, mouse), and output devices (monitor).
These are some of the types of computers that we can find today:

Desktop computer

Desktop computers are the most common type of computer out there, usually called a desktop computer or
PC. These models include a monitor, mouse, keyboard, among others. Desktop computers are primarily
designed for everyday applications such as gaming, surfing the Internet, word processing, or storing photos
and videos, among other basic functions.

Laptops

Its name comes from the English word laptop, where lap means “lap” and top means “on top of.” They are also
called notebooks because of their great physical resemblance to notebooks.
These models have flat screens, a keyboard, memory and processor. Laptops are very light, as their
weight usually does not exceed 2 kilos. They have the same functions as desktop computers, but are more
expensive due to their convenient and compact size.

ALFAOMEGA MARIANO AVALOS


Information Technology 1 19

Netbooks

Netbooks are a lower-powered, smaller, lighter and more compact version of a laptop. These devices are
primarily designed for wireless web browsing. This type of computer contains a memory with very little storage
space, does not include a CD or DVD drive, and does not have connection ports.

Handheld Computers

Handheld computers are highly compact computers, with a touch screen, but without a keyboard. They were
designed primarily as electronic diary, calendar, text document, contact list, sound player, or to browse the
Internet and check email. These devices have been replaced in recent years by smartphones.

Workstations

Workstations are computers with large monitors capable of handling large data and high-resolution images.
They contain a very powerful processor, internal memory capable of processing highly complex data, and hard
disk drives to store large amounts of data. For this reason, they are preferred by mathematicians, engineers,
architects, and software or video game developers.

Servers

Servers are computers designed to provide services to other computers over a network. Servers typically have
powerful processors and internal memory capable of storing large amounts of information. These are teams
that are on all day long. The main function of these servers is to carry out communications between several
computers at the same time.

Mainframes

They are large computers that take up the space of a room, or even an entire floor. They are expensive
computers, designed primarily to perform multiple tasks for thousands of users at the same time. Companies
often use these computers to process applications necessary for business, financial transactions, and
statistical analysis.

Supercomputers

Supercomputers feature the most expensive and sophisticated technology available today. Therefore, they are
primarily used to carry out large amounts of numerical calculations in short periods of time. These devices are
intended for highly specialized applications such as scientific research, weather forecasting or geological data
analysis. An example of this model would be IBM's RoadDrunner supercomputer.

Mariano Avalos ALFAOMEGA


20 Structure and operation of digital information systems

Supercomputers. Source: CC BY-SA3.0, https://commons.wikimedia.org/w/index.php?curid=1391410

6 Activity 1
Students must prepare conceptual maps on the topic: “the parts and components of the computer.” They can
do them digitally, for example, using the Cmap Tools application, transforming conceptual maps with
multimedia and interactive features, which can then be shared on the web.

6 Activity 2
Students should divide into groups and prepare slide presentations on “types of computers.” They can do this
using the Ms-PowerPoint application or the free Impress option, although they must first research various
Internet sources. The information, images, photographs and data can be obtained by visiting and browsing
various websites, searching in newspapers or magazines. These presentations can be shared, for example,
on the Slideshare application (www.slideshare.net), generating a repository of presentations with slides on the
subject.

ALFAOMEGA Mariano Avalos


21 Structure and operation of digital information systems

Summary

Throughout this chapter, we have not only detailed the parts that make up a computer (CPU, memory unit,
input/output unit, interconnection buses between the units), but we have also analyzed the different types that
we currently find on the market, identifying the specific and common aspects that they all share (memory, a
central processing unit, storage device, input devices and output devices).

ALFAOMEGA Mariano Avalos


1- What elements make up the different parts of a computer?

2- What are the main functions of a computer?

3- What types of computers can currently be found on the computer market?

ALFAOMEGA Mariano Avalos


Information Technology 1 23

4- What is the difference between digital and analog systems?

5- What do we call disruptive technologies?

Mariano Avalos ALFAOMEGA


CHAPTER 2

The functions of
hardware and software

Contents Goals
■ Introduction ■ Be able to define what hardware and
■ Definition of software software are.
■ Types of software ■ List the different varieties of software.
■ Free software and proprietary software. ■ Recognize the characteristics of the
■ Operating systems: Windows and Huayra Windows and Huayra operating systems.

■ Huayra ■ Identify the differences between free and


proprietary software.
■ Windows
■ Know the intellectual property rights.
■ Intellectual property rights.
■ Programmed systems that the user cannot modify ■ Distinguish low-level software from high-
level software.
■ Programmable systems that can be modified by the
user.
■ Low-level software.
■ High-level software
■ Summary

Introduction

By studying the structure of digital systems, we will advance in the recognition of the role of software, with
special emphasis on the differences between free software, open source software and proprietary software
in order to reflect on intellectual property rights in the field of knowledge in general, but with special
dedication to software.
It will be important for students to be able to recognize the difference between programmed systems
that the user cannot modify and those programmable systems whose operation can be effectively modified
by the user (through the choice of a program or by creating other programs). In this sense, we will study
the

MARIANO AI/ALOS ALFAOMEGA


26 The functions of hardware and software

different types of existing programs, with the purpose of differentiating software with a low-level language
from high-level software.

Definition of software

The software of a computer system is known as the set of necessary logical components (applications and
programs) that make it possible to carry out specific tasks. Logical components include, among many others,
computer applications: word processor, games, graphics, system software, among others.

Types of software

Base software or system

This type of program acts as an intermediary between the hardware and the application programs. It performs
important self-regulatory functions such as loading itself when the computer is first turned on, and also
providing a set of instructions used by all applications. Systems programming refers to the creation or
modification of system software.

Application software

It is the set of instructions written in a programming language and directed to the hardware, so that it performs
specific data and information processing activities, providing functionality to the user. Application programs are
intended to increase productivity or improve inventory level decisions. Application programs primarily
manipulate data or text to produce or provide information; while system programs manipulate computer
hardware resources.

Free software and proprietary software

Proprietary software

Proprietary software is any computer program or application where the end user has limitations to use, modify
or redistribute it, because the source code of the program is not available or its access is restricted by a
license agreement or anti-copy technology.
In proprietary software, a natural or legal person (company, corporation, foundation) owns the copyright
on the software; therefore, they have the ability to control and restrict the user's rights over their program. This
means that the user only has the right to run the software, but does not have access to its source code, or
even having access to it, does not have the right to modify or distribute it.

Free software

The paradigm of collaboration, cooperation, collective construction of knowledge, respect for licenses and
standards, along with attitudinal issues (such as conceiving knowledge as a common construction) and equal
and universal access to information and opportunities, constitute a very wide range of very concrete
possibilities.

These numerous and varied aspects in which free software enables the possibility of “humanized
technology”, added to the security provided by its systems, where there are no viruses or malicious programs,
and the quality and variety of its offering, make the free software paradigm a particular and excellent possibility

ALFAOMEGA MARIANO Avalos


Information Technology 1 27

for mass use. And that is also the biggest challenge: how to unlock this issue of knowledge about the potential
offered by the use of free software.

The rise of GNU/Linux

The free software movement was born at the instigation of Richard Matthew Stallman, in 1983. At that time,
this American programmer announced what he called the GNU (Not Unix) project, the objective of which was
to create a new operating system, exactly the same in use as the then-current Unix, but with the source code
available to modify, improve, share and collaborate, so that any programmer who so wished could contribute
something new.

Stallman and his collaborators created much of that operating system. This operating system focused its
interest on the philosophy of what he himself called free software, that is, the so-called four freedoms.

• Freedom to run the program for any purpose.

• Freedom to study how a program works and modify it to suit different needs or concerns.

• Freedom to redistribute copies to help others.

• Freedom to redistribute modified copies.

This free software paradigm forever changed the history of computing, as millions of users adopted and
enriched this philosophy from that moment on.

MARIANO AVALOS ALFAOMEGA


28 The functions of hardware and software

Richard Stallman. Source: By Rubén Ojeda, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?


curid=49051029

Comparing free software and proprietary software

At the operating system level, if we want to think about proprietary software we can think about some of the
versions of Ms-Windows; and if we are looking for an alternative with free software, we can work with some of
the versions of Linux.
In the following comparison table, we will find some alternatives to work with:

Proprietary software Free software Characteristics

Windows Media Player Audacity Recording CD, DVD, etc.

Adobe Photoshop Gimp Graphics and image editors

Ms-Front Page Kompozer Website design

Paint Tuxpaint Simple graphics editors

Ms Office Openoffice Office packages

Internet Explorer Firefox Browsers

Winzip Winrar File Compressors

Adobe Acrobat Reader Xpdf PDFViewer

Operating systems: Windows and Huayra

ALFAOMEGA Mariano Avalos


Information Technology 1 29

The way to access the hardware (devices) and software of our computer is through an operating system. At
the operating system level, if we want to think about proprietary software we can think about some of the
versions of Ms-Windows, while if we look for an alternative with free software we can work with some of the
versions of Linux, for example, the Huayra version.

C Let's expand
Operating system administration

An operating system (OS) is a software that acts as an interface between hardware devices and the
programs used by the user to operate a computer. The OS is responsible for managing, coordinating activities
and carrying out the exchange of resources.

One purpose of an operating system as the master coordination program is to manage hardware
location and access protection resources, relieving application programmers of having to deal with these
details. They are found in most electronic devices that use microprocessors to operate. (Mobile phones, DVD
players, computers, radios, etc.).

Huayra
The word huayra comes from Quechua and means wind. Huayra is a free operating system, developed by
CENITAL (National Center for Research and Development of Free Technologies), which was generated
thanks to the collaboration of students, teachers and the entire educational community in general in Argentina.

The Huayra menu

It is a drop-down menu, similar to that of other operating systems such as Microsoft Windows or Mac, and
allows the following operations:

• Search for applications. When you type the first few letters of an application into the search
engine, a list of all related applications appears. It is possible to search them by category.
• Launch applications. We place the pointer over an application and click to open it.
• Access favorites. If we press the favorites button, located at the top right of the menu, we will
find the applications that we use most frequently.
• Access the most used folders through bookmarks

Mariano Avalos ALFAOMEGA


30 The functions of hardware and software

Huayra file system

In this file system, there are no letters to identify the devices, but rather they are all linked to a root,
represented by the symbol /. If we click on Computer, and then on File System, we can see the distribution of
the directories, in the form of folders.
This distribution often confuses those who come from working with other operating systems, but it is very
simple. Each user has their own directory, separate from everyone else's, so our files cannot be modified,
deleted, moved or edited by anyone else unless we authorize it.
The home directory is represented by the - symbol. For example, if a user named Mario writes he will be
referring to /home/mario. In this directory, the external devices that we connect to the computer will be
automatically located. For example, if we connect a pendrive called My_disk to a USB port, the system will
automatically recognize it.
The other directories are dedicated to system files and settings. For example: /bin contains the
application executables (binaries); /boot contains all the files inherent to system booting; the /lib directory
contains the libraries used by the installed applications.

U/VrA
gnu / l in
GNU/Linux Huayra logo

Simple file and directory editing functions

• Create a new folder. We go to the parent directory and right-click. In an empty space, we select the
option Create a folder, and by clicking again, we will have a new folder, to which we can give the
name we want.

• Delete a file. We position ourselves over the file, right-click and then select the option Move to Trash.

• Move a file. We position ourselves on the file, click and hold down the left button. This way, we can
drag the file to the chosen destination.

• Rename a folder or file. We position ourselves on the chosen folder or file, click on the right button,
and choose the Rename option.

ALFAOMEGA MARIANO AVALOS


Information Technology 1 31

Windows

Created by Microsoft, and with various versions in use, Windows is the most well-known and widely used
proprietary operating system. Among its main features, we find a control panel that allows you to manage all
the computer's devices and peripherals, access to various networks, among others.
It has a file explorer that allows you to organize all the folders, documents and images on the different
disks and storage devices that the computer has. It has a main start button that can vary in location on the
desktop, depending on the version of Windows we are using.
In that sense, many of the functions we address in Huayra can also be executed from Windows. For
example, to create a new folder, we have to right-click on any folder or section of the file explorer. Then we
can select the New option and click on the Folder command. There we can rename the folder with the name
we want. From the All Programs option, we can access all the applications and programs installed on the
laptop or PC.

■S Windows
By Original work: MicrosoftFile:Windows 8 logo and wordmark.svg: Multiple editors; see image descriptionpageThis
work: User:AxG - This file was derived from: Windows 8 logo and wordmark.svg:, Public Domain,
https://commons.wikimedia.org/w/index.php?curid=20937658

Intellectual property rights

Every author wants his or her work to be widely distributed in order to reach the largest possible number of
users, but he or she is not prepared to let his or her work go unrecognized by publishing companies.
Considering this situation and current copyright laws, it is necessary to gradually become aware of the need to
establish a certain free use and copying of documents for non-commercial, but rather educational purposes.
This change would represent a medium- and long-term step towards the free availability of humanity's
knowledge without copyright restrictions, which would be unprecedented in universal history.

In any case, it must be considered that this process is segmented and surrounded by a very strong
social fracture, and where the mass media occupy a space that was previously occupied by other institutions
and organizations in society, influencing the creation of the public agenda.
Generally speaking, on the issues of information circulation and copyright, we usually find three
positions:
• Copyright. They adhere to the current system of copyright and copyright in force, and reject the
logic of digital circulation, especially on the Internet. They therefore seek mechanisms to enforce
limitations on material objects on the Web, such as preventing images from being copied or
placing watermarks on them.

• Copyleft. Around this general principle of digital copies, a type of license originally developed for
free software is created. This type of license is based on the fact that the dissemination of
knowledge contributes to progress when it brings together many people in a particular search
and investigation. He does not ignore the author's rights. Therefore, it is not its opposite, but
rather it exempts the user or recipient from the obligation to pay for using or publishing the

MARIANO AVALOS ALFAOMEGA


Information Technology 1 32

production, which does not necessarily imply that it cannot be sold.

• Intermediate position. Many users have opted for permissive forms of circulation, with notes
clarifying that material can be copied as long as its author is cited, as well as inviting recipients
to download and distribute the material.

In practice, users perform various actions of using, copying and redistributing changes without
restrictions on a daily basis. This represents: access to books, pictures, movies, music and software because
someone made an unauthorized copy available on a specific network.

Creative commons

The concept of creative commons (CC), which could be translated as creative common goods, refers to a non-
profit organization, whose central office is located in the state of California (United States of America), which
allows the use and sharing of both creativity and knowledge through a series of free legal instruments.
These consist of a set of "model licensing agreements" or copyright licenses that offer the author of a
work a simple and standardized way to grant permission to the general public to share and use their creative
work, under the terms and conditions of their choice.
In this sense, Creative Commons licenses allow the author to easily change the copyright terms and
conditions of his work: from "all rights reserved" to "some rights reserved." These licenses are a way for
authors to take control over how they want to share their intellectual property. At the same time, Creative
Commons stands out for being at the forefront of the copyleft movement, whose objective is to contribute to
the construction of a more comprehensive public domain, providing a viable alternative to the “all rights
reserved” of current copyright.

MARIANO AVALOS ALFAOMEGA


Information Technology 1 33

Attribution (by): Any exploitation of the work is permitted, including for commercial purposes, as well as the creation of
derivative works, the distribution of the works is also permitted without any restrictions.

Recognition - NonCommercial (by-nc): The generation of derivative works is permitted as long


as they are not used for commercial purposes. The original work may not be used for
commercial purposes.

Attribution - Non-Commercial - Share Alike (by-nc-sa): Commercial use of the original work or
any derivative works is not permitted. Distribution of these works must be under a license
identical to that of the original work.

Attribution - Non-Commercial - NoDerivatives (by-nc-nd): Commercial use of the original


work or the creation of derivative works is not permitted.

Recognition - Share Alike (by-sa): Commercial use of the work and any derivative works is
permitted, and distribution of these works must be done under a license identical to that
governing the original work.

Attribution - NoDerivatives (by-nd): Commercial use of the work is permitted but the generation
of derivative works is not permitted.
Types of Creative Commons license. Fountain:

Freedom of access to the Internet

It is increasinglyhttps://www.ovtt.org/sltes/default/files/seis.licencias.creatlve.commons.png
difficult to be disconnected from the network, when each of the technological devices has

some kind of connection. From smartphones with GPS and web connectivity to video cameras that can directly
publish what they have recorded at specific locations.
As Berners Lee (2010), the creator of the Web, states:
The main principle underlying the usefulness and growth of the Web is universality. That means people should be
able to add anything to the Web, no matter what computer they have, what software they use or what language they
speak and regardless of whether they are connected to the Internet by cable or over the air. The Web must be
usable by people with disabilities. It should work with any type of information, be it a document or a data set, and
information of any quality, from a simple tweet to an academic article. And it must be accessible from any type of
device that can connect to the Internet: static or mobile, whether it has a small or large screen.

It must also be considered that in the current scenario of the digital divide between those who have and
those who do not have access to new technologies, a second divide is becoming increasingly present, which
distinguishes between those who know and manipulate the tools, and those who are simply uncritical
consumers.
Therefore, the development of digital literacy is uneven, dividing the world between a world where we
control technology and a world where we are controlled by it. There we find what Henry Jenkins calls the
“participation gap” (Jenkins, 2008); the division between those who can create, and have done so, using digital
technologies; and those who cannot.

Programmed systems that the user cannot modify

A programmed system is an electronic circuit that contains an integrated microprocessor. Through the use of a
computer program, stored in an internal memory, the system is controlled and managed. In these systems,

Mariano Avalos ALFAOMEGA


34 The functions of hardware and software

users have no possibility to make changes. The main disadvantages of this type of system are: speed and
cost.

Programmable systems that can be modified by the user

To control a given process, programmable systems perform tasks according to the sentences or instructions
defined by the team of programmers and/or advanced users who have programmed it for a purpose. The
instructions of a program must be written in advance by the user, in a language that the CPU can understand.

Low-level software

A low-level programming language is one in which its instructions exercise direct control over the hardware,
and are conditioned by the physical structure of the computers that support it. The use of the word low in its
definition does not imply that the language is less powerful than a high-level language, but rather alludes to the
reduced abstraction between the language and the hardware. For example, these types of languages are used
to program critical tasks in operating systems, real-time applications, or device drivers.

High-level software

On the other hand, a high-level programming language is characterized by expressing algorithms in a way
appropriate to human cognitive capacity. In early languages, the limitation was oriented to a specific area, and
its instructions required a predefined syntax.
High-level languages were created so that the average user could solve a data processing problem more
easily and quickly. In other words, so that words that are very easy for the programmer to understand can be
used. Other high-level languages are: Ada, BASIC, COBOL, FORTRAN, Pascal.
It is important to underline the following characteristic of this type of software: to indicate the same thing
in most high-level language instructions, several instructions would be needed in a low-level language.

6 Activity 1
Each student from Windows or Huayra must create a folder structure that allows them to organize the
content and information on the computer. For example, you can organize different folders for all subjects.

ALFAOMEGA Mariano Avalos


Information Technology 1 35

db Activity 2
Students will explore and test the speed and effectiveness of some items seen in Huayra, compared to
Windows in order to evaluate the speed and effectiveness of each operating system.

e6 Activity 3
Students will be asked to prepare simple one-minute videos explaining the characteristics of free and
proprietary software. To create it, you will use the Windows Movie Maker application or the free Openshot
application. You can also add off-screen audio (recording the students' voices) or music to harmonize them.
First of all, you should look for specific information and select images related to the topic.

d5b Activity 4
Students will have to divide into groups to prepare digital posters on the characteristics of free software. To
create it, you should research various websites to extract images, videos or links related to this topic, and
you can use the Glogster application (www.glogster.com).

Summary

In this chapter, we have discussed in depth the issue of software and its different varieties: free software, open
source software and proprietary software. We have also linked the topic of software to the debate on copyright,
creative commons licenses and freedom of access to the Internet. Since the way to access the hardware and
software of our computer is through an operating system, we have detailed versions of the Ms-Windows
Operating System in terms of proprietary software; and the Huayra version, developed in Argentina, if we want
an alternative with free software.
At the same time, we have reviewed the characteristics of programmed systems that the user cannot
modify, in contrast to those programmable systems whose operation can be effectively modified by the user,
where we can find high and low level software.

MARIANO Avalos ALFAOMEGA


36 The functions of hardware and software

Questions

1- What is software and what types of software currently exist?

2- What characterizes free software?

3- What are the differences between the Windows operating system and the Argentine version of the
Huayra?

ALFAOMEGA Mariano Avalos


Information Technology 1 37

4- What are the three main positions on the copyright debate?

5- What differentiates low-level software from high-level software?

Mariano Avalos ALFAOMEGA


CHAPTER 3

Introduction to computational
thinking. Computational problems

Contents Goals

■ Introduction
■ Learn to recognize a computational
■ Computational problems
problem.
■ The programs
■ Identify the characteristics of a computer
■ The pseudocode program.
■ The algorithms ■ Be able to define what pseudocode is and
■ How to systematize the resolution of computational when it is used.
problems ■ Detail what an algorithm is, what its main
■ Steps to solve a computational problem components are and how it is designed.
■ Summary ■ Recognize the different steps to solve a
■ Questions computational problem.

Introduction

Throughout the chapter, we will analyze various problems, which can be solved by applying computational
strategies and techniques, with the intention that students can recognize the data (inputs), the process
(algorithm) and the results (outputs). We will place special emphasis on the need to plan and represent the
algorithm as a way of modeling the problem.
We have also included various examples of algorithms from everyday life. Algorithms can be
represented in two ways. On the one hand, using pseudocode, that is: "the instructions or steps of the algorithm
are written in natural language." On the other hand, from a flow chart, which is the graphical representation of
the pseudocode.

MARIANO AI/ALOS ALFAOMEGA


40 Introduction to computational thinking. Computational problems

Computational problems

A computational problem addressed theoretically is a description based on mathematical objects (numbers,


sets, relations, etc.) that represent a collection of questions that a computer should be able to solve.
In general, computational problems respond to reality and, depending on the problem, to solve it we will
need to break it down into parts, that is, into smaller tasks. Another element that we must take into account is
the repetition of tasks, characteristics or criteria that are common, which allows us to develop patterns in order
to generalize the different processes.
And although it is often complex to achieve a level of abstraction that allows any computational problem
to be expressed, doing so properly will be a key factor for said construction to be effective.

The programs

A computer program is a sequence of instructions and commands written in specific code (linear, conic, etc.) to
carry out a specific task on a computer. Typically, any device requires programs to function, executing
instructions from said devices. The computer (PC, netbook, tablet) can directly use the instructions to run the
program.
Computer programs are classified into system software and application software. They are part of the
software, and generally, it is the computer programmer who writes the source code. The computer situation of
alternating the simultaneous execution of several programs is known as multitasking.
The method of writing a program is related to the chosen programming language. Here, the compiler
must match the chosen language, and each programming language must have its own compiler.

The pseudocode

In computer science, pseudocode is a detailed, informally written description used to lay the groundwork for
solving a specific problem. Then, it can be translated into any computer program we use.
Generally speaking, when we use pseudocode we use the structural conventions of a real programming
language, but we try to make it friendly to human reading. At the same time, in relation to programming
languages, the goal is to generate more and more autonomy and independence in "programmer" users,
focusing on reasoning and the process oriented towards finding solutions.
Pseudocode omits details that are not essential to human understanding of the algorithm such as variable
declarations, system-specific code, and some subroutines. Since it is easier for people to understand, it is
recommended to use pseudocode, instead of starting to program directly in the code of the conventional
programming language used. It can also be used in software development planning, to outline the structure of
the program before actually coding it.

Pseudocode does not obey the syntax rules of any particular language nor is it systematically
standardized. Sometimes function calls, code blocks, and code contained within a loop are replaced by a one-
line statement in natural language.
A possible alternative to pseudocode is the use of flowcharts, which can be considered as a graphical
alternative to pseudocode. Working with pseudocode allows us to measure and recognize differences and
similarities between languages and programming environments, reinforcing the idea that the same algorithm
can have several implementations, even in several languages. That is; with any programming language,
whether visual like Alice or textual like C, we can program various algorithms.

ALFAOMEGA Mariano Avalos


Information Technology 1 41

Alice
Logo of the Alice programming language

The algorithms

One of the oldest known algorithms is Euclid's algorithm. The term algorithm comes from the mathematician
Muhammad ibn Musa al-Khwarizmi, who lived between approximately 780 and 850 AD. C„ in what would be
the current Iranian nation. This mathematician described the performance of elementary operations in the
decimal numbering system.
We could say then that an algorithm is a sequence of processes logically related to each other in order,
that is, clearly detailed and without ambiguity, that when executed step by step, lead to the solution of a given
problem. We could also describe an algorithm as a set of instructions that specify the sequence of operations to
be performed, in a certain order, to solve a specific problem.
Algorithms require a fairly complex organization of data. Using suitable data structures can make the
design of an algorithm trivial, even a very complex algorithm can use very simple data structures.
The properties of an algorithm are as follows:
1. The algorithm must be precise and indicate the order in which each step is performed.
2. The algorithm must be correctly defined. For example, if you follow an algorithm twice, you should
always get the same result.

3. The algorithm must be finite. This means that the algorithm must terminate at some point; therefore, it
must have a specific number of steps.

Every algorithm consists of three main parts: input, process and output. For example, to design an
algorithm for making a cooking recipe we will have to take into account the following:
• Starter: ingredients and utensils used.
• Process: preparation of the recipe in the kitchen.
• Exit: completion of the dish.
Another example of an algorithm could be a customer placing an order with a factory. The factory
examines the customer's file in its database to verify that the customer is effectively solvent. If the client is
suitable for the request, then the company will accept the order, if not, it will reject it. With all this information,
we could develop the following algorithm:
• Start.
• Read the order.
• Review the client's file.
• If the client is solvent, accept the order; otherwise, reject the order.
• End.

Mariano Avalos ALFAOMEGA


42 Introduction to computational thinking. Computational problems

Commemorative stamp of Muhammad ibn Musa al-Khwarizmi. Source: From Unknown


-http://www.muslimheritage.com/topics/default.cfm?ArticlelD=631, [1], Public domain,
https://commons.wikimedia,org/w/index.php?cur! d=2652443

Algorithm design

In the analysis stage of the programming process, it is determined what the program does, while in the design
stage, it is established how the program carries out the requested task. The most effective approach to the
design process of solving a complex problem is to break it down into smaller problems, then break them down
into lower-level problems, and so on, until a solution can be implemented on the computer. This method is
technically known as Top Down or Modular design.

Each subprogram is solved by a module (subprogram) that has a single entry point and a single exit point.
Programs structured in this way are said to have a modular design. That is why the method of breaking down
the program into smaller modules is known as modular programming. Modules can be planned, coded, tested
and debugged independently (even by different programmers), and then combined together.

The process involves the execution of the following steps, until the program is terminated:

• Schedule module.

• Check the module.

• If necessary, debug the module.

• Combine the module with previous modules.

The design of the algorithm is independent of the programming language with which it will be coded later.

Examples of algorithms

We can both think of an algorithm for a certain process and also carry it out in different ways. To do this, we will
offer some examples that show these reasoning processes:

Example 1

How could we find the average of a set of numbers?

ALFAOMEGA Mariano Avalos


Information Technology 1 43

A possible solution would be:

1. Add the given numbers.

2. Count the number of numbers.

3. Divide the result obtained in point 1 by the result obtained in point 2.

Example 2

Changing a flat tire on a car.

The steps would be:

1. Raise the car with a hydraulic jack.

2. Remove the wheel bolts.

3. Remove the damaged wheel.

4. Fit the spare wheel.

5. Tighten the screws.

6. Lower the car with the jack again.

To the previous steps, we could add many more details. For example: opening the trunk, removing the
spare tire, loosening screws before lifting the car, etc.

Alternative to example 2

1. Remove the spare car wheel and tools from the car trunk.

2. Check if the spare wheel is damaged.

If it is, let's go to point 3.

If it is not, let's go to point 4.

3. We walk to look for help or call a friend to help us.

Let's go to point 14.

4. We check if the wheel is low on air or if it is the front wheel.

Yes it is:

4.1. We remove the cover from the center of the front wheel,

4.2. We loosen the screws.

4.3. We lift the car from the front, next to the damaged wheel.

4.4. Let's go to point 5.

If not:

4.5. We remove the cover from the center of the rear wheel.

4.6. We loosen the screws.

4.7. We lift the car from the front, next to the damaged wheel.

5. We remove the screws.

Mariano Avalos ALFAOMEGA


44 Introduction to computational thinking. Computational problems

6. We remove the damaged wheel.

7. We put the spare wheel on.

8. We put the screws in.

9. We lowered the car with the hydraulic jack.

10. We put the damaged wheel, the jack and the tools in the trunk.

11. We clean our hands with detergent.

12. We turn on the vehicle.

13. We continued driving.

14. End.

Example 3

Damian started working a few days ago as a ticket seller at the cinema complex in the El Portal shopping
centre. Since he has particularly little memory, he wants to make a program that specifies, according to a
person's age, what the value of his input would be. It should be noted that for those 5 years old or younger and
for those 65 years old or older, admission costs 100 pesos. For the rest of the attendees, the entrance has a
value of 200 pesos.

A possible algorithm would be:

1. Ask the user's age.

2. If you are 5 years old or younger, you pay 100.

3. If you are 65 or older, you pay 100.

4. Otherwise, pay 200.

5. End.

How to systematize the resolution of computational problems

To solve computational problems we can organize a series of steps to propose the solution to a specific
problem:

1. Analysis of the problem.

2. Identify the inputs, processes and outputs of the problem as well as the declaration of the variables
that must intervene.

3. Algorithm design. Description of the ordered sequence of steps with precision to facilitate the search
for the solution to the problem.

4. Algorithm coding. It is the expression in a programming language of the steps defined in the algorithm.

5. Execution and validation of the program by the computer.

C “In computer science and programming, algorithms are more important than programming languages or

ALFAOMEGA Mariano Avalos


Information Technology 1 45

computers. A programming language is just a means to express an algorithm, and a computer is just a

processor to execute it.”

LuisJoyanes, teacher and programmer

Author of Big Data (Atfaomega publishing house)

Steps to solve a computational problem

1. Problem definition. It is important to clearly and accurately specify the problem we wish to try to
resolve, as well as to be able to provide various alternative solutions.

2. Analysis of the problem. After identifying the problem, we will have to analyze and study its main
characteristics, as well as the possible resolutions. The fundamental aspects that we will have to
consider are:

• What data or results are expected to be obtained?

• Is the input data supplied correct?

• Is the processing of such data appropriate?

3. Choosing the best alternative. In the specific work of developing the algorithm and its corresponding
program, several alternatives may arise as a proposed solution to the problem. The main challenge will
be to choose the option that we consider most appropriate.

4. Layout. In this topic, we could graphically design what we are trying to solve using a flow chart, which
would help us better understand the situation. We call a flowchart the graphic representation of a
logical sequence of steps that the computer must follow to solve a problem.

5. Testing and testing. To know if our flowchart or diagram is working properly, we must test it. This test is
known as desktop testing, and will allow us, according to the sequence indicated in the diagram, to test
various input data in the program until obtaining the desired results. This mechanism will allow us to
make the necessary adjustments, or validate that our code is correct.

6. Coding. Once the program has been verified and tested, it is time to move on to coding. In other
words, in the computer's memory, we place and transcribe each step of our flowchart into an
instruction, command, or statement, using a language that the computer recognizes.

7. Testing on the computer. After generating the program and running it on the computer, various
possible scenarios can be displayed:

• The program logic is fine, but it has simple errors, in which case we will have to correct it, either
by modifying some instructions or adding new ones.
• There are errors in the program logic. Therefore, we will have to go back to our flowchart or code
written in pseudocode to reanalyze it and make the relevant corrections.
• There are too many serious errors. We will have to rethink our program, that is, we will have to
look for new solutions to continue with the other steps.
• There are no errors and the results are as expected.

Mariano Avalos ALFAOMEGA


46 Introduction to computational thinking. Computational problems

in Activity 1
Teams of two students will be formed, where each team must develop a pseudocode algorithm that solves a
social problem chosen by the team. A possible theme would be the separation of garbage between degradable
and non-degradable elements.

and Activity 2
Develop an algorithm in pseudocode to solve the following problem. We have a list of members who attended
a football match. Depending on the age of the people attending the match, we must create an algorithm that
determines the cost of admission, taking into account that if the person is under 6 years old, they will not pay an
entrance fee; if they are between 6 and 12 years old, they will pay 80 pesos; and if they are over 12 years old,
they will pay 250 pesos.

Summary

In this chapter, we have analyzed the fundamental operations and the different procedures that must be
followed to solve a certain problem in the field of computing. In this sense, computational algorithms are the
previous step for the creation of a computational program, which will be designed by a programmer capable of
converting this sequence of steps into an application, through a programming language.
Said algorithm must define exactly one input, the process and the output. Algorithms are independent of
the programming language. And for a program to be successful in solving the problem, it will need an algorithm
that is not only designed with creativity and deep knowledge of programming techniques, but also optimal in
terms of the use of time and resources.

ALFAOMEGA Mariano Avalos


1- What is pseudocode and what is it used for?

2- What is a flowchart and what is it used for?

3- What are the main characteristics of algorithms?

ALFAOMEGA Mariano Avalos


Information Technology 1 49

4- What are the steps to follow to design an algorithm?

5- What are the different stages in solving a computing problem?

MARIANO Avalos ALFAOMEGA


)
CHAPTER 4
FOR
AND

Solving
Tbéproblems
computational

Contents Goals
■ Introduction ■ Identify the input, process and output of
■ Recognition of data (inputs), the process (algorithm) an algorithm.
and the results (outputs)
■ Define the algorithmic structures that
■ How to plan and represent an algorithm as a correspond to conditional instructions.
contribution to modeling a problem
■ Learn the characteristics of black box
■ The black box methodology techniques.
■ How to use mod u la riz ation and decomposition ■ Be able to use the technique of
strategies
decomposition into parts to solve a
■ Problem solving using bottom-up and top-down problem.
methodologies
■ Determine when to use modularization.
■ Summary
■ Recognize when it is appropriate to use
■ Questions the bottom-up methodology and when the
top-down methodology in problem
solving.

Introduction

Using pseudocode writing, we introduce the concept of a program, where students translate algorithms into a
pseudoprogramming language. To do this, it will be essential to know how to correlate algorithms with
programs.
On the other hand, both to analyze problems already solved (such as the case of working programs)
and to solve new problems, we will carry out a work methodology that includes the following stages: problem
analysis, data identification, design and representation of the algorithm, coding, execution, testing,
debugging.
In this sense, we will gradually facilitate the use of modularization and decomposition strategies into
parts: solving problems by applying bottom-up methodologies (from the parts to the whole) and top-down
methodologies (from the whole to the parts).

MARIANO AI/ALOS ALFAOMEGA


52 Solving computational problems

Recognition of data (inputs), the process (algorithm) and the results (outputs)

In the daily events of our lives, we constantly carry out, even without realizing it, because many times they
are almost automatic, a series of actions that are undoubtedly related to computational thinking:
• Make a cup of tea or coffee.

• Buy a car.

• Change career.

• To move from one place to another.

• Buy a house.

• Write a book.

• Create an application.

The process of planning and achieving these instructions involves, to varying degrees, implementing
computational thinking.
Whenever we refer to planning, we are thinking about breaking down problems into parts, searching for
and obtaining sets of solutions that allow us to achieve a specific objective.

Analysis of the computational problem

When a user presents a programmer with a problem to be solved using a computer, he or she generally has
a more or less extensive knowledge of the domain of the problem, but does not have sufficient knowledge of
the field of computing. In other words, an administrative employee who needs a program to carry out a
company's accounting may be an expert in accounting (problem domain), but does not necessarily have to be
an expert in programming.
For this reason, to successfully address a problem, both will need to collaborate from their specific field
of knowledge. In this sense, the programmer cannot, alone, without the help and experience of the domain
expert, offer an effective and lasting solution.
The construction of any algorithm must have the basic structure of a system: input, process and output.
On the one hand, the input would correspond to the inputs, that is, the necessary data that the process
requires to offer the expected results. On the other hand, the process would be represented by the steps
necessary to reach the solution to the problem. Finally, the output would be composed of the results through
the executed process.

Let's comply
Example

We want to solve an algorithm that adds two numbers.

To solve this algorithm we must take into account:

Inputs: values of the variables (of each of the two numbers).

ALFAOMEGA Mariano Avalos


Information Technology 1 53

Process: assign to an element (which we could technically call a variable) the value of the first number plus
the value of the second number.

Output: printing the value of the variable containing the sum obtained.

Algorithm design

An algorithm consists of a clear and concise specification of the steps necessary to solve a certain type of
problem. However, in order to be able to design algorithms it will be necessary to have a notation that allows:
• Detail the operations that will be involved in the algorithm (actions, instructions, commands,

etc.).

• Describe the objects manipulated by the algorithm (data/information).

• Control the execution of the defined actions, indicating how they are sequenced over time.

Let's comply
There are two types of elementary actions that the computer is capable of performing

• Arithmetic-logical type actions. Operations that, based on certain data, perform an arithmetic
calculation (addition, subtraction, multiplication, etc.) or a logical calculation (greater than, less than, equal to,
etc.). The first ones return a numeric value (4, -5.33), while the second ones return a logical value (true or
false).

• Input-output actions. They allow data to be captured for subsequent processing (input) and also the
saving of the results of said processing (output). We want to solve an algorithm that adds two numbers.

The sequences of elementary actions

When several actions must be executed successively in an algorithm, they are described one after the other,
taking into account the order in which they must be executed. If we wish, we can use some kind of symbol to
separate two consecutive actions. The semicolon is commonly used as a separator, as shown in the following
example.

Action 1;
Action 2;

Action n.

Condition (Yes)

Conditional structures are used to make logical decisions. In other words, they tell the computer to determine
whether a condition is true or false. According to the result, the corresponding block of instructions will be
executed. A block set can contain one or more blocks that are executed one after the other. Objects move
and interact with each other.

Mariano Avalos ALFAOMEGA


54 Solving computational problems

Simple conditional composition

When an algorithm wants to indicate that a certain action should only be executed under a certain condition
(logical operation), it is indicated in the following way:

If Condition Then
Action;
FinSi
The if statement indicates that only if the condition is true will the action be executed. In this case, the
action can refer to an elementary action or a set of them.

Double conditional composition (alternative)

Instead, in some circumstances, one block of statements or actions is executed when the condition is true,
and a separate block of statements or actions is executed if the condition is false. This situation is specified
as follows:

Yes Condition Then


Action A;
But
Action B;
FinSi

To apply an input-output model to a computational problem we must take into account:


a) Let the number of entries be finite and determined.
b) That the entries must arrive at the computer physically to be processed.
c) That the steps of the process are carried out in an appropriate and ordered sequence according to
the algorithm.
d) That the steps can be performed on the computer, through various operations and instructions.

Fake TRUE

ALFAOMEGA Mariano Avalos


Information Technology 1 55

Flowchart

How to plan and represent an algorithm as a contribution to modeling a


problem

An effective modularization strategy focuses on the maintainability of the software system. This means that it
is easier to make changes to the functionality of the software than to fix bugs or replace parts of it. For this
reason, the more cohesion and less coupling the elements of our system present, the easier they will be to
maintain.
On the other hand, modularization also has a great impact on the reusability of a system. In other
words, with proper modularization it will be easier to locate, change or replace an aspect of the system, as
well as use its parts in other applications. Although maximizing modularization (and consequently, reuse) has
side effects that are not so positive.
Specifically, the reuse paradox refers to the fact that the more modular and reusable a program is, the
more difficult it is to use its parts. Therefore, trying to make effective use of modularization may ultimately
offer more difficulties than benefits. And if we want to take advantage of its positive aspect, we must pay
attention to two crucial issues. On the one hand, understanding what characteristics are recurrent in an
effective modular design. On the other hand, knowing the techniques that allow us to build the algorithm.

Let's comply
What is a module?

A module is a routine, subroutine, subalgorithm, procedure or function (in C) that can be defined within an
algorithm for the purpose of performing a specific task. It can also be called or invoked from the main
algorithm when needed.

Characteristics of an effective modular design

An effective modular design tends to exhibit the following characteristics:

Mariano Avalos ALFAOMEGA


56 Solving computational problems

1. Each module has a set of very small, well-defined tasks.


2. Each module has a name that allows you to clearly identify its objectives.
3. Each module provides an interface that defines your contract in terms of requirements and
responsibilities. It is the mechanism through which it can be used.
4. There are highly stable abstract modules.
5. There are also specific modules that exhibit a certain degree of instability, because they use other
modules to perform the actual work.
6. There are no cyclic dependencies between modules.
7. Well-defined responsibilities of modules, their boundaries and limits, help to ensure that changes are
made in a partial manner, minimizing the impact on the entire algorithm.

What is needed?

Today, every algorithm developer makes use of a wide range of design and programming technologies,
including: layer decomposition, object technologies, aspect technologies, design patterns.
Therefore, to provide adequate modularization to our developments we must take into account the use
of guides in the form of principles, practices and patterns, both for design and development strategies. In
addition, modularization will be a key issue in terms of maintainability and reuse.

The black box methodology

The black box and modular programming

In modular programming, a program (or an algorithm) is divided into modules. In the design phase, each
module will be sought to be a black box within the global system that represents the program to be
developed. This achieves independence between modules, an aspect that would facilitate implementation.
In this context, a work team can be organized where each member will be in charge of implementing a
part (a module) of the global program or algorithm. The implementer or programmer of a specific module
must know how communication with other modules works, although it will not be necessary to know how they
work internally. For this reason, for the developer of a module, the other modules will be black boxes.

Black box testing

It is a software testing technique where functionality is verified without taking into account the internal
structure of the code, implementation details or internal execution scenarios in the software.
In black box testing, we focus only on the inputs and outputs of the system, without worrying about the
internal structure of the specific software program. To obtain the details of what these inputs and outputs
should be, we will rely on the software requirements and functional specifications.
By technical knowledge we mean knowing programming languages, tools to know how to manage
them, understanding the code and its implications, handling database queries and tools to manage them
correctly, technical knowledge linked to services or scheduled tasks, and use of other tools for managing all
technical components associated with this type of testing.
Black box testing, referred to as specification-based techniques, is a way of deriving and selecting test
conditions, data, and cases from system requirements documentation. Black box techniques can also be
used to design non-functional software tests.

ALFAOMEGA Mariano Avalos


Information Technology 1 57

Black Box Testing Techniques

• Partition of equivalences.
• Border value analysis.
• Decision tables.
• Transition between states.
• Use case testing.
• Combinatorial techniques.
• User story testing.
Equivalence partition

• Classification of system data entries into groups that exhibit similar behavior and will therefore
be processed in the same way.

• Possibility of defining partitions for valid or invalid data (data that should be rejected by the
system).

• Definition according to data outputs, internal values, related values before certain events or
after them.

Analysis of border values

• Behavior at the edge of a data partition is more likely to introduce bugs.

• It has a high capacity to detect defects, since it is possible to review the functional
specifications to identify interesting data.

• The maximum and minimum values of a partition are its edge values.

• A test is defined for each edge value.

Decision tables

• They are a useful tool for documenting highly complex business rules that the system must
comply with.

• They are developed from the analysis of the functional specification and the identification of
these business rules.

• Input conditions and actions are often expressed in terms of true or false.

Transition between states

• A system can exhibit different behaviors depending on its current state or certain previous
events.

• This aspect of the system can be represented in a state transition diagram.

• The state diagram allows the tester to visualize the states, transitions, data inputs, even the
events that trigger them, as well as the actions that may result.

• A state table shows the relationships between states and data inputs.

Mariano Avalos ALFAOMEGA


58 Solving computational problems

Use Case Testing

• They describe the interactions between actors (they can be users or systems) that produce a
result that adds some value.

• They are useful for defining acceptance tests where the user or client participates.

Combinatorial techniques

• They are useful when the combinations of input data and parameters from which a system can
be run are too numerous to cover in the time available.

• It is possible to use tools such as classification trees to identify mutually incompatible


combinations.

• They provide the means to identify a subset of these combinations that can help achieve a
given level of coverage.

User Story Testing

• They describe a functionality (or at least a part of it) that can be developed and tested in a
single iteration.

• They detail the functionality to be implemented, as well as the non-functional requirements and
acceptance criteria.

• The minimum test coverage will consist of the acceptance criteria.

How to use modularization and decomposition strategies

In general, the computational problems to be solved are complex and extensive, and even present situations
where part of the problem must be modified to adapt to new requirements. Within this context, we will find two
tools, abstraction and decomposition, that will make the task easier for us. On the one hand, abstraction will
allow us to find and represent what is relevant to the problem. On the other hand, decomposition, based on
the paradigm of separating and fractioning into parts, will favor a specific deepening of certain topics.
The purpose of decomposition is to divide each problem into smaller problems that are easier to solve.
Typically, a person understands a complex problem by dividing and separating information. For this reason,
in order to be able to address a complex real-world problem, it is necessary to divide it, that is, to modularize
it. This working methodology offers several positive aspects. The main one: promote teamwork, since each
programmer will receive the specifications of each of the tasks to be performed and the restrictions they must
deal with.
It also enables maintenance, because it is in the correction of errors and modification of the code where
the analysis and control of a part, portion or module is simplified, rather than in the entire computational
problem. At the same time, it promotes code reusability. We must not forget that whenever possible it is
advisable to use already written code. Finally, another unavoidable feature is that it is accessible to data.
In well-organized algorithms, information traveling to and from modules is produced through
parameters. The programmer only needs to worry about meeting the precondition when invoking the action,
and he will be certain that the action will fulfill its objective.
The algorithm must provide the input data that it will manipulate during its execution, while the action must
return the results it obtains. The parameter type indicates how the argument values are bound to the
parameters.

ALFAOMEGA Mariano Avalos


Information Technology 1 59

Problem solving using bottom-up and top-down methodologies

There are two main methods for solving computational thinking problems: bottom-up and top-down. Each
method has its advantages and disadvantages. Therefore, when choosing which one to use, we will have to
take into account some aspects of our specific situation.

Bottom-up problem solving method

This method, very useful when the problem is suspected to be physical, begins with the physical components
of the network, traversing the layers in an ascending manner until locating the cause of the problem. Since
most computational problems reside at lower levels, the implementation of the bottom-up method is extremely
effective.
Its main disadvantage lies in the need to check each module or part of the algorithm until the possible
cause of the problem is detected. We must not forget to record every conclusion and possibility.

Top-down problem solving method

Troubleshooting using the top-down methodology starts with end-user applications and works its way down
through the layers until the cause of the problem is identified. Before tackling the more specific parts of the
problem, end-user applications are tested comprehensively. It is recommended to use this method for the
simplest problems.
Its main drawback lies in the need to record each part of the algorithm until the possible cause of the
problem is located. Instead, the challenge will be to determine which part to examine first, as it will always
require further analysis.

d Activity 1
Write an algorithm to make a chocolate cake, considering the input, process and output components.

e5 Activity 2
Organize students into various work teams to make presentations with slides on the topic of effective
modular design. For the design of the presentation, we can use the free Impress application or the Ms-
Powerpoint tool.

Summary

Without a doubt, one of the main challenges for computer science is problem solving. In other words, we are
referring to the ability to formulate problems, thinking of solutions creatively, and oriented towards a clear and
effective resolution. A computational problem is a description, based on mathematical objects (numbers,

Mariano Avalos ALFAOMEGA


60 Solving computational problems

permutations, partitions, matrices, sets, and relations), that represents a series of questions that the computer
must be able to answer.
To successfully meet this challenge, we have two tools: abstraction and decomposition. On the one
hand, abstraction will allow us to find and represent what is relevant to the problem. On the other hand,
decomposition, based on the paradigm of separating and fractioning into parts, will allow us to delve more
deeply into certain topics. Likewise, to solve computational thinking problems we can rely on two
methodologies: bottom-up and top-down. Each one will have its advantages and disadvantages. And
according to our specific situation, we will be the ones who must evaluate which is most appropriate to
choose.

ALFAOMEGA Mariano Avalos


1- What is the role of algorithms in problem solving?

2- What are the qualities of an effective modular design?

3- What are the characteristics of black box techniques?

ALFAOMEGA Mariano Avalos


Information Technology 1 63

4- What strategies can be followed to solve computational problems?

5- What are the two computational thinking problem-solving methodologies?

Mariano Avalos ALFAOMEGA


CHAPTER 5

Programming Strategies and


Structures

Goals

Contents ■ Identify the characteristics of the programs.


■ Understand the qualities of data and detail
■ Introduction
its various types.
■ Programs as sequences of actions ordered in time
■ Be able to define the concept of variables.
■ How to combine various repetitive programming
structures ■ Learn to combine the various repetitive
programming structures (indefinite,
■ The concept of data
conditional, defined) and conditionals.
■ Data types
■ Knowing when to use procedures and
■ Definition of variables
functions.
■ Structured programming: modularity, reusability and
readability of programs ■ Recognize the logic of object-based
programming.
■ How to use procedures and functions
■ Master the fundamental commands of the
■ Introduction to object-oriented programming logic
Scratch application.
■ Iconographic programming languages
■ Know the principles of programming by
■ Features of Scratch App succession of lines of code.
■ Scratch Main Commands
■ Introduce the main aspects of storytelling
■ Programming by succession of lines of code and video game design.
■ Programming applied to the development of animations, ■ Become familiar with programming applied
simulations and video games
to animation and video games as well as
■ How to program stories that include characters, scenes robotics and art.
and interactions
■ Programming applied to robotics
■ Programming applied to art (digital artistic developments
applying programming principles and strategies)
■ Summary
■ Questions

Mariano Avalos ALFAOMEGA


66 Programming Strategies and Structures

Introduction

In the daily events of our lives, we constantly carry out, even without realizing it, and many times they are
automatic, a series of actions that are related to computational thinking. As we enter the field of programming,
we begin to recognize programs as sequences of actions ordered in time. These actions combine repetitive
programming structures (indefinite, conditional, defined) and conditional (including logical and boolean
operations).
Next, we will analyze the characteristics of the data category, and its various types (numeric,
alphanumeric, boolean), as well as variables (which include declarations, assignments, and the use of
mathematical expressions).
We will gradually become familiar with the notions and associated methods known as structured
programming, through strategies that facilitate the modularity, reusability and readability of programs. We will
also make a first approximation to the logic of object-based programming. In this sense, considering the
possible programming languages to be used by the students, we will begin with those of iconographic
programming until gradually reaching programming by succession of lines of code.
As regards the approach to problems related to the development of computer applications, we will focus
our attention mainly on three areas. On the one hand, in programming applied to the development of
animations, simulations and video games (developing stories with characters, scenes, interactions between
them and with users). On the other hand, in programming applied to robotics (programming real or simulated
educational robots, for reading sensors, activating actuators, and planning trajectories). Finally, we will focus on
programming applied to art (artistic-digital developments applying programming principles and strategies).

Programs as sequences of actions ordered in time

Programming is a process used to think, plan and organize a series of actions to be carried out, within the
framework of a specific project, and in a certain period of time, to accomplish a specific task.
In general, programs achieve their goal in a finite time. However, there are exceptions, for example, the
control programs of an alarm system have infinite time requirements.

How to combine various repetitive programming structures

Iterative composition is the means by which short programs involving a large number of actions can be written.
There are several iteration formats that vary between languages, although, in general, they respond to three
repetition models: repeat while a condition is met; repeat until a condition is met; and repeat a certain number
of times.

Repeat while a condition is met

It may happen that a block of instructions must be executed without knowing the exact number of times. In
these cases, languages offer conditional iterative control structures where actions are executed depending on
the evaluation of a condition.
Example
WHILE condition
DO Action
END_WHILE

ALFAOMEGA Mariano Avalos


Information Technology 1 67

Here, the action will be repeated as long as the condition is true.

Repeat until a condition is met

Example
REPEAT action UNTIL_CONDITION
Repeat N times FOR i [l..n]
DO action
END_FOR
The action will be repeated n times, unless the condition is false

The concept of data

In a program, the basic components are instructions and data. The instructions or statements represent the
operations that will be executed when interpreting the program. On the other hand, data are information values
that need to be available. They are represented symbolically by a name that is associated with a unique
memory address.
We could also say that data is the representation of a real-world object through which we can model
aspects of a problem that we want to solve with a program on a computer.
We can organize the data into local and global ones. Global data is detailed in the declaration section of
the main program, while local data is stated in the declaration section of each module (subprogram).

Data types

Data type is the property of a value that determines its domain (what values it can take); what operations can
be applied to it; and how it can be represented. In that sense, all data values that appear in a program have a
type assigned to them.
The main types are:
• Numerical data. It allows us to represent numbers (integers, real, complex),
• Logical data. They can take the logical values true or false. They are also called boolean,
because they represent logical values 1 or 0, applying the algebraic system based on binary
logic, created by the mathematician Boole.
• Alphanumeric data. Values that represent text are also called strings. Literal alphanumeric values
can be represented as text enclosed in single quotes.

Definition of variables

Variables are similar to boxes in which we can store data (values). We could define a variable with a name that
represents a value or a text, which after assigning it can be used in the programs. The value of a variable may
change at some point in the program or remain unchanged. Therefore, the value that a variable contains is the
last data that has been assigned to it.
For example, in the Scratch application, variables are used to store the answer that the user types with
the keyboard.

Mariano Ajalos ALFAOMEGA


68 Programming Strategies and Structures

Structured programming: modularity, reusability and readability of programs

Structured programming emerged in the 1970s as an alternative to the programming proposals that existed at
that time, suggesting that every program could be written using only three basic control instructions: the
instructions are executed one after another, selection (if) and iteration (while).
The main characteristics of structured programming are modularity, reusability and readability of
programs:
• Modularization. In general, the problems to be solved are complex and extensive, and there may
even be situations where part of the problem must be modified to adapt to new requirements.
Therefore, the decomposition of a problem aims to divide it into subproblems, that is, smaller
problems that are easier to solve. Modularization favors teamwork, since each programmer
receives the specifications of the task to be performed as well as the restrictions they must deal
with. In summary: a problem must be broken down into simpler ones, called modules. In this way,
different programmers will have specific, well-defined tasks, and will communicate with each
other appropriately, to achieve a common goal.

• Reusability. This feature is essential, since different submodules or parts of the code can be
reused in different parts of the program. For example: when an action is invoked (called) from
some point in an algorithm, the execution flow moves to the first instruction of the action.

The action is then executed to completion, and when it is finished, the flow moves back to the
algorithm instruction that follows the one that originated the invocation.

• Readability. It is key that programs are coherent, clear, and can be quickly understood by any
programmer who has not written one. Also, it should not have codes, instructions and variables
that are repeated and distract from reading the program.

How to use procedures and functions

In programs, functions and procedures can be used. The purpose of functions is to calculate a value from other
values that are passed as arguments and are used in various actions. To solve this problem, programming
languages incorporate the concept of function. The function returns a single value, that is, it simply calculates a
value and does not modify any of the values described at the time of the change.
On the other hand, a procedure is a part of the program that performs a specific task and has a certain
degree of autonomy. Procedures are often used to reduce and avoid duplication of routines and program code.
Such codes can be reused, and it is possible to construct subproblems that partially solve the global problem
for which the solution program is created.
As for the differences between functions and procedures, it should be noted that procedures do not
necessarily need to return a value like functions do. On the other hand, procedures are executed and called
from other procedures and/or functions. In this sense, each programming language has its specific
characteristics for the implementation of procedures.

Introduction to object-oriented programming logic

The main features of object-oriented programming are as follows:

• Abstraction. It defines the essential characteristics of an object, that is, its behaviors are

ALFAOMEGA Mariano Avalos


Information Technology 1 69

captured. The abstraction process allows to select the relevant characteristics within a set and
identify common behaviors to define new types of entities in the real world. Abstraction is key in
the object-oriented analysis and design process, since through it we can create a set of classes
that allow us to model reality.

• Encapsulation. It means gathering all the elements that can be considered belonging to the same
entity at the same level of abstraction. This allows for increased structured design of system
components.

• Polymorphism. It refers to the fact that some different behaviors, associated with different
objects, can share the same name. Calling them by that name uses the behavior corresponding
to the object being used. In other words: references and collections of objects can contain
different types of objects, and invoking a behavior on a reference will produce the correct
behavior for the actual type of the referenced object.

• Inheritance. The classes are not isolated, but are related to each other, forming a classification
hierarchy. Objects inherit properties and behavior from all classes to which they belong.
Inheritance organizes and facilitates polymorphism and encapsulation, allowing objects to be
defined and created as specialized types of pre-existing objects.

• Medularity. It is the property that allows an application to be subdivided into smaller parts, called
modules. Each of them should be as independent as possible from the application itself and from
the remaining parts.

• Principle of concealment. Each object is isolated from the outside, it is a natural module. Each
type of object exposes an interface to others, specifying how they can interact with objects of the
class. Isolation protects an object's properties from modification by unauthorized programmers.

• Garbage collection. Through this technique, the object environment is responsible for
automatically destroying and unlinking from the associated memory, the objects that have been
left without any reference to them. In other words: the programmer does not have to worry about
allocating or freeing memory. That is, the environment will allocate it when you create a new
object and release it when no one is using it.

Iconographic programming languages

Visual or iconic programming languages are computer programs that are characterized by performing the
movements of building blocks (visual objects, icons or drawings) in an interface that is suitable and user-
friendly for such actions.
The resulting program is a set of linked icons (drawings), where each icon represents an instruction that
the program controller is able to understand and carry out. An example of this type of program is Scratch.

Features of Scratch App

The Scratch application uses the metaphor of "interlocking pieces" to animate objects on the screen, with a
very simple and intuitive use. This program is used from a development environment that shows at a glance all
the necessary elements: scenario, objects and language elements. It is possible to download an offline version,
and from version 2.0 onwards it is also possible to interact from the web. On the project website
(http://scratch.mit.edu/), we will find many proposals and examples generated by the user community.

Mariano Ajalos ALFAOMEGA


70 Programming Strategies and Structures

Source consulted: http://ntcreativas.com/wp-content/uploads/2018/05/Scratch-logo-Asturias-Oviedo-NT-Creativas


.png

Scratch works with blocks, made up of each of the categories that divide the commands. These are
organized into ten color-coded categories: motion, appearance, sound, pencil, data, events, control, sensors,
operators, and more blocks. A set of blocks can contain one or more blocks, which are executed one after the
other.
Objects are characters that are given orders: "to move"; "to change their appearance"; "to interact with
other objects"; "to respond to external events." They have a set of attributes: size, x coordinates, which locate
them on the screen; and they are capable of performing certain actions such as moving or changing their
appearance.
Another significant concept is that of disguising an object. In Scratch, we could say that the same thing
happens as in the real world, that is, it is possible to change the appearance of the object, but always
maintaining its essence. Objects can have one or more costumes, and we can alternate between them in our
program.
Finally, in Scratch, Stages are the places where users can see their stories, games, and animations come
to life. On stage, objects move and interact with each other. The stage is 480 points (pixels) wide and 360
points high, and is divided into an XY Cartesian plane. The center of the stage corresponds to the coordinates
X=0 and Y=0.

Scratch's main commands

We can have as many scenarios and objects as we want, either by using those already available in the
standard installation of the tool, or by creating our own. This is one more motivating factor for choosing Scratch.
The available elements are not only drawings, but also sounds. We can use the default ones, add new sounds
from the project website, or incorporate our own recordings. For example, through the built-in recorder in the
environment or any other external tool. One possibility would be to use the free application Audacity.
On first execution of the program, the environment is in English. If we want to change the language, we
simply have to press the Language button, and select Spanish. Thus, we will have our environment in Spanish.

Scratch Environment Elements

In the following image, we can see the initial screen.

ALFAOMEGA Mariano Avalos


Information Technology 1 71

N
programs will access the sector that will allow us

begin to incorporate commands and actions into the program, using the various commands and their respective
combinations.

MARIANO AJALOS ALFAOMEGA


72 Programming Strategies and Structures

We start working

As we mentioned in the introduction, Scratch uses "pieces" that fit together to create programs, which are
usually animations. When we open the environment, we find by default the cat object, the application symbol,
on the execution screen (stage).
On the stage, we can add as many backgrounds and objects as we want. To do this, you have to edit
them from the environment or load them from the file. Furthermore, to program each of the elements, it will be
enough to select it from the list of objects.
To add actions to the selected object, we must select the object and drag the blocks that carry out the
actions we want to request. It is always a good idea to start the block with a control element. For example,
“When pressed…”, which can be found first when you select the control block.

We will drag the element to the scripting area. In this way, we can “fit” pieces together until we form our
program. We can even add elements of repetition, branching, etc. We will work with a first example of a simple
program already developed, selecting “pieces” from the different types of blocks (movement, control,
appearance, sound).

ALFAOMEGA MARIANO Avalos


Information Technology 1 73

9Ho File Edit Share Help

Example 1
We will make a very simple first program to draw a square. To begin, we will use the repeat command, to carry
out an action 4 (four) times. Although it is possible to repeat it as many times as we want. We also use the
commands move x number of steps and turn x degrees. In our case: 90°, since the angle of a square is 90°.

MARIANO AJALOS ALFAOMEGA


74 Programming Strategies and Structures

Incorporating questions

Now we will incorporate repeating a series of actions x number of times, but where the number of times will be
consulted with the user.

alp

delete

lower pencil

ask EEZHEEE and wait

repeat answer

move steps

turn QE) / response degrees

Note that the rotate command interacts with dividing 360° (a rotation) by the entered answer relative to
the number of sides.

Modifying the scenarios

It is possible to edit the scenarios with various objects. Scenarios act as a user interface, using a set of images
and graphic objects that represent the information and actions available in that interface. Its main use is to
provide a simple visual environment to allow communication with the user.

When you click on Scenarios, several options will be displayed. If we select Backgrounds, we will be able
to modify and/or add other scenarios that will be available in our programs with Scratch.

ALFAOMEGA MARIANO Avalos


Information Technology 1 75

MARIANO AJALOS ALFAOMEGA


76 Programming Strategies and Structures

Working with the aesthetics of the project

Costumes. Before using the costumes we must import or create them. To access them, we will have to click on
Objects (or on each object we have), and then choose the Costumes option.

Painting editor. It is a tool that allows the creation of a new object or the editing of an existing one. Clicking on it
will display the following window, which will allow us to modify and edit each object:

ALFAOMEGA Mariano Avalos


Information Technology 1 77

Programming Control block commands, we can use this command to choose keys that fulfill various functions.

If we click on a it We drag the sector of


n
actions. For example: moving an object with the arrow keys on your keyboard.
Another very interesting command is wait Q seconds that allows you to work with the
waiting times for different actions of the objects that interact in our project.

Using conditionals

Condition (Yes). It is used to tell the computer that it must determine whether a condition is true or false, and
based on the result, execute the corresponding set of blocks. The most common form is composed of a
proposition that is evaluated and two sets of blocks that are executed, one when the condition is true (double
simple selection) and when it is false (only in double selection).

To perform this action we will have to select the command

Using variables

To start creating a variable we will have to click on Variables and choose the New variable option.

There we will have to put a new name to the variable:

MARIANO AJALOS ALFAOMEGA


78 Programming Strategies and Structures

Variables can be local to the object or global to the program. If they are global, they will help us to make
the different objects interact with each other and also with the scene.

Save your work

Once the entire process is complete, to save the work done, we must go to the File menu and click on the Save
As option.

Programming by succession of lines of code

Line-of-code programming languages have the ability to write commands with words that accomplish or solve a
task. Such command lines can carry out sequenced commands or be grouped into subgroups to solve
subtasks that contribute to the objective of the main program.
When we develop a programming language of lines of code, although it also works for any programming
language, we must take into account the following aspects, which will help us generate a good program of lines
of code:
• Easy reading. The program should be written in a way that is simple and quick to read by other
programmers. Therefore, it is important to use meaningful variables and for the program to be
well commented, since comments make the program easy to understand. Comments will tell us
why the program does what it does. Good comments can guide not only other programmers, but
also the author of the program himself.
• Simplicity. Some of the code may perform very complex tasks, but the program should be
simple. Good programmers will know how to accomplish a task without overcomplicating things.
Each part of a program should do only one task, allowing the next part of the code to perform the
next task. It is also not good to duplicate parts of the code. In summary: it is important to
implement short, well-defined functions that perform a task well.
• Flexibility. A program should be able to be modified, extended or reused in any other program, in
the future. A good program is written with today's requirements in mind, but with tomorrow's
expectations in mind. A program is good if future programmers

ALFAOMEGA Mariano Avalos


Information Technology 1 79

• are able to add or change certain parts of the program without having to analyze other parts.
• Easy maintenance. Every program has errors and is susceptible to improvement. Ease of
maintenance is a key attribute of a good program, as it will always need maintenance and
corrections.
• Functionality. Although it may seem obvious, every program must work correctly, that is, they
must solve the task for which they were created.
A line-of-code programming language is Python. This program features efficient, high-level data
structures and a simple, yet effective approach to object-oriented programming. Python's syntax, coupled with
its interpreted nature, make it an ideal language for scripting and rapid application development, in a variety of
areas and on most platforms. The Python interpreter and its standard library may be freely distributed, in binary
and source form, for all major platforms from the Python website (http://www.python.org).

python
Source: http://www.webbizarro.com/images/noticias/2015/08/ahorrar-tiempo-con-python-webbizarro-
internal_1438713044000_alarge.jpg

Programming applied to the development of animations, simulations and video


games

Programming can also focus on the animation and simulation of various video games, as well as the design of
specific applications for mobile devices. An example of an animation program is Anime Studio Pro 5. This 2D
software allows you to create anime animations, and also has some example models already installed in the
program.
Among other options, we can explore the use of the free Arduino hardware board
(https://www.arduino.cc/), and explore various websites about related artistic projects (http://proyectos-arduino-
geometriaemocional.blogspot.com/). In addition, we will be able to explore some basic notions of electricity and
electronics, and incorporate the concepts of sensor, actuator and interface, while analyzing the main types of
sensors and actuators.

How to program stories that include characters, scenes and interactions

Nowadays, the possibilities of digital narrative, including the design of video games or virtual simulations, is
undoubtedly one of the most interesting aesthetic and creative processes.
The emergence of hypertext gives reading the possibility of overcoming the linear and sequential nature
of traditional text to incorporate a wide variety of registers: verbal, visual or oral, simultaneously. On the other
hand, we are not limited by the spatio-temporal extension of the text nor by the traditional relationship between
writer and reader. The navigation that hypertext allows offers the possibility of infinite and indefinite movement
on the text, that is, moving forward and backward as many times as we want, without the need for precise
orientation.
To program various digital stories we will have to consider various aspects. On the one hand, verify that
the product that the reader receives in the form of a story is credible and friendly. It can also be used to link

MARIANO AJALOS ALFAOMEGA


80 Programming Strategies and Structures

various digital applications, for example, providing the possibility of accessing videos published on YouTube
through QR codes. On the other hand, it serves as a representation of a navigable space that promotes
continuous exploration of the text or the use of multimedia applications that interact with readers. Finally, the
structure of the narrative must be organized in such a way as to guarantee high reader participation, either as
an explorer of the text or by considering the user in the design of the narrative proposal.
In terms of design, it is important to note that narrative hypermedia raises the need for an analysis
methodology capable of addressing the incorporation of two new components. The first relates to the study of
both the surface design and the interface of hypermedia. The surface refers to the part visible to the user, that
is, the screens, and includes aspects such as typography, use of graphics, quality of language and user
reactions. Secondly, certain aspects must be considered, such as instructions and navigation aids, conceptual
maps, indexes, search engines, that is, those technological devices that allow the user to access the different
levels of hypermedia.
A reading of the aesthetics of narrative hypermedia involves considering three characteristics: immersion,
performance and transformation. Immersion refers to the experience of being in a highly elaborate fictional
place. For example, in literature or in cinema, because it is typical of the narrative that takes us to immerse
ourselves in a “virtual reality.” Undoubtedly, the possibilities offered by hypermedia for user participation will
greatly impact the immersion experience, stimulating action, which is achieved through the interaction of
fictional characters, which will transform the reality of the participating users. The incorporation of all these
hypermedia resources means the transformation of the narrative and the participating users.
A reading of the aesthetics of narrative hypermedia involves considering three characteristics: immersion,
performance and transformation. Immersion refers to the experience of being in a highly elaborate fictional
place. For example, in literature or in cinema, because it is typical of the narrative that takes us to immerse
ourselves in a “virtual reality.” Undoubtedly, the possibilities that hypermedia offers for user participation will
greatly impact the immersion experience.

Programming applied to robotics

In the 21st century, robotics has begun to transform human life, not only in the industrial field, but also in all
kinds of daily tasks, making human life easier and making tasks that were previously performed without the
help of robots more efficient.
Robotics refers to the area that encompasses the construction of autonomous devices that act in the real
world, in such a way that they develop a specific task. This means that robots can learn about the environment
around them, using sensors of different types, and based on the information acquired by the sensors from the
environment around them, they can modify their path or simply move to avoid obstacles.
Thus, it is possible to define a robot as a versatile mechanical device, equipped with sensors and
actuators, and controlled by a computational system that extracts information from the environment to act
through movements. Robotics, then, encompasses three areas: mechanics, electronics and computing. And in
the specific case of computing, other areas are deployed that are also part of the domain of robotics: artificial
intelligence, computer networks, digital image processing, data structure, operating systems, among others.
Currently, we can find two examples of work with educational robotics projects. On the one hand, the S4A
project, adapting the Scratch application to work with the Arduino board. More information on how to install this
package can be found on the Internet (http://s4a.cat/index_es.html). On the other hand, the Enchanting project,
a proposal to adapt Scratch with Lego kits. Additional information and downloads are available on the Internet
(http://enchanting.robotclub.ab.ca/tiki-index.php).

Programming applied to art (artistic-digital developments applying programming


principles and strategies)

ALFAOMEGA Mariano Avalos


Information Technology 1 81

In the link between art and programming, we can also incorporate the use of the free hardware board Arduino,
which works with basic notions of electricity and electronics. On the Internet, there is a variety of proposals and
projects for free software and hardware, as well as for circuit interpretation and data sheets for electronic
components (http://masterefimeras.com/arte-arduino). There, students will be able to interact and program with
sensors, sources, motors or drivers that can be used in the development of different artistic projects.

65 Activity 1
Final integrative project

Students must form teams. They will then have to choose a proposal for integration or social service (an
ecological solution, road safety, inclusion). In this project, they will present and implement the programming
concepts studied in this subject.

The objective will be the design and implementation of a simple game where various characters and/or objects
interact. For example: if the chosen theme is recyclable and non-recyclable waste, the division of garbage, the
assignment of different scores, time, etc. must be taken into account. Throughout the game, actions will be
included where the characters and/or objects move through different keys. It would be advisable to also
incorporate the use of variables.

Summary

During this chapter we have covered the fundamentals of programming. On the one hand, we have analyzed,
in addition to the actions that combine repetitive programming structures (indefinite, conditioned, defined), the
conditional actions (logical and boolean operations). On the other hand, we have explained in detail each of the
qualities of structured programming: medullarity, reusability and readability.
Within this context, we have delved into the main features of the free programming language, for personal
and commercial use, Scratch. This tool helps in the development of the entire creative process, because it
offers the option of customizing everything from objects or characters to the setting. Furthermore, it allows,
among other things, not only the creation of algorithms for the movements of objects or the interaction between
them, but also learning the idea of time in the execution of a program.
We also remember the aspects that every programming language must take into account when
generating a good program of lines of code: easy reading, simplicity, flexibility, easy maintenance, functionality.
And finally, we have reviewed the basic theoretical principles to program and control robots with motors,
sensors and actuators; develop video games and create animations; and generate artistic-digital projects
applying programming principles and strategies.

MARIANO AJALOS ALFAOMEGA


82 Programming Strategies and Structures

Questions

1- What are the characteristics of structured programming?

2- What aspects must be taken into consideration when developing any programming language?

3- Details the main characteristics of object-oriented programming

ALFAOMEGA Mariano Avalos


Information Technology 1 83

4- What are the main commands of the Scratch application?

5- What aspects should we consider when creating a digital story?

MARIANO AJALOS ALFAOMEGA


Information
technologies
Mariano Avalos

Written by a teacher of the subject Information Technology 1, at the New Secondary School of the Autonomous City
of Buenos Aires, the work covers the contents of the subject in a didactic way.

The main topics covered are:

• Structure and operation of digital information systems


• The functions of hardware and software
• Introduction to computational thinking
• Computational problem solving
• Programming Strategies and Structures

“It brings you closer to knowledge”


Untafresco' Alfaomega Publishing Group

You might also like