Programming


01. Why should I know programming?




Programming simply means giving commands to a computer.

The original programming derives from one of Hilbert's 1928 problems,

'Is there a general mechanical procedure that can solve all mathematics

problems in order?' It is said that the Turing Machine problem-solving

order and procedure presented by the mathematician Alan Turing who 

solved this problem was the beginning of'programming'.


That is, programming originated from math problems, and algorithms,

which are various knowledge and problem solving procedures or 

methods, are used to solve programming. Programming requires analyzing

and understanding problems, creating logical procedures, reviewing and

debugging for computer language.


Then, why should you study the content and method of programming?

Some people are curious about the language of computers and want to create

something themselves, but others may think that I have nothing to do with 

the developer who makes the programming. Learning programming is not 

only for becoming a software developer, but also for improving computing 

thinking, which is one of the main reasons for learning programming.

Understanding and applying programming nurtures various thinking 

and problem solving skills in mathematical and logical application, and 

helps to apply new methods to a given problem situation in real life. In addition,

you will be able to deeply understand programming that is gradually applied to 

various social fields.

02. What kind of learning activities do you do?

First of all, in the first unit, we will examine the basic understanding of 

programming, how to make software, how computers work with software, 

and the types of programming languages. You will be able to learn the basic 

contents of programming by knowing the reality of programming that has 

already entered our society. You can also know the necessity of programming

 and have a direction for learning programming. In addition, it introduces Python,

 one of the programming languages. Python is an open program that has simple 

grammar and is distributed free of charge. It is a language that anyone can use.

It is a language that many people use in various fields by providing various libraries.

You will be able to see what characteristics of the language we will learn together.


From the next section, I will introduce Python's development environment construction

 and basic usage of programming languages. For visually impaired students, the

 premise to use a screen reader, followed the installation process centering on 

the tab key and shortcut keys, and was configured to understand the basic functions.


And I want to learn how to use the code editor to use Python. Since Python is also

 a kind of document, it needs a text editor that can input, edit and save code 

like'Hancom Office' or'MS Word'. As a document editing program, a method

 of using 

IDLE, a method of using a notepad, and a method of using Visual Studio,

 an intelligence development tool, were presented respectively, and guided to 

select a coding method suitable for the student's characteristics. In addition, you 

will be able to learn the basic method of writing Python code through problems 

encountered while using each method and solutions accordingly.


1. Learn Computer Programming

Computers play a very important role in our daily lives, and we live with them every day.

 If you think about it easily, you can only think of laptops and desktop computers,

 but tablets and smartphones are all types of computers. In addition, computer systems

 are all installed in refrigerators, rice cookers, game consoles, traffic lights and automobiles

 that can be seen on the street.

Computers are electronic devices that process information. Although the appearance varies

 depending on the type, computers are largely composed of two parts:'hardware' that 

can be touched and'software' that cannot be touched. Most computers cannot think of 

themselves or run programs, so they absolutely need software that gives them instructions.

 All of the automated machines around us like this have something in common.

 The point is that it performs tasks according to the instructions of the software 

built into the machine. Software that is executed according to commands is called a program.

These days, KakaoTalk and Facebook, which we use a lot on a daily basis, are all one 

program. In addition, these programs are used in various ways in life, such as games,

 music playback, Internet shopping, and smart TV.

In the future, software will play an even more important role in all societies in general.

 The era in which software needs to be well understood and used in various fields is approaching.

OneWhat is programming?

Programming refers to the work of creating a program. A program is a collection of 

instructions that are given to a computer. These programs come together to become software.

 In other words, programming is the process of making software, and the tool used to make 

such software is called'Programming Language'. Just as we have Korean and Americans have

 English, we use the computer language of'programming language' for computers.

Most programming languages ​​consist of a collection of alphabets, numbers, symbols or 

punctuation marks. When a command is entered, the computer's hardware is 

converted into an understandable sequence of 0s and 1s, but it is made into a programming language

 that is easy for humans to understand. Such letters or numbers are called codes. 

So, in the 

sense of writing code, programming is called coding.
One)


1) EBS (2016). Hello EBS software. Seoul: EBS Korea Education Broadcasting Corporation.

2What can you do with programming?

end. Programming to increase problem solving

It is said that Microsoft's Bill Gates, who is indispensable in the history of the modern 

IT field, Mark Zuckerberg, who created Facebook, and Larry Page, who founded Google, 

all started programming from an early age. The thing to think about is that the managers 

of this big company have never taken business classes. The CEO of a company is a position 

that requires a variety of business skills. A lot of effort is made to develop these skills. But 

how did they succeed in creating a large company without even taking business classes?

 Their commonality lies in programming. People think that programming has influenced 

the abilities of these CEOs. There are a number of reasons, but it's because programming 

improves your logical reasoning skills. Several studies have shown that computer programming

 helps us improve our logical reasoning ability.

In addition, when we try to solve a problem with a programming language, we simplify

 the problem through abstraction to make it in a form that is easy to solve, and design an 

algorithm according to procedures and methods. When the designed algorithm is 

expressed in a programming language, the computer can interpret the language 

and solve it automatically. Programming like this improves logical thinking, planning and 

analysis skills, and problem solving skills.

I. Turn ideas into reality

Even if you have a good idea, it's useless if you can't find a tool or a way to make it happen.

 If you can program, you can implement simulations of your ideas, review them, and share

 opinions with others. Code is a great stuff to turn our ideas into reality. For example, in the past,

 you had to wait at the bus stop because you didn't know the bus arrival time, but nowadays, 

you can check the bus arrival time anywhere and move to the bus stop according to the 

arrival time by receiving the location of the bus. Many people feel uncomfortable in their 

daily lives, and by creating software that collects and delivers bus information and traffic 

information, many people can live a convenient life.

In other words, programming is a creative activity that allows you to express your thoughts.

 Programmers sometimes develop software that people can use conveniently, solve various 

problems, and create and provide game software, computer graphics, and websites.

All. Programming Anyone Can Do

In the early days when computers first appeared, only scientists and technicians could use them.

 However, as programming languages ​​were created to make computers easier to manipulate,

 in recent years, even elementary school students and non-majors can easily learn 

programming languages. In countries around the world that have become aware of the infinite 

possibilities of programming, both men and women, young and old, participate in various 

educational courses to learn programming.

Programming is not just done by developers, anyone can do it if they are interested.

3How to make software?

Suppose we are building a house. Plan to build a house, make a blueprint, and build 

a house using materials. And after all the houses are built, they check to see if they are built 

properly. If a problem is found, it will be repaired again.

The same goes for software. Think of a way to solve the problem in front of a problem situation

 and write code that expresses it. Prepare what materials to use, in what order, and in what 

way. And express this in a programming language. When programming is finished, we test 

and debug anything wrong.

Since machines cannot think as flexible as humans, they must give commands accurately and 

logically. We need to think like a computer in the language of the computer if we want to give

 it the proper commands. The ability to think in this way is called'computing thinking ability'.

 Computing thinking ability refers to the ability to think efficiently to solve problems based

 on the basic concepts and principles of computing. In other words, understanding the way

 computers solve problems and applying them to real-world problem solving is computational thinking.

4How can a computer run with software? 2)

Today's computers differ in appearance, size, and performance, but the basic structure is 

almost the same. It follows the structure of the computer described in the paper'EDVAC' 

published by the genius scientist John von Neumann in 1945. In this paper, Von Neumann 

first defined the structure of a modern computer consisting of an input/output device 

that receives and exports data from the outside, a memory device that stores data and commands,

 and a central processing unit in charge of processing data. . Such a computer that embeds 

instructions in the memory device is called a program-embedded computer. Computers 

with built-in programs were introduced in von Neumann's thesis, so they became known 

as the von Neumann structure.

Let's compare the von Neumann architecture with the computer we are using. Keyboard

 and mouse are input devices, monitor and printer are output devices. The Intel i7 quad-core

 chip is the central processing unit, and the DDR3 DRAM is the storage unit. Tablets and 

smartphones also follow this structure.

image.  Structure of the central processing unit.  The control unit and arithmetic logic unit of the central processing unit exchange data with the storage unit, and the central processing unit also exchanges data with an external arithmetic unit.

2) Park Sang-hyun (2016). Python that stimulates the brain 3. Seoul: Hanbit Media.

end. Central processing unit

The central processing unit, or CPU, is the most important device in a computer.

 All computations performed by computers are done by the CPU. There are two main

 types of CPU. It is an arithmetic and logic device that performs arithmetic operations

 such as addition, subtraction, multiplication, and division, and logical operations 

dealing with true and false, and a control device that fetches or decodes a given instruction,

 transfers data, or directs execution details.

The control device and arithmetic logic device repeat the following process.

1. First, the control unit fetches commands from memory.

2. The control device decodes the imported command.

3. The control device transfers data to the arithmetic logic device according to the decoded instruction and instructs what operation to perform.

4. The arithmetic logic device performs calculations as directed by the control device.

5. Then, the result is saved back to the memory device.

image.  Structure diagram of control device and arithmetic logic device.  1. The control device fetches commands from the memory device.  2. The control device decodes the imported command.  3. The control device transmits data to the arithmetic logic device and instructs the operation to be performed.  4. The arithmetic logic device performs the calculations indicated by the control device.  5. Save the result to the memory device.

I. Memory

The storage device serves to store commands along with data. The larger the memory capacity,

 the more data and instructions can be stored, and the faster the memory operates, the faster the CPU

 can exchange data and instructions. The computer's memory is organized into three layers.

There is the cache memory closest to the CPU, and below the cache memory is the main memory,

 usually made up of RAM. And there is an auxiliary memory device that is farthest from the CPU.

 Hard disks were the most popular auxiliary memory devices, but as memory technology advances,

 flash memory and SSD are often used as auxiliary storage devices.

All. Input/output device

Input/output devices are the way computers communicate with the outside world. Starting with a

 keyboard or mouse, touch screens, microphones, game pads, and motion recognition devices 

are all used as input devices. Also, monitors, printers, speakers, and beam projectors are 

all output devices. These input/output devices exchange information with a central processing 

unit and a memory device through an input/output bus (I/O BUS: information transmission 

circuit of a computer).

5What are some programming languages?

In the world we live in, there are various languages ​​such as Korean, English, and Chinese.

 We use these different languages ​​to communicate and live with people from other countries.

 That is, language serves as a medium connecting various cultures. So, how do you talk to your

 computer or give orders? That is, we need languages ​​that humans and computers can communicate

 and understand. That is the programming language. Working in a programming language is like 

learning a foreign language. There are many kinds of these programming languages. 

Programming languages ​​are divided in various ways depending on the stage of development

 or execution method, and there are machine language with binary numbers of 0 and 1, assembly

 language that uses characters instead of binary numbers, Python, C, and Java.

Assembly language is the conversion of complex machine language instructions into symbols

 or words that humans can understand. For example, a machine instruction such as '01001100 

00001000 10000001 10010000' is expressed as'MOV' in assembly language. Of course, computers

 don't understand'MOV' right away. This is because the computer only understands 0s and 1s.

 So, this assembly language is translated into a computer understandable through a translation

 process called compilation. The programmer writes the code in assembly language and then

 executes it with a'compiler'. This executable file is a program. On the other hand, the interpreter

 interprets and executes machine language in real time. The interpreter method is faster 

than the compilation method because it can be executed immediately if an error is

 found and corrected. Python, which we will now study, is also an interpreter-style programming 

language.

6Discover Python

image.  Python logo

Python is a programming language released by Guido van Rossum in 1991. It is said that the

 lab was closed on the week of Christmas in 1989 and started making it in a bored car. The 

name of Python was taken from the British comedy group'Monty Python's Flying Circus', 

which was aired on BBC TV at the time, and the logo was made with the motif of'python',

 which means the English word Python.

end. Advantages of Python

1) Simple grammar and easy to learn.

First of all, the grammar is simple. Well-known programming languages ​​such as C language

 often feel difficult due to complex grammar. However, because Python has a simple grammar,

 it can be easily used by ordinary people as well as experts. While it is easy to use, it has 

strengths in numerical processing such as being able to handle infinite integers as long as 

memory allows, and it is more productive than other languages, and its ability to combine

 with codes written in other languages ​​is excellent, so it is widely used in various specialized

 fields. Are doing.


2) It is open source and provides various libraries.

Since Python is open source, anyone can download and use it for free. In addition, programs 

made in other languages ​​can be included in Python programs, providing various and

 powerful libraries. Python itself is very productive, but with the help of other libraries,

 you can significantly reduce coding time.


3) Since many people use it, it can be used in a wide variety of fields.

It can be used in various fields such as web server, IOT, machine learning and deep 

learning, and applications.


4) It can be used in the same way in most operating systems (Windows, Mac, Linux).

For other programming languages, the operating system is often limited. And even if it 

can be used in several operating systems, the usage method may be slightly different. However,

 Python can be used in the same way on all operating systems.

I. Disadvantages of Python

1) The speed is slow.

Python is about 10 to 350 times slower compared to the popular C language. Most programming

 languages ​​are inversely proportional to the features of'easy to use' and'fast'. Python is slow instead

 of easy to use, and C language is fast instead of difficult. Therefore, it is difficult to create an 

operating system such as DOS or Linux with Python, a program that requires a large number of 

repetitions and operations, or a data compression algorithm development program. In other words,

 it is not suitable for programs that require direct control of high speed or hardware. However,

 recently, computer performance has improved, so you cannot feel the difference in speed unless

 a program that requires a lot of computations such as games.


2) Mobile programming is difficult.

Python is Google's favorite language, but it is still difficult to develop Android apps with Python.

 Android supports Python programs to run, but it is still not enough to make apps with this alone.

 IPhone app development is also not appropriate for Python.

All. Code editor

Since Python code is also a kind of document, you need a text editor that can enter, edit, and save code like'Hancom Office' or'MS Word'. Document editing programs that can edit code include IDLE, a program that is installed by default when Python is installed,'Notepad','VI Editor(Linux)','Sublime Text Atom', and'PyCharm (Pyseon-dedicated development tool). There are various types such as','Visual Studio Code', etc. These can be selected according to the user's convenience. 

Post a Comment

0 Comments