1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Allisa [31]
3 years ago
9

Write a program that calculates and displays the amount ofmoney available in a bank account that initially has $8000 deposited i

n it and that earns interest atthe rate of 2.5 percent a year. Your program should display the amount available at the end of eachyear for a period of 10 years. Use the relationship that the money available at the end of each yearequals the amount of money in the account at the start of the year plus 0.025 times the amountavailable at the start of the year [20 points].
Computers and Technology
1 answer:
Leviafan [203]3 years ago
6 0

Answer:

Written in Python

import math

principal = 8000

rate = 0.025

for i in range(1, 11):

    amount = principal + principal * rate

    principal = amount

    print("Year "+str(i)+": "+str(round(amount,2)))

Explanation:

This line imports math library

import math

This line initializes principal amount to 8000

principal = 8000

This line initializes rate to 0.025

rate = 0.025

The following is an iteration from year 1 to 10

for i in range(1, 11):

    This calculates the amount at the end of the year

    amount = principal + principal * rate

    This calculates the amount at the beginning of the next year

    principal = amount

    This prints the calculated amount

    print("Year "+str(i)+": "+str(round(amount,2)))

You might be interested in
Write an ALTER TABLE statement that adds two new columns to the Products table: one column for product price that provides for t
matrenka [14]

Answer:

ALTER TABLE Products

ADD Products_price float(5,2) DEFAULT 9.99,

ADD Adding_time datetime;

Explanation:

So at first we need to use ALTER TABLE statement, when we use this statement we also need to provide the table name. In this case, i assume it is 'Products'.

Then, as per question, we need to add two columns.

The first one is 'product_price' and it contains decimal points. So, we need to use ADD statement and give a column name like 'Prodcuts_price' and its datatype 'float' because it contains decimal or floating points. so, for 3 digits on the left and 2 digits on the right, it makes a total of 5 digits. So, we need to declare it like this. (5,2) it means a total of 5 digits and 2 after the decimal point. after that, we need to set our Default value using the DEFALUT statement. so DEFAULT 9.99. it will set the default value to 9.99 for existing products.

And for our next column, we give its a name like 'Adding_time' then it's datatype 'datetime' because it will contain date and times.

8 0
3 years ago
What are some ways in which reading and writing have changed in our newly networked world
olga_2 [115]
Reading and writing have given us both a way to pass on knowledge and learn things we cant learn first hand.<span />
3 0
3 years ago
1.How can we be a responsible online user???​
PSYCHO15rus [73]

Answer:

Be respectful – and expect respect.

Protect your reputation.

Protect your privacy.

Watch your tone.

Be sceptical.

3 0
2 years ago
Read 2 more answers
From what tab can you format individual cell data like any other text?
Readme [11.4K]
I think the answer is D
5 0
3 years ago
Which of the following strategies might be useful when organizing items in your study area?
grin007 [14]
Once you organize your desk, you don't need to do anything else .
3 0
2 years ago
Other questions:
  • In a spreadsheet, what is the rectangular space where a row meets a column?
    5·2 answers
  • Is it possible to uninstall a program that's on your phone from computer?
    8·1 answer
  • The ---------------initiates a message by encoding theidea (or a thought) in words or symbols and sends it to areceiver.ChannelS
    10·1 answer
  • 1.How does inertia affect a person who is not wearing a seatbelt during a collision?
    10·1 answer
  • Find the simple interest Jay owes on a five-year student loan of $48,000 with an annual interest rate of 5%.
    6·1 answer
  • Do you get notified if someone follows you on Spotify like your email or do you just have to find out on your own
    14·1 answer
  • Byte pair encoding is a data encoding technique. The encoding algorithm looks for pairs of characters that appear in the string
    14·1 answer
  • A person who breaks into a computer, network, or online site is called
    14·2 answers
  • 19. Fatigue can help improve your reaction time.<br> False<br> O True
    8·2 answers
  • susan wrote the recursive formula for the sequence represented by the exploit formula An=3+2n. put an C net to any correct state
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!