Wednesday, November 21, 2007

Chapter 1, Lesson 1

Welcome to Beginners Programming.

First thing’s first, English is not my native language so please excuse me for my bad English.

There are two main ways to write a computer program, Graphically, by using flowcharts and by using computer programming languages, such as BASIC, C/C++, Pascal, C#, Java, etc..


But let us learn the basics of programming. The first thing you have to know is how did computer programming came into being. It all started with algorithm. Algorithm [al-guh-rith-uhm] (n.) It is a step by step instructions to solving a given task. One good example is the recipe.

Recipe for Making a Coffee

  1. Get the Coffee Jar
  2. Scoop a bit of coffee into coffee cup.
  3. Scoop a bit of sugar into coffee cup.
  4. Pour hot water into coffee cup
  5. Stir as desired
  6. Drink the coffee when ready.

We have been using algorithms all our life and we have not notice it. Like how to tie your shoe laces. When you buy your first microwave oven, or a gadget, you read the instructions on how to operate, and there you will see a series of steps (algorithm)

The algorithm is then converted to a graphic representation, using symbols interconnected with flow lines, of the successive steps in a procedure or system. It is called Flowchart.

Basic flowchart symbols

Lets do a little exercise.

Problem: Given the 3 quiz grades of the student, Quiz1: 80, Quiz2:82, Quiz3:78. Write and algorithm and draw a flowchart that would compute for the average grade and display your answer.

Algorithm:

  1. let x1 = 80, x2 = 82, x3 = 78
  2. let sum = x1 + x2 + x3
  3. let average = sum / 3
  4. display the average

Flowchart:

Another example using Perl program.

graph         { flow: south; }
node.start    { shape: rounded; fill: #ffbfc9; }
node.question { shape: diamond; fill: #ffff8a; }
node.action   { shape: rounded; fill: #8bef91; }
 
[ Lamp doesn't work ] { class: start }
  --> [ Lamp\n plugged in? ] { class: question; }
   -- No --> [ Plug in lamp ] { class: action; }
 
[ Lamp\n plugged in? ]
  --> [ Bulb\n burned out? ] { class: question; }
   -- Yes --> [ Replace bulb ] { class: action; }
 
[ Bulb\n burned out? ]
  -- No --> [ Buy new lamp ] { class: action; }

Wikipedia – Flowchart http://en.wikipedia.org/wiki/Flowchart

On the left side is the Perl Code or program in which just a series of text instructions (algorithm) to be executed. And on the right side is the graphical representation (flowchart).

As you can see, the program or series of instructions is clearly understood using graphical flowchart.

By the way, I would also inform you that the language we will be using is the C Language. And i would assume that you have a little knowledge in C Syntax. You can search the net for C Syntax.

In our next lesson, we will have simple problems, flowchart making and Create a C program translated from flowchart. If you learn this simple steps , you can create programs using any programming language you want. At Beginners Programming, we will be your guide.

-End of lesson 1 Beginners Programming

34 comments:

Blank said...

jfghj fgdgjkh test jhjkh hjkh

ShermanBryan said...

Semestinya main judi online ini masih mesti https://ultiqq.com/ menyaksikan saat yg sesuai buat bermain.

CynthiaDewi said...

Mengontrol dan menempatkan saat yg https://sahqq.com pas pada main judi online.

Nicholas Rico said...

Terhadap kalian yg mau main judi online bersama https://atomqq.com ketika gaduh itu di celah pukul 11.00 – 14.00 wib.

ewasalioa lokijsada said...

Pilih saat senggang ialah carayang teramat keren dan https://angka99.net serasi biar dapat lebih bersemedi pada bermain.

Ethan Tang said...

Dgn kamu main bersama menyaksikan disaat http://pelangikita.cc yg pas seperti saat.

Jacob Langer said...

Namun lagi tidak sedikit yg https://masterdominoq.co tak tahu pilih kala yg tepat.

resakila lokamisa said...

Ketika yg pas dan gelumat https://ahli99.co terhadap main permainan.

Carter Rawls said...

Kepada kalian yg mau main-main judi online dgn http://pelangi99.cc ketika heboh itu di celah pukul 11.00 – 14.00 wib.

Вадимир Виноходов said...

Sepanjang hri tidak dengan ingat situs judi terbaik disaat yg serasi guna bermain.

Aiden Mckenna said...

Seharusnya main-main judi online ini pula mesti http://mandiri99.me menyaksikan disaat yg serasi bagi bermain.

Illarion Akimenko said...

Namun kembali tidak sedikit yg tak https://murah99.net tahu pilih diwaktu yg tepat.

Unknown said...

Sebab terhadap tengah hari hri https://mdominoqq.biz yakni ketika yg tepat bagi.

Unknown said...

Sejamaknya kalau mau main permainan judi http://sahabat99.cc online yg seru dan tidak sedikit pemain itu ada dikala tersendiri.

CynthiaDewi said...

Main-main di jam 11.00 - 14.00 wib https://asik99.co
lantaran juga gempar pemain.

Kevin Fife said...

Permainan bandarq online http://pasarqq.co adalah salah satu permainan.

Chrity Rosen said...

Mencari meja yang http://memberqq.me memiliki banyak pemain.

Jackson Paredes said...

Kita main di room yg tidak http://rajawali99.cc sedikit pemainnya.

Anonymous said...

Rumus nya merupakan bersama http://bandarjud1qq.com menjumblahkan 2 card yang.

Злата Гостенов said...

Guna pertama permainan kita dapat http://raja99.cc di memberi saat buat menyimpan taruhan.

Мирослава Лобков said...

Permainan bandarq online http://ratu99.me merupakan salah satu permainan.

Unknown said...

Terlebih hri makin tidak sedikit yg indo99.cc menyukai permainan ini.

Michael Wortham said...

Makin jumblah pecinta bandarq ini http://www.mdomino99.cc telah sanggup mengimbangi pecinta domino99 dan poker.

ChristopherRainey said...

Pastikan kamu main di web judi online asikqiu.co yg terpercaya dan aman agar.

Велизар Крымов said...

Dan perihal termuat bisa http://masterdominoqq.cc memberai-berai permainan kita.

PhillipMorgan said...

Lantaran apabila di lanjutkan di meja termasuk malah http://campionqq.me dapat menghasilkan kesengsaraan buat kita sendiri.

Thomas Cordes said...

Permainan bandarq ini masih mampu di mainkan qqahli.net oleh maksimal 8 orang permain dalam 1 meja permainan.

James Stamm said...

Lantaran maksud penting jadi seseorang bandar website murahqq adalah membawa laba bersumber kekalahan pemain lain.

James Perez said...

Di bantu terselip pada daftar jadiqq mejadi 1 sila tertinggi.

Russell Saldivar said...

Di menentukan di meja yg kamu memilih buat situs ikanqq mejadi bandar di meja tersebut.

LeonardAllen said...

Rumus nya yakni dgn menjumblahkan 2 janjiqiu.com card yang.

ChristopherRainey said...

Judi online yg terpercaya dan aman agar https://asikqiu.co pastikan kamu main di web.

Thomas Cordes said...

Di mainkan oleh maksimal 8 http://qqahli.net orang permain dalam 1 meja permainan permainan bandarq ini masih mampu.

LeonardAllen said...

Yakni dgn menjumblahkan 2 http://janjiqiu.com card yang rumus nya.