What is a Programming ?
A programe is a sequence of instruction that specifies how to perform a
computation.This computation might be somthing mathematical, such as
adding two numbers or solving a equation or finding the root of a number but
it can aso symbolic computation, such as searching and replacing text in
a document or compiling a program.
The details look different in different language, but a few
basic instructions appear in just about every programming language.
Basic instructions-
Input:
Get data from the keyboard, a file or some other device.
Output:
Display data on the screen or send data to a file or other devices.
Math:
Perform basic mathematical operatios like addition, subtraction,etc
Condition:
Check for certain conditions and cxecute condition and execute
the appropriate code.
Repetition:
Perform some action repeatedly, usually with some variation.
Believe it or not,Every program you have ever used, no matter how
complicated, is made up of instructions that lok pretty
much like these. so you can think of programming as the process of breaking
a large, complex task into smaller and smaller
subtasks untill when the subtasks are simple enough to be performed with one
of these basic instructions.
What is Debugging?
Programming error are called Bugs and the process of tracking them down is
called Debugging.
Three types of errors can occur in a program : syntax error, runtime
error, and semantic error.
1. Syntax errors
Python can only execute a program if the syntax is correct; otherwise, the
interpreter display an error message.If there is a single error
anywhere in your program, python will display an error message and quit,
and you will not able to run your program.
2. Runtime error
The second error is a runtime error , so called because the error does not
appear untill after the program has started running. These error are also
called exception because they usally indicate that something
exceptional(bad) has happened.
3. Semantic error
if there is a semantic error in your program, it will run successfully in
the sense that the computer will not generate any error message, but it
will not do the right thing.It will do something else.
Formal and Natural Languages
Natural languages are the languages people speak, such as
English,French,Spanish,Turkish and Hindi.They were not designed by people
they evolved naturally.
Formal languages are languages that are designed by people for
specific applications. For example, the notation that mathematicians use is
a formal language that is particularly good at denoting relationships among
numbers and symbols.chemists ue a formal language to represent the chemical
structure of molecules.And most importantly:
Programming languages are the formal languages that have been
desinged to express computations.
THANK YOU
0 Comments