Question
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
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
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