Please answer it in Python Alain just opened a gym in 2017 and he already has 100 members. According to its forecasts, the number of members should increase by 8% per year. Write a program to help Alain in his forecasts of number of members, following the specifications described below. The number of members each year will be rounded to the nearest integer thanks to the round function (...). For example, round(6.8) is 7. When Alain launches the application, the following menu should be displayed: Menu, please choose: 1. Forecasts adhering to year N (summarized) 2. Forecasts adhering to year N (details) 3. Cumulative memberships in year N4 . Year in which M members will be obtainedQ . Leave If Alain types 1, the program displays him Choose a year: then the number of members that there will be in the chosen year, for example if Alain taps 2018, the program must display In 2018 there will be 108 adherents. Then, the program should re-display the menu. If Alain types 2, the program displays him Choose a year: then the details of the number of members expected from the year 2017 to the chosen year. For example if Alain types 2019, the program should display: In 2017 there are 100 adherents. In 2018 there will be 108 adherents. (because 100+(0.08*100) = 108) In 2019 there will be 117 adherents. Then, the program should re-display the menu. If the chosen year is less than or equal to 2017, only the line In 2017 there are 100 adherents. should be displayed.
Please answer it in Python
Alain just opened a gym in 2017 and he already has 100 members. According to its forecasts, the number of members should increase by 8% per year. Write a program to help Alain in his forecasts of number of members, following the specifications described below.
The number of members each year will be rounded to the nearest integer thanks to the round function (...). For example, round(6.8) is 7.
When Alain launches the application, the following menu should be displayed:
Menu, please choose:
1. Forecasts adhering to year N (summarized)
2. Forecasts adhering to year N (details)
3. Cumulative memberships in year N4
. Year in which M members will be obtainedQ
. Leave
If Alain types 1, the program displays him Choose a year: then the number of members that there will be in the chosen year, for example if Alain taps 2018, the program must display In 2018 there will be 108 adherents. Then, the program should re-display the menu.
If Alain types 2, the program displays him Choose a year: then the details of the number of members expected from the year 2017 to the chosen year. For example if Alain types 2019, the program should display:
In 2017 there are 100 adherents.
In 2018 there will be 108 adherents. (because 100+(0.08*100) = 108)
In 2019 there will be 117 adherents.
Then, the program should re-display the menu.
If the chosen year is less than or equal to 2017, only the line In 2017 there are 100 adherents. should be displayed.
Step by step
Solved in 3 steps with 1 images