rite a program that reads from the user three pieces of information: The current population of a country, the past population of a country, and number of years passed between past and current population. The program should then calculate the percent of growth rate of population and displays the results as shown in Figure 3. Note that percent ofgrowth rate of population is calculated using the following formula:

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question
Write a program that reads from the user three pieces of information: The current population of a country, the past population of a country, and number of years passed between past and current population. The program should then calculate the percent of growth rate of population and displays the results as shown in Figure 3. Note that percent ofgrowth rate of population is calculated using the following formula:
+
100%
3/5
50
35
1.35
Figure 2: Sample Run
Exercise 3:
Write a program that reads from the user three pieces of information: The current population of a country, the past
population of a country, and number of years passed between past and current population. The program should then
calculate the percent of growth rate of population and displays the results as shown in Figure 3.
Note that percent ofgrowth rate of population is calculated using the following formula:
current population- past population
past population
number of years
x 100
Percent of growth rate =
Name your program Lab3 Id ex3.py, where Id is your university Id. Include the design of your solution as
comments at the beginning of your program. Test your solution with different input data.
Please enter the orent population of the country: 230eee
Please enter the past enul
Son of the country: 25ee09
Please enter the cunberof years btreen past nd currentpopulation: 10
========== RRR
Curcent
Population
Past
Populatien
ber of
Growth
Rate
Fgure 3: Sample Run
Transcribed Image Text:+ 100% 3/5 50 35 1.35 Figure 2: Sample Run Exercise 3: Write a program that reads from the user three pieces of information: The current population of a country, the past population of a country, and number of years passed between past and current population. The program should then calculate the percent of growth rate of population and displays the results as shown in Figure 3. Note that percent ofgrowth rate of population is calculated using the following formula: current population- past population past population number of years x 100 Percent of growth rate = Name your program Lab3 Id ex3.py, where Id is your university Id. Include the design of your solution as comments at the beginning of your program. Test your solution with different input data. Please enter the orent population of the country: 230eee Please enter the past enul Son of the country: 25ee09 Please enter the cunberof years btreen past nd currentpopulation: 10 ========== RRR Curcent Population Past Populatien ber of Growth Rate Fgure 3: Sample Run
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Similar questions
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman