Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Programming Techniques - Python

• Use of problem solving process

• Use algorithmic approach to solve problems

• Compares and contrast different programming paradigms

• Uses data structure in program

• Manage data in database

ALPINE SKI HOUSE 1


Computer programming

• Computer Programming is defined as the process of creating computer software


using a programming Language. Computer programs are written by Human
individuals(Programmers)
• A computer program is a step by step set of instructions that a computer has to
work through in a logical sequence in order to carry out a particular task. The
computer executes these instructions (obeys the instructions) when told to do so
by the user.

ALPINE SKI HOUSE 2


Programming Languages

• A programming language is an artificial language that can be used to control the


behavior of a machine, particularly a computer. Programming languages, like
human languages, are defined through the use of syntactic and semantic rules, to
determine structure and meaning respectively.

ALPINE SKI HOUSE 3


Syntax

• Syntax is the set of rules that define what the various combinations of symbols
mean. This tells the computer how to read the code. Syntax refers to a concept in
writing code dealing with a very specific set of words and a very specific order to
those words when we give the computer instructions.

if 5 > 2: thislist = ["apple", "banana", "cherry"]


print("Five is greater than two!") print(thislist)
if 2 > 5:
print(“Two is greater than five!")

ALPINE SKI HOUSE 4


Levels of programming languages

• Machine Language
• Assembly Language
• High level Language

ALPINE SKI HOUSE 5


Machine Language

• The fundamental language of the computer’s processor, also called Low Level Language.
• All programs are converted into machine language before they can be executed.
• Consists of combination of 0’s and 1’s that represent high and low electrical voltage.
• Fastest to execute because it is already in the language that the computer can understand
• It is difficult to identify mistakes made Time-consuming and tedious to write Machine
dependent
• Programing becomes more difficult as the complexity of the program increases

ALPINE SKI HOUSE 6


Assembly Language

• A low level language that is similar to machine language (machine dependent).


• Uses symbolic operation code to represent the machine operation code.
• Faster and more efficient in the use of hardware than high-level programming
languages.
• Easier to write than machine language
• The code is not very easy to understand, hence the introduction of high level
programming languages.

ALPINE SKI HOUSE 7


High Level Language

• Computer (programming) languages that are easier to learn.


• Uses English like statements.
• Examples are C ++, Visual Basic, Pascal, Fortran and …....
• They are machine independent hence portable
• They are user friendly and easy to learn
• High-level language programs are easy to debug
• They are executed much slower than low-level programming languages

ALPINE SKI HOUSE 8


Repetition (Loop)

ALPINE SKI HOUSE 9


Flowchart Structures

pseudo-code for a simple program that calculates the total amount payable when
you include the hourly and hourly rate

Begin
input hours
input rate
pay=hours*rate
print pay
End

ALPINE SKI HOUSE 10


Software Development Life Cycle (SDLC)

ALPINE SKI HOUSE 11


Software Development Life Cycle (SDLC)

• The Software Development Life Cycle (SDLC) is a structured process that enables
the production of high-quality, low-cost software, in the shortest possible
production time.
• The goal of the SDLC is to produce superior software that meets and exceeds all
customer expectations and demands.
• It consists of a detailed plan describing how to develop, maintain, replace and alter
or enhance specific software. The life cycle defines a methodology for improving
the quality of software and the overall development process.

ALPINE SKI HOUSE 12

You might also like