Table of Contents

    Practice Assignment: Write Algorithm, Pseudocode, and Flowchart

    Practice Assignment

    Practice Assignment: Write Algorithm, Pseudocode, and Flowchart

    Practice converting real-world problems into algorithm steps, pseudocode, and flowchart representations before writing actual code.

    Assignment Overview

    In this practice assignment, students will learn how to solve programming problems using three important planning tools: algorithm, pseudocode, and flowchart.

    Before writing actual code, programmers should understand the problem, identify input and output, design the logic, and represent the solution clearly. This assignment will help students build strong problem-solving habits.

    A good programmer does not directly jump into coding. First, they understand the problem, plan the logic, and then write code.

    Learning Objectives

    After completing this assignment, students will be able to:

    Objectives

    • Understand a programming problem statement clearly.
    • Identify input, process, and output for a problem.
    • Write a step-by-step algorithm.
    • Convert an algorithm into pseudocode.
    • Represent program logic using a flowchart.
    • Use correct flowchart symbols for start, input, process, decision, output, and end.
    • Practice sequence, selection, and repetition-based problems.
    • Improve logical thinking before actual coding.

    Prerequisites

    Before attempting this assignment, students should have basic knowledge of the following topics:

    Required Knowledge

    • What is programming?
    • What is a program?
    • Input, Process, Output model.
    • Problem statement understanding.
    • Algorithm basics.
    • Pseudocode basics.
    • Flowchart symbols.
    • Conditions such as if and else.
    • Loops such as for and while.

    Assignment Instructions

    Read each problem carefully and prepare three things for every problem:

    Required Submission
    Algorithm Pseudocode Flowchart

    Student Instructions

    • Write the problem number clearly.
    • Identify the input, process, and output before writing the solution.
    • Write the algorithm in numbered steps.
    • Write pseudocode using simple English-like statements.
    • Draw the flowchart using correct symbols.
    • Use arrows properly to show flow direction.
    • Use decision branches such as Yes and No wherever required.
    • Check whether every flowchart starts with Start and ends with End.
    • Do not write actual Java code for this assignment unless asked separately.

    Flowchart Symbol Reminder

    Students should use the following common symbols while drawing flowcharts.

    Symbol Name Shape Purpose
    Terminator Oval Used for Start and End.
    Input / Output Parallelogram Used for input and output operations.
    Process Rectangle Used for calculations or assignments.
    Decision Diamond Used for conditions such as Yes or No.
    Flow Line Arrow Shows direction of flow.
    Connector Small Circle Connects different parts of a large flowchart.

    Submission Format

    For each problem, students should follow the format given below.

    1

    Problem Statement

    Write the given problem statement clearly.

    2

    IPO Analysis

    Mention input, process, and output.

    3

    Algorithm

    Write the steps in simple numbered format.

    4

    Pseudocode

    Write the logic using English-like programming statements.

    5

    Flowchart

    Draw the flowchart neatly using correct symbols.

    Assignment Problems

    Complete the following problems by writing an algorithm, pseudocode, and flowchart for each one.

    Problem 1: Add Two Numbers

    Write an algorithm, pseudocode, and flowchart to input two numbers and display their sum.

    Required IPO Analysis

    Part Student Should Identify
    Input Two numbers.
    Process Add both numbers.
    Output Sum of the two numbers.

    Student Task

    • Write the algorithm in 5 to 7 steps.
    • Write pseudocode using INPUT, SET, and DISPLAY.
    • Draw a flowchart with Start, Input, Process, Output, and End symbols.

    Problem 2: Calculate Average Marks

    Write an algorithm, pseudocode, and flowchart to input marks of three subjects and display the total and average marks.

    Required IPO Analysis

    Part Student Should Identify
    Input Marks of three subjects.
    Process Add marks and divide total by 3.
    Output Total marks and average marks.

    Student Task

    • Use meaningful variable names such as math, science, english, total, and average.
    • Write the formula correctly.
    • Draw the flowchart in proper sequence.

    Problem 3: Check Pass or Fail

    Write an algorithm, pseudocode, and flowchart to input a student’s marks and display “Pass” if marks are 35 or more, otherwise display “Fail”.

    Required IPO Analysis

    Part Student Should Identify
    Input Student marks.
    Process Check whether marks are greater than or equal to 35.
    Output Pass or Fail.

    Student Task

    • Use a decision condition in the algorithm.
    • Use IF, ELSE, and END IF in pseudocode.
    • Use a diamond symbol in the flowchart for the condition.
    • Label decision branches as Yes and No.

    Problem 4: Check Even or Odd

    Write an algorithm, pseudocode, and flowchart to input a number and check whether it is even or odd.

    Required IPO Analysis

    Part Student Should Identify
    Input One integer number.
    Process Check whether the number is divisible by 2.
    Output Even or Odd.

    Hint

    number MOD 2 == 0

    Student Task

    • Use modulus logic.
    • Use a decision symbol in the flowchart.
    • Clearly show both possible outputs: Even and Odd.

    Problem 5: Find the Largest of Two Numbers

    Write an algorithm, pseudocode, and flowchart to input two numbers and display the larger number.

    Required IPO Analysis

    Part Student Should Identify
    Input Two numbers.
    Process Compare both numbers.
    Output The larger number.

    Student Task

    • Use comparison logic.
    • Use IF number1 > number2 condition.
    • Display the correct larger number.
    • Draw a decision-based flowchart.

    Problem 6: Print Numbers from 1 to 10

    Write an algorithm, pseudocode, and flowchart to print numbers from 1 to 10.

    Required IPO Analysis

    Part Student Should Identify
    Input No user input required.
    Process Use a loop from 1 to 10.
    Output Numbers from 1 to 10.

    Hint

    SET i = 1
    WHILE i <= 10 DO
        DISPLAY i
        SET i = i + 1
    END WHILE

    Student Task

    • Use repetition logic.
    • Show loop condition clearly.
    • Make sure the loop stops after printing 10.
    • In the flowchart, show the loop returning back to the condition.

    Problem 7: Calculate Sum of First N Natural Numbers

    Write an algorithm, pseudocode, and flowchart to input a number N and calculate the sum of numbers from 1 to N.

    Required IPO Analysis

    Part Student Should Identify
    Input A number N.
    Process Add numbers from 1 to N using a loop.
    Output Sum of first N natural numbers.

    Hint

    SET sum = 0
    FOR i = 1 TO N DO
        SET sum = sum + i
    END FOR

    Student Task

    • Use loop-based logic.
    • Track the value of sum.
    • Draw the flowchart with loop condition and repeated calculation.
    • Perform a small dry run using N = 5.

    Problem 8: Calculate Area of a Rectangle

    Write an algorithm, pseudocode, and flowchart to input length and width of a rectangle and display its area.

    Required IPO Analysis

    Part Student Should Identify
    Input Length and width.
    Process area = length * width
    Output Area of rectangle.

    Student Task

    • Use correct formula.
    • Use clear variable names.
    • Draw a simple sequence flowchart.
    • Display the final area clearly.

    Problem 9: Check Positive, Negative, or Zero

    Write an algorithm, pseudocode, and flowchart to input a number and check whether it is positive, negative, or zero.

    Required IPO Analysis

    Part Student Should Identify
    Input One number.
    Process Check whether number is greater than 0, less than 0, or equal to 0.
    Output Positive, Negative, or Zero.

    Hint

    IF number > 0 THEN
        DISPLAY "Positive"
    ELSE IF number < 0 THEN
        DISPLAY "Negative"
    ELSE
        DISPLAY "Zero"
    END IF

    Student Task

    • Use multiple conditions.
    • Use proper branching in the flowchart.
    • Test with three sample values: 10, -5, and 0.

    Problem 10: Calculate Simple Interest

    Write an algorithm, pseudocode, and flowchart to input principal, rate, and time, then calculate simple interest.

    Required IPO Analysis

    Part Student Should Identify
    Input Principal, rate, and time.
    Process simpleInterest = (principal * rate * time) / 100
    Output Simple interest amount.

    Student Task

    • Write clear input steps.
    • Use the correct formula.
    • Display simple interest as output.
    • Draw a sequence-based flowchart.

    Assignment Template

    Students can use the following template for every problem.

    Problem Number:
    Problem Statement:
    
    IPO Analysis:
    Input:
    Process:
    Output:
    
    Algorithm:
    Step 1:
    Step 2:
    Step 3:
    Step 4:
    Step 5:
    
    Pseudocode:
    START
    
    END
    
    Flowchart:
    Draw using correct flowchart symbols.

    Evaluation Rubric

    The assignment can be evaluated using the following marking criteria.

    Criteria Marks Description
    Problem Understanding 10 Correctly identifies what the problem asks.
    IPO Analysis 15 Correctly identifies input, process, and output.
    Algorithm 20 Writes clear and correct step-by-step logic.
    Pseudocode 20 Uses proper pseudocode structure and logic.
    Flowchart 25 Uses correct symbols, arrows, decisions, and flow.
    Neatness and Presentation 10 Work is readable, organized, and properly labeled.

    Common Mistakes to Avoid

    Mistakes

    • Writing code instead of algorithm.
    • Skipping IPO analysis.
    • Using unclear variable names.
    • Missing Start or End in flowchart.
    • Using the wrong flowchart symbol.
    • Not labeling decision branches as Yes or No.
    • Writing incomplete pseudocode.
    • Forgetting output step.

    Better Practice

    • Understand the problem first.
    • Write input, process, and output clearly.
    • Use meaningful variable names.
    • Write algorithm before pseudocode.
    • Use correct flowchart symbols.
    • Use arrows properly.
    • Check every condition carefully.
    • Review the solution before submission.

    Final Submission Checklist

    Before submitting, students should check the following:

    Checklist

    • Have I written the problem statement?
    • Have I identified input, process, and output?
    • Have I written the algorithm in proper steps?
    • Have I written pseudocode clearly?
    • Have I drawn the flowchart using correct symbols?
    • Have I used arrows correctly?
    • Have I used Yes and No branches for decision problems?
    • Have I checked that the solution ends properly?
    • Have I reviewed spelling, formatting, and presentation?

    Final Takeaway

    This assignment helps students practice the complete problem-solving process before coding. By writing an algorithm, pseudocode, and flowchart, students learn how to think logically, organize solutions clearly, and prepare themselves for real programming tasks.