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.

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

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.

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
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
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