Algorithms and flowcharts: practice questions
Class 7 Computer Science. Ten questions with step-by-step answers, for CBSE and ICSE. Try each one before you open its answer.
Key ideas
- Steps in order.
- These are the multi-step questions examiners like to set. Read each one twice, write down what you know, then plan before you calculate.
- These go beyond the syllabus. Each one has a neat idea that makes it short; brute force is slow.
Read each question twice and say the answer out loud before you check it. For code or binary questions, work it out on paper step by step, the way a computer would.
Ten questions
1.How many times does this run? for i in range(4, 14, 3):
Show the answer
Think: List the values of i.
Work: range stops before the end value.
Answer: 4
2.How many times does this run? for i in range(2, 13, 3):
Show the answer
Think: List the values of i.
Work: range stops before the end value.
Answer: 4
3.How many times does this run? for i in range(2, 12, 1):
Show the answer
Think: List the values of i.
Work: range stops before the end value.
Answer: 10
4.How many times does this run? for i in range(0, 4, 1):
Show the answer
Think: List the values of i.
Work: range stops before the end value.
Answer: 4
5.How many times does this run? for i in range(2, 11, 2):
Show the answer
Think: List the values of i.
Work: range stops before the end value.
Answer: 5
6.How many times does this run? for i in range(5, 12, 2):
Show the answer
Think: List the values of i.
Work: range stops before the end value.
Answer: 4
7.How many times does this run? for i in range(4, 15, 1):
Show the answer
Think: List the values of i.
Work: range stops before the end value.
Answer: 11
8.How many times does this run? for i in range(4, 12, 3):
Show the answer
Think: List the values of i.
Work: range stops before the end value.
Answer: 3
9.How many times does this run? for i in range(4, 12, 2):
Show the answer
Think: List the values of i.
Work: range stops before the end value.
Answer: 4
10.How many times does this run? for i in range(3, 9, 3):
Show the answer
Think: List the values of i.
Work: range stops before the end value.
Answer: 2
Before you check an answer
- List the values of i.
Questions students ask
- What does Algorithms and flowcharts in Class 7 Computer Science cover?
- Steps in order. These are the multi-step questions examiners like to set. Read each one twice, write down what you know, then plan before you calculate. These go beyond the syllabus. Each one has a neat idea that makes it short; brute force is slow.
- How should I practise Algorithms and flowcharts?
- Read each question twice and say the answer out loud before you check it. For code or binary questions, work it out on paper step by step, the way a computer would. Try all ten questions on this page, then open the chapter in Gradient tuition for step-by-step lessons, a live experiment and an AI tutor who explains where you went wrong.
- Is this for CBSE or ICSE?
- The questions follow the Class 7 Computer Science syllabus shared by CBSE and ICSE / ISC, and suit most state boards too.
Stuck on one of these?
Gradient tuition teaches Algorithms and flowcharts step by step, with experiments you can play with and an AI tutor who circles the part of the question you missed.
Open Algorithms and flowcharts in tuition