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)
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
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage