This program should compound interest continuously. It asks the user for the number of times they want to see their $1 compounded. And the years used in the equation are 1,2,4,8,16.2^N. I. E. I want to see it compounded three times so the user enters 3. The problem is that when I run it. It computes it as though it's going through numbers like 1,2,3,4,5,6,7,8,9. But I need it to go through the numbers I have it. As in 1,2,4,8,16.2^N And the out put should read [2.0,2.25,2.44140625 HW OS CAUser/irist N205.py a.7.4) File Edit Format Run Options Window Help .Evan Marth 14 3eptember 2019 Hamework 2 Q5 print (*Model Compound Interest for 1, 2, 4, B. 16 . 2-N Periods.) produ ct= f N - int (input('Enter N: >> nI[1,2,4,8,16, 20] ZOr a 1 range (2, N+1): for 3 in range (len (n}} : 1 (1+1/ay. Droduct.appernd (amount) amount PEint (product)

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 20PE
icon
Related questions
Question
This program should compound interest continuously. It asks the user for the number of times they want to
see their $1 compounded. And the years used in the equation are 1,2,4,8,16.2^N. I. E. I want to see it
compounded three times so the user enters 3. The problem is that when I run it. It computes it as though it's
going through numbers like 1,2,3,4,5,6,7,8,9. But I need it to go through the numbers I have it. As in
1,2,4,8,16..2^N And the out put should read [2.0,2.25,2.44140625
HWOS.py-CAsers/kr
Help
205 py (3.7A)
File
Edit
Format
Run
Options
Window
.Evan Mar th
14 September 2019
Hamework 2 QS
print (*Nodel Compound Interest
Produ ct= (1
N - int (input{'Enter N:
n -[1,2,4,8,116,20]
tor a in range (2, N+1) :
for 2,
2, 4. D , 16
.. 2-N Periods.)
for 3 in range ( len (n>..
- 2 (1+1/1)
Droduct.appernd (amount)
amount
Print (product)
...
Transcribed Image Text:This program should compound interest continuously. It asks the user for the number of times they want to see their $1 compounded. And the years used in the equation are 1,2,4,8,16.2^N. I. E. I want to see it compounded three times so the user enters 3. The problem is that when I run it. It computes it as though it's going through numbers like 1,2,3,4,5,6,7,8,9. But I need it to go through the numbers I have it. As in 1,2,4,8,16..2^N And the out put should read [2.0,2.25,2.44140625 HWOS.py-CAsers/kr Help 205 py (3.7A) File Edit Format Run Options Window .Evan Mar th 14 September 2019 Hamework 2 QS print (*Nodel Compound Interest Produ ct= (1 N - int (input{'Enter N: n -[1,2,4,8,116,20] tor a in range (2, N+1) : for 2, 2, 4. D , 16 .. 2-N Periods.) for 3 in range ( len (n>.. - 2 (1+1/1) Droduct.appernd (amount) amount Print (product) ...
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage