Worksheets › Class 9 › Algorithms and Flowcharts

Class 9 · Computational Thinking and AI worksheet

Algorithms and Flowcharts

CBSE Computational Thinking and AI. Flowchart symbols, tracing step-by-step algorithms and loops, finding the bug, ordering steps, swapping values. Every sheet has 20 questions in three sections and an answer key, and the questions change every time.

Open a printable sample sheet

Sample questions

Real questions from this chapter, as the app sets them. Tap Answer to see the answer and working.

Section A · multiple choice

  1. 1.

    An algorithm is:

    1. a picture of data
    2. a list of random guesses
    3. a kind of computer
    4. a finite set of clear steps that solves a problem
    Answer

    (d) a finite set of clear steps that solves a problem

  2. 2.

    What does this algorithm print? 1. Start 2. Read N (N = 13) 3. Set S = 0 and I = 3 4. If I > N, go to step 7 5. Set S = S + I, then I = I + 4 6. Go to step 4 7. Print S 8. Stop

    1. 21
    2. 32
    3. 10
    4. 91
    Answer

    (a) 21

    3 + 7 + 11

  3. 3.

    How many times is step 5 carried out? 1. Start 2. Read N (N = 13) 3. Set S = 0 and I = 3 4. If I > N, go to step 7 5. Set S = S + I, then I = I + 1 6. Go to step 4 7. Print S 8. Stop

    1. 10
    2. 12
    3. 13
    4. 11
    Answer

    (d) 11

    I takes the values 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13

Section B · short answer

  1. 4.

    What is the difference between an algorithm and a flowchart?

    Answer

    An algorithm is the list of steps; a flowchart is a diagram that shows those steps with standard symbols and arrows.

  2. 5.

    What does this algorithm print? 1. Start 2. Read N (N = 66469) 3. Set R = 0 4. If N = 0, go to step 7 5. Set R = R + (last digit of N), then remove the last digit of N 6. Go to step 4 7. Print R 8. Stop

    Answer

    31

    6 + 6 + 4 + 6 + 9

Section C · long answer

  1. 6.

    Write an algorithm and describe its flowchart for finding the sum of the first N natural numbers.

    Answer

    Start; read N; set S = 0, I = 1; while I ≤ N, set S = S + I and I = I + 1; print S; stop. Flowchart: oval, parallelogram, rectangle, diamond with a loop back, parallelogram, oval.

Fresh sheets for your child

In the app, every Algorithms and Flowcharts sheet is new: the app remembers the questions your child has already had and leaves them out. Print the sheet as a PDF, or use notebook mode and write the answers in a notebook.

Coming soon for Android and iPhone.

More Class 9 Computational Thinking and AI