Menu

[Solved]Title Lab Compound Interest Table Summary Lab Use Nested Loops Create Table Showing Money Q37171367

TITLE OF LAB: COMPOUND INTEREST TABLE SUMMARY This Lab will use nested loops to create a table showing how some money can gro

TITLE OF LAB: COMPOUND INTEREST TABLE SUMMARY This Lab will use nested loops to create a table showing how some money can grow from month to month with compounded interest. The user will enter the initial balance. Then the program will print a table similar to the one shown below that has one row per year for five years. The months are numbered from 1 to 12 along the top of the table and the years are shown in the first column of the table. The interest rate will be 12% annually so we will grow the balance by 1.01% per month. We want to try to line up the numbers and headings using number formatting and alignment. DELIVERABLES A source code Python file . A Word document containing both source code and the screen print of the program outputs LAB STEPS Sample Output: The output should be something similar to the following es RESTART:C:/Users/owner/Documents/PythonPrograms/1ab4new. py The Money Savings Program your starting balance: 1000 Enter ear 2019 2020 2021 2022 2023 10 12 1000.00 1010.00 1020.10 1030.30 1040.60 1051.01 1061.52 1072.14 1082.86 1093.69 1104.62 1115.67 1126,83 1138.09 1149.47 1160.97 1172.58 1184.30 1196.15 1208.11 1220.19 1232.39 1244.72 1257.16 1269.73 1282.43 1295.26 1308.21 1321.29 1334.50 1347.85 1361.33 1374.94 1388. 69 1402.58 1416.60 1430.77 1445.08 1459.53 1474.12 1488.86 1503.75 1518.79 1533.98 1549.32 1564.81 1580.46 1596.26 1612.23 1628.35 1644.63 1661.08 1677.69 1694-47 1711.41 1728.52 1745.81 1763.27 1780.90 1798.71 Directions: 1. Open IDLE and start a new file 2. From the file window, save the file in a location of your choosing with a meaningful name. This is the py file 3. Put a Documentation header at the top with the Program name, your name as Programmer, today’s date and the Purpose of the program. Add other comments to your code 4. Begin your code with the shebang line for Python 3 #1/usr/bin/env python3 5. Display: “The Money Savings Program 6. Ask the user for the starting amount which should be 5000 or less. No error checking required but optional 7. Print a row of column headers as shown in the example; we will want to align these over the numbers, but you can adjust them later with alignment formatting, this can be done with a for loop but that is not required 8. Start the outer loop that should loop five times; you will add 1 to the year each time for the row headers 9. Use an inner loop that prints 12 balances, after each one is printed, multiply the balance by 1.01 for the 10. NOTE: When printing the row of numbers, you will want to use the end function with the print so you stay on the 11. Play around with the formatting and alignment until your output looks good. You may want to enlarge the compounding interest. See the example output. same line and add spaces between the columns Python shell or console window so the entire row of numbers is displayed on a single line without wrapping Show transcribed image text TITLE OF LAB: COMPOUND INTEREST TABLE SUMMARY This Lab will use nested loops to create a table showing how some money can grow from month to month with compounded interest. The user will enter the initial balance. Then the program will print a table similar to the one shown below that has one row per year for five years. The months are numbered from 1 to 12 along the top of the table and the years are shown in the first column of the table. The interest rate will be 12% annually so we will grow the balance by 1.01% per month. We want to try to line up the numbers and headings using number formatting and alignment. DELIVERABLES A source code Python file . A Word document containing both source code and the screen print of the program outputs LAB STEPS Sample Output: The output should be something similar to the following es RESTART:C:/Users/owner/Documents/PythonPrograms/1ab4new. py The Money Savings Program your starting balance: 1000 Enter ear 2019 2020 2021 2022 2023 10 12 1000.00 1010.00 1020.10 1030.30 1040.60 1051.01 1061.52 1072.14 1082.86 1093.69 1104.62 1115.67 1126,83 1138.09 1149.47 1160.97 1172.58 1184.30 1196.15 1208.11 1220.19 1232.39 1244.72 1257.16 1269.73 1282.43 1295.26 1308.21 1321.29 1334.50 1347.85 1361.33 1374.94 1388. 69 1402.58 1416.60 1430.77 1445.08 1459.53 1474.12 1488.86 1503.75 1518.79 1533.98 1549.32 1564.81 1580.46 1596.26 1612.23 1628.35 1644.63 1661.08 1677.69 1694-47 1711.41 1728.52 1745.81 1763.27 1780.90 1798.71 Directions: 1. Open IDLE and start a new file 2. From the file window, save the file in a location of your choosing with a meaningful name. This is the py file 3. Put a Documentation header at the top with the Program name, your name as Programmer, today’s date and the Purpose of the program. Add other comments to your code 4. Begin your code with the shebang line for Python 3 #1/usr/bin/env python3 5. Display: “The Money Savings Program 6. Ask the user for the starting amount which should be 5000 or less. No error checking required but optional 7. Print a row of column headers as shown in the example; we will want to align these over the numbers, but you can adjust them later with alignment formatting, this can be done with a for loop but that is not required 8. Start the outer loop that should loop five times; you will add 1 to the year each time for the row headers 9. Use an inner loop that prints 12 balances, after each one is printed, multiply the balance by 1.01 for the 10. NOTE: When printing the row of numbers, you will want to use the end function with the print so you stay on the 11. Play around with the formatting and alignment until your output looks good. You may want to enlarge the compounding interest. See the example output. same line and add spaces between the columns Python shell or console window so the entire row of numbers is displayed on a single line without wrapping

Expert Answer


Answer to TITLE OF LAB: COMPOUND INTEREST TABLE SUMMARY This Lab will use nested loops to create a table showing how some money ca… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *