Computer Science, asked by arijoseph3, 9 days ago

For the following question, you need to create all three areas: An IPO Table, An Algorithm, A Flowchart. Question: Input the ages of all the students in your class. Calculate the average age. Display the average age of students in your class. 15 marks total

Answers

Answered by atharvsalunke1905
1

Answer:

Flowchart is nothing but a type of diagram that one uses to illustrate algorithm, work flow and process showing them as different kind of boxes and also showing the order of flow using arrows.

For finding the average of 3 numbers:

First you have to declare 3 variables.

Then take the input from the user for those 3 variables.

After that take the average of those 3 numbers by the formula (1st no + 2nd no +3rd no)/3 and store the result in some variable.

Then print that answer.

Or directly print the average without using extra variable.

Thanks

Explanation:

Flowchart is nothing but a type of diagram that one uses to illustrate algorithm, work flow and process showing them as different kind of boxes and also showing the order of flow using arrows.

For finding the average of 3 numbers:

First you have to declare 3 variables.

Then take the input from the user for those 3 variables.

After that take the average of those 3 numbers by the formula (1st no + 2nd no +3rd no)/3 and store the result in some variable.

Then print that answer.

Or directly print the average without using extra variable.

Thanks

Answered by leenath
0

Answer:

Explanation:

A problem can be broken down into 4 components:

1. Input - any data that is needed to solve the problem

2. Processing - the task that will be carried out to solve the problem

3. Output - the end result of the problem

4. Storage - variable are used to store data/values to perform calculation

The IPO (Input, Processing & Output) chart can be used to analyse a problem. This is a table with three columns, which represent three components: input, output and processing. Storage component is not shown.

Input Processing

Output

   

Follow these 5 steps to complete an IPO Chart:

Write the input (what is needed from the person using the algorithm).

Write the output (the end result that is stated in the problem).

In the processing column write "get" and anything that is under the input column. If nothing is under the input column, leave out this step.

Ask yourself the following question. “What do I have to do with the inputs in order to produce the desired output?” Then write down what should be done.

Write "display" and anything under the Output column.

E.g. A program is required to read three numbers, calculate and print their total.

Three numbers are needed so write "3 numbers" under INPUT

Input Processing

Output

3 numbers

 

The question ask for the total to be printed so Sum or Total can be used.

Input Processing

Output

3 numbers

  Total

Write down the word get followed by 3 numbers.

Write what should be done to produce the total which is "Calculate the total"

Write down the word display followed by total.

Input Processing

Output

3 numbers

get 3 numbers

calculate the total

display total

Total

Another E.g. Write a program to read 2 numbers. The program should calculate and print the sum, average and product.

Input

Processing

Output

2 numbers

get 2 numbers

calculate sum

calculate average

calculate product

display sum, average and product

Sum, Average, Product

Let the number of boys and girls in the class be x and y respectively.

Total age of the class =15.8×(x+y)

=(15.8x+15.8y) years

Total age of the boys =16.4x years

Total age of girls =15.4y years

∴16.4x+15.4y=15.8x+15.8y

⇒16.4x−15.8x=15.8y−15.4y

⇒0.6x=0.4y

y

x

=

6

4

=

3

2

Similar questions