Assignment - Class 8 - Algorithm & Flowchart

Assignment — Algorithm & Flowchart (With Solutions)
Think, Plan, Solve — Master Problem Solving! This complete assignment covers algorithms and flowcharts — with theory questions, algorithm writing tasks, and flowchart drawing exercises. Complete all three sections and aim for 100 marks!
Assignment Overview
- Total Marks: 100
- Section A (Theory): 30 marks
- Section B (Algorithms): 40 marks
- Section C (Flowcharts): 30 marks
- Duration: 1 week
Motivational Message
Algorithms are like recipes — step-by-step instructions to achieve a result. Flowcharts are like maps that show the path visually. Master them, and programming becomes easy!
What is an Algorithm?
An algorithm is a step-by-step procedure to solve a problem in a finite number of steps.
Objectives
Learning Goals
- ✅ Understand algorithms.
- ✅ Learn flowchart symbols.
- ✅ Write step-by-step procedures.
- ✅ Draw flowcharts.
- ✅ Solve problems logically.
- ✅ Practice sequence & selection structures.
Section A: Theory Questions (30 Marks)
Q1. What is an algorithm? Give one example. (6 marks)
An algorithm is a step-by-step procedure to solve a problem in a finite number of well-defined steps.
Example: Algorithm to make tea:
- Start
- Boil water
- Add tea leaves
- Add sugar and milk
- Stir well
- Pour in cup
- Stop
Q2. Name any five characteristics of a good algorithm. (6 marks)
- Finiteness: Must have a finite number of steps.
- Definiteness: Each step must be clear and unambiguous.
- Input: Should have zero or more inputs.
- Output: Should produce at least one output.
- Effectiveness: Each step should be simple and doable.
- Correctness: Should give the correct result.
- Generality: Should work for all valid inputs.
Q3. What is a flowchart? List any 4 flowchart symbols with their uses. (6 marks)
A flowchart is a graphical representation of an algorithm using standard symbols and arrows to show the flow of steps.
| Symbol | Name | Use |
|---|---|---|
| Oval | Terminator | Start / Stop |
| Parallelogram | Input/Output | Read data / Display result |
| Rectangle | Process | Calculations, assignments |
| Diamond | Decision | Yes/No conditions |
| Arrow | Flow Line | Direction of flow |
Q4. Explain sequence and selection structure with examples. (6 marks)
1. Sequence Structure:
In sequence structure, statements are executed one after another in the given order. No decisions or repetitions.
Example:
- Start
- Read A and B
- SUM = A + B
- Print SUM
- Stop
2. Selection Structure:
In selection structure, the program chooses one of two or more paths based on a condition. Uses if-else logic.
Example:
- Start
- Read marks
- If marks >= 40 then print "Pass"
- Else print "Fail"
- Stop
Q5. Write the difference between algorithm and flowchart. (6 marks)
| Aspect | Algorithm | Flowchart |
|---|---|---|
| Form | Written in text/words | Drawn using symbols |
| Format | Step-by-step text | Graphical / Diagram |
| Symbols | No symbols used | Standard symbols used |
| Complexity | Easy to write | Takes more time to draw |
| Readability | Good for programmers | Easy for anyone to understand |
| Example | Text steps | Boxes and arrows |
Section B: Algorithm Writing (40 Marks)
Algo 1: Sum of Two Numbers (8 marks)
Step 1: Start
Step 2: Read two numbers A and B
Step 3: Calculate SUM = A + B
Step 4: Display SUM
Step 5: Stop
Algo 2: Check Even or Odd (8 marks)
Step 1: Start
Step 2: Read number N
Step 3: Calculate R = N % 2 (remainder)
Step 4: If R == 0 then
Print "Even"
Else
Print "Odd"
Step 5: Stop
- Input: N = 4 → Output: Even
- Input: N = 7 → Output: Odd
Algo 3: Largest of Three Numbers (8 marks)
Step 1: Start
Step 2: Read three numbers A, B, and C
Step 3: If A >= B AND A >= C then
LARGEST = A
Else if B >= C then
LARGEST = B
Else
LARGEST = C
Step 4: Display LARGEST
Step 5: Stop
Algo 4: Area of a Rectangle (8 marks)
Step 1: Start
Step 2: Read Length L and Breadth B
Step 3: Calculate AREA = L * B
Step 4: Display AREA
Step 5: Stop
- Input: L = 5, B = 3 → Output: AREA = 15
- Input: L = 10, B = 4 → Output: AREA = 40
Algo 5: Check Pass or Fail (8 marks)
Step 1: Start
Step 2: Read marks M
Step 3: If M >= 40 then
Print "Pass"
Else
Print "Fail"
Step 4: Stop
- Input: M = 55 → Output: Pass
- Input: M = 30 → Output: Fail
- Input: M = 40 → Output: Pass (boundary case)
Section C: Flowchart Drawing (30 Marks)
Flow 1: Display "Hello World" (10 marks)
Draw:
┌────────┐
│ Start │ (Oval)
└───┬────┘
↓
┌────────────────┐
│ Display │ (Parallelogram)
│ "Hello World" │
└───┬────────────┘
↓
┌────────┐
│ Stop │ (Oval)
└────────┘
Flow 2: Add Two Numbers (10 marks)
Draw:
┌────────┐
│ Start │ (Oval)
└───┬────┘
↓
┌────────────┐
│ Read A, B │ (Parallelogram)
└───┬────────┘
↓
┌────────────┐
│ SUM = A+B │ (Rectangle)
└───┬────────┘
↓
┌────────────┐
│ Print SUM │ (Parallelogram)
└───┬────────┘
↓
┌────────┐
│ Stop │ (Oval)
└────────┘
Flow 3: Check Even or Odd (10 marks)
Draw:
┌────────┐
│ Start │ (Oval)
└───┬────┘
↓
┌──────────┐
│ Read N │ (Parallelogram)
└───┬──────┘
↓
┌────────────┐
│ R = N % 2 │ (Rectangle)
└───┬────────┘
↓
┌────────────┐
│ Is R == 0? │ (Diamond)
└──┬──────┬──┘
Yes No
↓ ↓
┌─────┐ ┌─────┐
│Even │ │ Odd │ (Parallelograms)
└──┬──┘ └──┬──┘
└───┬───┘
↓
┌───────┐
│ Stop │ (Oval)
└───────┘
Flowchart Symbols Quick Reference
| Symbol | Name | Use |
|---|---|---|
| 🟢 Oval | Terminator | Start / Stop |
| 🔵 Parallelogram | Input/Output | Read data / Display result |
| 🟡 Rectangle | Process | Calculations, assignments |
| 🔴 Diamond | Decision | Yes/No, if-else |
| ➡️ Arrow | Flow Line | Direction of flow |
| ⭕ Circle | Connector | Connect flowchart parts |
Submission Format
How to Submit
- ✅ Handwritten in notebook OR A4 sheets.
- ✅ Draw flowcharts with proper symbols.
- ✅ Use pencil for drawings, pen for text.
- ✅ Include arrows showing direction.
- ✅ Clean handwriting and formatting.
- ✅ Number each step of algorithms.
- ✅ Submit on time.
- ✅ Include your name, roll no, class.
Evaluation Criteria (Total: 100 Marks)
| Section | Description | Marks |
|---|---|---|
| Section A | Theory Questions | 30 |
| Section B | Algorithm Writing | 40 |
| Section C | Flowchart Drawing | 30 |
| Total | 100 Marks |
Tips for Success
Best Practices
- 📖 Read questions carefully.
- 📝 Write clear step-by-step algorithms.
- 🎨 Use correct flowchart symbols.
- 📐 Draw neat and labeled flowcharts.
- 🔢 Number each step.
- 🧪 Test your logic with sample inputs.
- ▶️ Always include Start and Stop.
- ➡️ Use arrows to show flow direction.
- 💬 Add short comments if needed.
- ✍️ Practice makes perfect!
Common Mistakes to Avoid
Watch Out for These!
- ❌ Skipping Start / Stop.
- ❌ Using wrong symbols.
- ❌ Missing arrows.
- ❌ Vague steps (not clear).
- ❌ No decision box for if-else.
- ❌ Not testing logic.
- ❌ Overlapping arrows.
- ❌ Illegible handwriting.
Did You Know?
Fun Fact
The word "Algorithm" comes from Al-Khwarizmi, a Persian mathematician from the 9th century! He is called the Father of Algebra. His name gave rise to the modern word "algorithm".
Bonus Challenges (Optional)
Extra Practice
- 🌟 Algorithm to swap two numbers.
- 🌟 Flowchart to find factorial of a number.
- 🌟 Algorithm to check leap year.
- 🌟 Flowchart to convert Celsius to Fahrenheit.
- 🌟 Algorithm to calculate simple interest.
- 🌟 Flowchart to find the smallest of three numbers.
- 🌟 Algorithm to calculate average of 5 numbers.
- 🌟 Flowchart to check if a character is vowel or consonant.
Frequently Asked Questions
Q1. Can I use pen for flowcharts?
Pencil is recommended so you can erase mistakes. Use pen for final version.
Q2. Should I use a ruler?
Yes, use ruler for straight lines and arrows. Keeps flowchart neat.
Q3. How big should symbols be?
Big enough to write text clearly inside. About 3-4 cm wide works well.
Q4. Can I use a template or flowchart software?
Ask your teacher. Hand-drawn is usually preferred, but software like Draw.io works too.
Q5. What if my algorithm has more steps?
No problem! Use as many steps as needed. Just make each step clear.
Q6. Should I number the steps?
Yes! Number each step (Step 1, Step 2...) or use bullet points. Makes it easy to follow.
Q7. Do I need to write test cases?
Not required, but showing 2-3 test cases can earn extra marks and demonstrate understanding.
Q8. What if I make a mistake in the flowchart?
Erase and redo. Or use whitener. Keep flowchart clean and readable.
Key Takeaways
- Complete all 3 sections for full 100 marks.
- Section A: Theory (30 marks).
- Section B: 5 algorithms (40 marks).
- Section C: 3 flowcharts (30 marks).
- Always include Start and Stop.
- Use correct flowchart symbols.
- Number your algorithm steps.
- Test your logic with examples.
- Draw neat and labeled diagrams.
- Practice makes perfect!
Key Takeaway
Algorithms and flowcharts help us solve
problems step by step! Master them and coding
becomes easy!
This assignment covers all the essential concepts of
Chapter 4. Complete it thoroughly and you'll build a
strong foundation for programming!
Think logically. Draw neatly. Solve
confidently. You will do great!
⭐ THINK SMART, PLAN CLEAR, SOLVE BETTER! ⭐
Best of Luck! Practice daily,
understand deeply, and solve confidently! 👍😊
Flowchart → Visual Thinking → Smart Solutions → Better
Results! 🚀
Home & Online Tuition
Learn from an experienced tutor with personalized guidance.
Available Locations
Expert Home & Online Tuition
Personalized one-to-one tuition that focuses on concept building, practical learning, problem-solving skills, and excellent academic performance. Suitable for school students looking for structured, interactive, and result-oriented learning.
Subjects We Teach
Why Choose Our Tuition?
✅ Concept-Based Learning
✅ Practical Examples
✅ Weekly Tests
✅ Doubt Solving Sessions
✅ Practice Worksheets
✅ MCQ & Assignments
✅ Exam Preparation
✅ Flexible Class Timings