Peace On Green Earth Public School: Kundrathur, Chennai - 600069
Peace On Green Earth Public School: Kundrathur, Chennai - 600069
Class – VII
1. Define an algorithm.
An algorithm is a step by step procedure to solve a particular problem.
Advantages of algorithms
Simple to understand.
Definite procedure is followed.
Programming becomes easier.
5. What is a bug?
A bug is a terminology used to describe any unexpected problem in
your program that generates incorrect output.
Ex. Any deviation in the expected and actual output of the program is
said to be bug.
6. What is selection in programming?
Selection refers to the situation in which the algorithm needs to make
a choice between two or more alternatives.
7. Write an algorithm for finding all natural numbers between from 1 to 50.
Step 1 : Start
Step 2 : Start loop from 1 to 100.
Step 3 : Check if (number > 0) and (number <=100)
then print the number
else
move to next number.
Step 4 : Stop.
party.
Step 1 : Start
Step 2 : Take one chocolate from the bag
Step 3 : Give chocolate to the students.
Step 4 : Check if there are any student left who did not get the chocolates
If yes, then go the step 2.
Step 5 : Stop.
START
Yes
No
STOP