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
trapecia [35]
2 years ago
9

write an algorithm to settle the following question: a bank account starts out with $10,000. interest is compounded monthly at 6

percent per year (0.5 percent per month). every month, $500 is withdrawn to meet college expenses. after how many years is the account depleted?
Computers and Technology
1 answer:
svp [43]2 years ago
7 0

Using the knowledge in computational language in python it is possible to write a code that write an algorithm to settle the following question.

<h3>Writting the code:</h3>

<em>original = float(raw_input("Enter initial balance: "))</em>

<em>interest = float(raw_input("Enter promised return: "))</em>

<em>expenses = float(raw_input("Enter monthly expenses: "))</em>

<em />

<em>interest = interest / 100 / 12</em>

<em>month = 0</em>

<em>balance = original</em>

<em />

<em>if balance * interest - expenses >= 0:</em>

<em>print "You don't need to worry."</em>

<em>else:</em>

<em>while balance + balance * interest - expenses >= 0: # negation of the if condition</em>

<em>balance = balance + interest * balance # in one month</em>

<em>balance = balance - expenses</em>

<em>month = month + 1</em>

<em>print month, balance</em>

<em />

<em>print month / 12, "years and", month % 12, "months"</em>

See  more about python at brainly.com/question/18502436

#SPJ1

You might be interested in
A class researching the world’s population would like to include a graph that shows historical changes. They have information fr
Elanso [62]

A professor who publishes world population research in a journal

3 0
3 years ago
Miley met up with a bunch of her college friends after several years. She told them that she works for the sound department of a
icang [17]

Answer: C

Explanation:

6 0
3 years ago
Ed has just finished typing a long financial report. Before he sends this report to shareholders, Ed should _____.
Anna35 [415]
Ed  should double check his work before <span>he sends this report to shareholders. He should do this if he wants to get a good grade.</span>
4 0
3 years ago
Read 2 more answers
Problem 4 (3 pts): Let n be a positive integer. Show that among any group of n 1 (not necessarily consecutive) positive integers
konstantin123 [22]

Answer:There are two integers in the group of n+1 integers with exactly the same remainder when they are divided by n.

Explanation:

Generally, if a number is divided by p(positive integer), then the possible remainders will be from 0 to p-1.

Here, the possible remainders when an integer is divided by n are 0,1,....,n-1

so the number of possible remainders when an integer is divided by n is n.

In this case, the number of objects is n+1 integers and the number of boxes (remainders) is n.

p/k = (n+1)/n

= 1+(1/n)

= 2

Here, 0<1/n<1

Add 1 on both sides to get the following

0+1 < 1+1/n<1+1

1<1+1/n<2

so the value of p/k = 2 means that there is atleast one remainder which is same for two integers when they are divided by n

There are therefore two integers in the group of n+1 integers with exactly the same remainder when they are divided by n.

3 0
4 years ago
Which engineer may design a GPS for a vehicle?
Crank

Explanation:

Mechanical engineer may design a gps for a vehicle.

4 0
3 years ago
Other questions:
  • your grandmother tells you a dollar doesn’t go as far as it used to. She says the “purchasing power” of a dollar is much less th
    6·1 answer
  • What is a Software Quality Assurance Audit?
    12·1 answer
  • Most of the pollution in the ocean comes from:
    11·1 answer
  • Define application pakage​
    5·2 answers
  • In ethical hacking testing, what approaches exist for the ethical hacker to choose from depending on how much information is kno
    10·2 answers
  • What are 7 key traits for knowing your audience
    6·2 answers
  • 1. ________ is often defined as using illicit (illegal) drugs, or when the drug is alcohol, tobacco, or a legitimate drug (presc
    13·1 answer
  • Which of the following is not a characteristic of a motorcycle?
    6·1 answer
  • PLEASE HELP ME FIX THIS CODE.
    10·1 answer
  • Question 2:
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!