Download presentation
Presentation is loading. Please wait.
Published byMadeleine Hillary Mills Modified over 9 years ago
1
C OMPUTER P ROGRAMMING 1 Introduction to Programming
2
W HAT IS P ROGRAMMING ? Programming involves: solving problems expressing solutions in a computer language in the form of programs translating programs into machine language executing and testing the programs
3
W HAT IS P ROGRAMMING ? Every computer program solves a particular problem. In programming, you solve the problem, not the computer. You give the computer instructions in the form of a program, telling it what to do and how to do it. The computer follows these instructions exactly. The program is set of instructions required to solve the problem. It is also the solution to the problem, because when the computer follows these instructions it will produce the “answer”
4
W HAT IS P ROGRAMMING ? The term algorithm is also used to describe the set of steps that solve a problem. An algorithm may be expressed in English or in a formal computer language, whereas a computer program must be expressed in a programming language. Algorithms are the solution, a program is an implementation of the algorithm in a specific programming language.
5
W HAT IS P ROGRAMMING ? We should, solve problems independently of any programming language. Only when we have solved a problem should we consider the programming language. Beginners find this hard to understand, but it is worth repeating that: we do not need a programming language to solve problems. Of course, when it comes to actually implementing our solution and testing it, then we must use a programming language. We distinguish two phases in programming: the problem solving phase ( analysis phase, design phase), and the implementation phase.
6
P ROGRAMMING AND M ISTAKES We make mistakes ! For example we may give incorrect instructions In these cases, the computer program will not produce the “ right answer”. It is still solving a problem, just not the problem we wanted to solve. For this reason it is important to thoroughly check that your programs do indeed solve the problem you intended. It is important to note that this testing does not prove that programs are correct, simply that they are correct for the tests used.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.