Ex2 - Sequential Statements
Ex2 - Sequential Statements
Learning Outcome:
● You will be able to apply computational thinking to devise solutions to the given
problems.
● You will be able to identify the type of statements (sequential, alternative and iterative)
required to solve problems.
● You code simple python programs to prompt the user input, to use variables and to
evaluate expressions.
2. Assume the population of a city consists of X persons of different age groups. X includes
both male and female. Public welfare department wants to find the average age of male
and female. The department can obtain peoples date of birth from the corporation from
which the age can be calculated. (Note: Use only sequential statements to solve the
problem. Consider X to be less than or equal to 6)
a. Identify the inputs required to solve the problem.
b. Devise a solution and represent the same using flowchart and pseudocode.
c. Develop a program to compute the average age of male and female.
Additional problems using sequential statements for practice: