Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the current price of a loaf of bread, an estimated yearly inflation rate, and a year (in the future), write a Python program to

Given the current price of a loaf of bread, an estimated yearly inflation rate, and a year (in the future), write a Python program to calculate the estimated future price of a loaf of bread. Assume the current year is a constant value. Also, assume the formula for the future price, FP, is given by

image text in transcribed

where CP is the current price, R is the yearly inflation rate, N is the future year, and Y is the current year.

For example, assuming it is currently 2020 and a loaf of bread costs $5.00, if inflation is a yearly rate of 2.5%, then in the year 2030, a loaf of bread will likely cost $6.40.

Sample input/output should be something like this:

Enter current price: 5.00 Enter yearly inflation rate: 0.025 Enter future year: 2030 If inflation is 0.0250%, then bread will cost $6.40 in 2030. 
FP = CP X (1 + R)(N-Y)

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

More Books

Students also viewed these Databases questions

Question

Purpose: What do we seek to achieve with our behaviour?

Answered: 1 week ago

Question

List the advantages and disadvantages of the pay programs. page 505

Answered: 1 week ago