Write a program that estimates the yearly population of a country in the next few years. The program should allow the user to enter the current population of a country, the average age, the yearly population growth rate (as a percentage), and the number of years in which the population is to be estimated by using the following rates: Population Average Age Less than or equal to 40 years old (young population) Between 40 and 50 years old (middle-age population) Over 50 years old (old population) Sample Inputs and outputs: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ This program calculates and displays the total yearly population of a country within a few years. How much is the average age of the population (years old)? 37 For how many years you wish to estimate the total population per year? 5 For which country would you like to estimate the yearly population? Australia Please enter the current population of the country in million: 27.1 What is the current year? 2022 Year 2022 (current year) 2023 2024 2025 Outcomes: The following table shows the total population of Australia from 2022 up to the next 5 years: Population (Million) 2026 2027 27.1 27.4 Population Growth Rate (yearly) 0.99% for the first 2 years and then, 0.85% afterwards. 27.6 27.8 0.52% for the first 2 years and then, 0.45% afterwards. 28.0 0.28% for the first 2 years and then, 0.15% afterwards. 28.3 Do you wish to calculate the yearly population for another country? (Y)es or (N)o: N

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

In python please. 

Write a program that estimates the yearly population of a country in the next few years.
The program should allow the user to enter the current population of a country, the
average age, the yearly population growth rate (as a percentage), and the number of
years in which the population is to be estimated by using the following rates:
Population Average Age
Less than or equal to 40 years old (young population)
Between 40 and 50 years old (middle-age population)
Over 50 years old (old population)
Sample Inputs and outputs:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This program calculates and displays the total yearly population of a country within a few years.
How much is the average age of the population (years old)? 37
For how many years you wish to estimate the total population per year? 5
For which country would you like to estimate the yearly population? Australia
Please enter the current population of the country in million: 27.1
What is the current year? 2022
2023
2024
Outcomes:
The following table shows the total population of Australia from 2022 up to the next 5 years:
Year
Population (Million)
2022 (current year)
2025
2026
2027
27.1
27.4
Population Growth Rate (yearly)
0.99% for the first 2 years and
then, 0.85% afterwards.
27.6
27.8
0.52% for the first 2 years and
then, 0.45% afterwards.
28.0
0.28% for the first 2 years and
then, 0.15% afterwards.
28.3
Do you wish to calculate the yearly population for another country? (Y)es or (N)o: N
Transcribed Image Text:Write a program that estimates the yearly population of a country in the next few years. The program should allow the user to enter the current population of a country, the average age, the yearly population growth rate (as a percentage), and the number of years in which the population is to be estimated by using the following rates: Population Average Age Less than or equal to 40 years old (young population) Between 40 and 50 years old (middle-age population) Over 50 years old (old population) Sample Inputs and outputs: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ This program calculates and displays the total yearly population of a country within a few years. How much is the average age of the population (years old)? 37 For how many years you wish to estimate the total population per year? 5 For which country would you like to estimate the yearly population? Australia Please enter the current population of the country in million: 27.1 What is the current year? 2022 2023 2024 Outcomes: The following table shows the total population of Australia from 2022 up to the next 5 years: Year Population (Million) 2022 (current year) 2025 2026 2027 27.1 27.4 Population Growth Rate (yearly) 0.99% for the first 2 years and then, 0.85% afterwards. 27.6 27.8 0.52% for the first 2 years and then, 0.45% afterwards. 28.0 0.28% for the first 2 years and then, 0.15% afterwards. 28.3 Do you wish to calculate the yearly population for another country? (Y)es or (N)o: N
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education