Computer Programming - Introduction to Computer Programs - Lanka Learning

Latest

Lanka Learning

Education For Everyone..

Monday, June 10, 2019

Computer Programming - Introduction to Computer Programs

Introduction to Computer Programs


Related image



Before getting into computer programming, let us first understand computer programs and what they
do.

 A computer program is a sequence of instructions written using a 
    Programming Language to  perform a specified task  by the 
computer.
     
    The two important terms that we have used in the above definition are −
·         Sequence of instructions
·         Computer Programming Language
    
    To understand these terms, consider a situation when someone asks
    you about how to go to a nearby Food City. What exactly do you  
       do to tell him the way to go to Food City?                                                              
      You will use Human Language to tell the way to go to Food
City, something as follows 👀 
   First go straight, after half kilometer, take left from the red light and then drive around one kilometer and you will find Food City at the right.
      Here, you have used English Language to give several steps to be
      taken to reach Food City. If they are followed in the following
       sequence, then you will reach Food City ✔
1.            Go straight
2.            Drive half kilometer
3.            Take left
4.            Drive around one kilometer
5.            Search for Food City at your right side  
    
          Now, try to map the situation with a computer program. The above
      sequence of instructions is actually a Human Program written in
      English Language, which instructs on how to reach Food City from 
       a given starting point. This same sequence could have been given in
       Spanish, Hindi, Arabic, or any other human language, provided the
       person seeking direction knows any of these languages.
          Now, let's go back and try to understand a computer program,
      which is a sequence of instructions written in a  Computer 
      Language to perform a specified task by the computer. 
      
    Following is a simple program written in Python programming 
    Language --
print "Hello, World!"
   
         The above computer program instructs the computer to print 
     "Hello, World!" on the computer screen.
·         A computer program is also called a computer software, which can range from two lines to millions of lines of instructions.
·         Computer program instructions are also called program source code and computer programming is also called program coding.
·         A computer without a computer program is just a dump box; it is programs that make computers active.
        As we have developed so many languages to communicate among
    ourselves, computer scientists have developed several computer 
    programming languages to provide instructions to the computer 
    (i.e., to write computer programs). 

         We will learn several computer programming languages in the subsequent chapters. 😃

No comments:

Post a Comment