Please enable JavaScript.
Coggle requires JavaScript to display documents.
getting started with python and problem solving - Coggle Diagram
getting started with python and problem solving
problem solving
algorithim
an algorithim is a
list of steps
to be executed with the right order in which these steps should be executed
each operation must be definite
each operation must be effective
each operation must be finite
it must be clearly defined what should be done
each steps must be done using pencil and paper in the finite amount of time
the algorithim should terminate after finite number of operations
precision
-the steps are precisely stated or defined
uniqueness
-results of each stepare uniquely defined and only depend on the input and the result of the preceeding steps
finitness
-the algorithim always stops after a finite number of steps
input
- the algorithim recives some input
output
-the algorithim produces some output
flowchart: it is a graph used to depict or show a step by step solution using symbols which represent a task
disvantages
a lenthyly flowchart may extend over multiple pages which reduces readability
drawing a flowchart is time consuming
advantages
it helps in analyzing the problems effectively
it acts as a guide during the development phase
it help easy debugging of logical errors
steps for problem solving
2.developing an algorithim
an algorithim is a logical step-by-step process for solving a problem
think of all possible solutions
follow modular approach-breaking down into simple steps
algorithims are normally written as flowcharts or in pseudocode
3.coding
its a technical term used for writing a program
it is the process of
transforming design
(algorithim, pseudocode ,flow chart) in a computer program using any programming language
think about efficiency of solution in terms od speed, performance and effectiveness
analyzing the problem
1)understanding the problem
2)inputs to the problem
3)outputs expected from the problem
4)special constrains or conditions
5)formulas or equations to be used
4.testing and debugging
testing
is the process of finding errors in the program
debugging
is the process of correcting errors in the program
it involves
finding errors and rectifying them
introduction:
solving a problem on a computer require steps similar to those followed when solving the problem manually
a computer programe sequence of instructions in a language that is understood by a computer
decomposition: the process of breaking down a complex problem into a set of smaller sub parts to understand or execute the problem in a better way
disadvantages
the solution to subprogram might not combine to solve the original problem
poorly understood problemsare hard to decompose
advantages
different people can work on different subprograms
parellization may be possible
maintenance is easier
python absolute basic
It was developed by guido van rossum in 1991
features of python
free open source portable language
it takes less time to develop python programs
loosly typed object oreinted programming
it is extensible/extendable and highly efficient
python is interpreted , interactive , directly executed
it supports GUI and garbage collection
it is easily compaitable with other languages like c++
it is used for both scientific and non scientific programming
advantages of python
GUI programming
ample availability of libraries
less learning time
syntax hilighting
higher productivity
objec-oreinted programming languages
readability
platform independent
limitations of python
memory consumption
database access
mobile development
runtime errors
speed
pseudocode
it is a
formal way of writing the program logic whereas
algorithim is an informal way of writing program logic
there is no strict set of standard notations for pseudocode, but we use the following: input, display, if/ else, repeat, start, end
START
2.INPUT A,B
3.TATAL= A+B
4.PRINT TOTAL
5.END