Document 5
Document 5
1. What is coding?
2. What is a programming language? Give an example.
3. What is algorithm? Find the algorithm of sum of 2 numbers.
4. Calculate profit or loss using algorithm.
5. What is a flowchart? Write symbol
6. Prepare flowchart, calculate profit or loss.
7. Benefit of using flowchart.
8. Different types of variables with examples.
9. Draw the table of relational operators.
10. Write the name of logical operator and give examples.
Answers
1. Coding is the process of writing instructions in a programming language
to create software, applications, or systems that computers can
execute. It involves translating human ideas into a language that
computers understand.
2. A programming language is a formal set of instructions and rules used to
communicate with a computer and develop programs. It provides syntax and
structure for coding. Example: Python, Java, C++, etc.
3. An algorithm is a step-by-step procedure or formula for solving a problem or
performing a task. It is a logical sequence of actions to achieve a specific goal.
Algorithm to find the sum of two numbers:
Start
Input two numbers (A and B)
Add the numbers: Sum = A + B
Output the Sum
Stop
4. Algorithm:
Start
Input Cost Price (CP) and Selling Price (SP)
If SP > CP, calculate Profit = SP - CP
If CP > SP, calculate Loss = CP - SP
Output Profit or Loss
Stop
5.
9.
10.