Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a Jupyter Notebook from the statements given in Program 2-18 (future_value.py) on p. 63. Don't forget a Markdown block with the assignment number and
Create a Jupyter Notebook from the statements given in Program 2-18 (future_value.py) on p. 63. Don't forget a Markdown block with the assignment number and your name at the top. Take a screenshot of the program and the output using the numbers provided in the Program Output section.
(future_value.py) \( \begin{array}{ll}1 & \text { \# Get the desired future value. } \\ 2 & \text { future_value = float(input('Enter the desired future value: ')) } \\ 3 & \\ 4 & \text { \# Get the annual interest rate. } \\ 5 & \text { rate }=\text { float(input('Enter the annual interest rate: ')) } \\ 6 & \\ 7 & \text { \# Get the number of years that the money wi } 11 \text { appreciate. } \\ 8 & \text { years }=\text { int(input('Enter the number of years the money wi11 grow: ')) } \\ 9 & \\ 10 & \text { \# Calculate the amount needed to deposit. } \\ 11 & \text { present_value }=\text { future_value / ( } 1.0+\text { rate) }{ }^{* *} \text { years } \\ 12 & \\ 13 & \text { \# Display the amount needed to deposit. } \\ 14 & \text { print('You will need to deposit this amount:', present_value) }\end{array} \) Program Output Enter the desired future value: 10000.0 [Enter] Enter the annual interest rate: 0.05 [Enter] Enter the number of years the money will grow: 10 [Enter] You will need to deposit this amount: 6139.13253541 (future_value.py) \( \begin{array}{ll}1 & \text { \# Get the desired future value. } \\ 2 & \text { future_value = float(input('Enter the desired future value: ')) } \\ 3 & \\ 4 & \text { \# Get the annual interest rate. } \\ 5 & \text { rate }=\text { float(input('Enter the annual interest rate: ')) } \\ 6 & \\ 7 & \text { \# Get the number of years that the money wi } 11 \text { appreciate. } \\ 8 & \text { years }=\text { int(input('Enter the number of years the money wi11 grow: ')) } \\ 9 & \\ 10 & \text { \# Calculate the amount needed to deposit. } \\ 11 & \text { present_value }=\text { future_value / ( } 1.0+\text { rate) }{ }^{* *} \text { years } \\ 12 & \\ 13 & \text { \# Display the amount needed to deposit. } \\ 14 & \text { print('You will need to deposit this amount:', present_value) }\end{array} \) Program Output Enter the desired future value: 10000.0 [Enter] Enter the annual interest rate: 0.05 [Enter] Enter the number of years the money will grow: 10 [Enter] You will need to deposit this amount: 6139.13253541
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started