4. The following flowchart classifies animals as herbivores or carnivores. Lion is a meat eating animal. Elephants eat only plants. Study the flowchart and answer the questions.
Start
Read the name
of the animal.
Does it eat only plants?
Yes
No
Print Herbivore. Print Carnivore.
End
a. Indicate each element of the flowchart by putting ‘I’ for input, ‘O’ for output, ‘D’ for decision in the circles provided next to the boxes.
b. Put a rectangle around the decision structure.
c. What is the condition which classifies an animal as carnivore?
d. Write the Execution steps if the input is a Lion.
e. What is the condition which classifies an animal as herbivore?
f. Write the execution steps if the input is an elephant.
5. A, B, C are the marks scored by a student in Science, Mathematics and English. Refer the flowchart and answer the questions.
a.
Start
Read A, B, C Sum A + B + C
a. Sweta, who scores 60 marks in Science, 70 marks in mathematics and 75 marks in English. Use the adjacent flowchart and provide the execution steps in calculating the average marks of Sweta. The first step is given.
60, 70, 75
Average = Sum/3
Print Average
b.
End
c. Is Sweta awarded a star? Yes or No? Ans:
b. A student whose average marks is above 75 is awarded a star. Fill in the following phrases in the flowchart for finding if a student gets a star or not.
Yes
No
Award a star
Do better to get a star
Is average greater than 75
d. Marks of two more students are given below. Study it and fill in the blanks with the average marks of each student and whether the student is awarded a star or not.
Science Mathematics English
Riya 75 80 72
Suman 72 70 82
i. Riya’s average is . So she is a star.
ii. Suman’s average is . So she is a star.
6. The following empty flowchart gives the steps to be followed while seeking admission to new school. The phrases to be filled in the boxes are also given. Complete the flowchart by filling in the number of the correponding phrase, inside each box. For example: the number corresponding to the first box in the flowchart is 7.
7
1. Search for a school
2. Prepare for the admission test and
No No
Yes Yes
Yes
write the test.
3. Did you pass the exam?
4. Submit necessary documents and
get admission.
5. End
6. Are seats available?
7. Start
8. Is there an admission test?
No
9. There are four types of fruits Apples, Oranges, Bananas and Grapes. Each student can pick up two fruits. There are some conditions which have to be used to pick up the fruits. Draw a flow chart which can take the name of first fruit as an input and print the names of second fruit or fruits that can be picked up. The conditions are:
• If you pick an apple you can pick banana.
• If you pick orange you can pick grapes.
• If you pick grapes you can pick banana.
Hint: There will be one input box to read the first
fruit, three decision boxes and four output boxes in the
flowchart.
2. Match the elements of a flowchart and their purpose of use in the following:
Purpose Use
Calculate total of A, B, C Loop
Indicate that the problem has been solved. Start
Find if a number is greater than the other Process
Read a number and calculate the factorial of the number. Input
Read three numbers Stop
Print the total Decision
Indicate beginning of a problem solving flow. Output
10. Lengths of three sides of a triangle a, b, c are given as input. The following flowchart finds if the triangle is isosceles, equilateral, or scalene. Some boxes in the flowchart are filled in for you, fill in the rest of the details.
Hint: In an equilateral triangle three sides are equal.
In an isosceles triangle two sides are equal.
In a scalene triangle three sides are not equal.
Start
Read side A, B & C
Is A = B ?
No
Is B = C ?
No
Print
“Scalene Triangle” End
Yes
a. Use the above flowchart and provide the execution steps in finding whether the given triangle with sides 5 cms, 5 cms and 3 cms is scalene or isosceles or equilateral triangle.
s
m
c
5
5
c
m
s
3 cms
Answers
Answer:
The conditions are:
• If you pick an apple you can pick banana.
• If you pick orange you can pick grapes.
• If you pick grapes you can pick banana.
Hint: There will be one input box to read the first
fruit, three decision boxes and four output boxes in the
flowchart.
2. Match the elements of a flowchart and their purpose of use in the following:
Purpose Use
Calculate total of A, B, C Loop
Indicate that the problem has been solved. Start
Find if a number is greater than the other Process
Read a number and calculate the factorial of the number. Input
Read three numbers Stop
Print the total Decision
Indicate beginning of a problem solving flow. Output
10. Lengths of three sides of a triangle a, b, c are given as input. The following flowchart finds if the triangle is isosceles, equilateral, or scalene. Some boxes in the flowchart are filled in for you, fill in the rest of the details.
Hint: In an equilateral triangle three sides are equal.
In an isosceles triangle two sides are equal.
In a scalene triangle three sides are not equal.
Start
Read side A, B & C
Is A = B ?
No
Is B = C ?
No
“Scalene Triangle” End
Yes
a. Use the above flowchart and provide the execution steps in finding whether the given triangle with sides 5 cms, 5 cms and 3 cms is scalene or isosceles or equilateral triangle.
s
m
c
5
5
c
m
s
3 cms