Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

(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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

x-3+1, x23 Let f(x) = -*+3, * Answered: 1 week ago

Answered: 1 week ago