LESSON 4 PROGRAMMING

advertisement
LESSON 4 PROGRAMMING
1. What is Programming? includes the way of the program.
Programming is creating a set of instructions for a computer to perform a specific task.
Programming can be done using a variety of computer programming languages. The list is
infinite, such as C, C++, Java
- Generally, the program development life cycle contains 7 phases, they are as follows….
 Problem Definition
 Program Design
 Coding
 Debugging
 Testing
 Documentation
 Maintenance
2. What is Debugging? define the errors can occur in a program.
- Debugging:
 At this stage the errors in the programs are detected and corrected.
 This stage of program development is an important process. Debugging is also known
as program validation.
- Some common errors which might occur in the programs include:
 Un initialization of variables.
 Reversing of order of operands.
 Confusion of numbers and characters.
 Inverting of conditions eg jumping on zero instead of on not zero.
3. Differentiate Formal and Natural Languages in terms of Ambiguity, Redundancy, and Literalness.
- ambiguity: Natural languages are full of ambiguity, which people deal with by using contextual
clues and other information. Formal languages are designed to be nearly or completely
unambiguous, which means that any statement has exactly one meaning, regardless of context.
- redundancy: In order to make up for ambiguity and reduce misunderstandings, natural
languages employ lots of redundancy. As a result, they are often verbose. Formal languages are
less redundant and more concise.
- literalness: Natural languages are full of idiom and metaphor. If I say, “The penny dropped”,
there is probably no penny and nothing dropping (this idiom means that someone understood
something after a period of confusion). Formal languages mean exactly what they say.
https://www.oreilly.com/library/view/think-python2nd/9781491939406/ch01.html#:~:text=Natural%20languages%20are%20full%20of,one%20meaning%2
C%20regardless%20of%20context.
Download