You are on page 1of 4

Quiz 1

Total Marks = 15

Date: 16-6-20

Q1. Complete the trace table for the following flowchart for the given test data. [7]

Test data = 9, 7.8, 12, 4.5, 10, 6.4, 3.1

Trace table:

C hours height total avge output


1 0 0 0
2 9 9 9
3 7.8 16.8
4 12 12 28.8
5 4.5 33.3
6 10 43.3
7 6.4 49.7
8 3.1 52.8 7.54 7.54,12

Q2. Draw flowchart and write pseudocode for the algorithm given below: [3+2.5]

Algorithm:

 Step 1: Input grades of 4 courses

 Step 2: Calculate the average grade with formula "Grade=(S1+S2+S3+S4)/4"

 Step 3: If the average grade is less than 60, print "FAIL", else print "PASS".

Flowchart:
Pseudocode:
Q3. Choose the correct option [2.5]
1. Which is used to denote for entering something into a program.
a. Write
b. Input
c. Read
d. Output
2. Flowchart is actually
a. A text-based way of designing an algorithm
b. A specific programming language
c. A diagram that represents a set of instructions
d. A bullet point list of instructions
3. Algorithms be used.
a. Only with computers
b. Only when programming
c. Only with flowcharts
d. Any time to design solutions to problems
4. To repeat a task number of times we use 
a. input statement
b. conditional statement
c. loop statement
d. output statement
5. The purpose of a flowchart is?
a. To plan the program before it is made
b. Because it is easier

You might also like