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
Triss [41]
3 years ago
8

Write an algorithm to settle the following question:

Computers and Technology
1 answer:
Vesnalui [34]3 years ago
6 0

Answer:

<u>algorithm</u>

original = float(raw_input("Enter initial balance: "))

interest = float(raw_input("Enter promised return: "))

expenses = float(raw_input("Enter monthly expenses: "))

interest = interest / 100 / 12

month = 0

balance = original

if balance * interest - expenses >= 0:

print "You don't need to worry."

else:

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

balance = balance + interest * balance # in one month

balance = balance - expenses

month = month + 1

print month, balance

print month / 12, "years and", month % 12, "months"

You might be interested in
How to write a program converting RGB to CMYK in python
Arisa [49]

rgb_scale = 255

cmyk_scale = 100

def rgb_to_cmyk(r,g,b):

if (r == 0) and (g == 0) and (b == 0):

return 0, 0, 0, cmyk_scale

# rgb [0,255] -> cmy [0,1]

c = 1 - r / float(rgb_scale)

m = 1 - g / float(rgb_scale)

y = 1 - b / float(rgb_scale)

min_cmy = min(c, m, y)

c = (c - min_cmy)

m = (m - min_cmy)

y = (y - min_cmy)

k = min_cmy

return c*cmyk_scale, m*cmyk_scale, y*cmyk_scale, k*cmyk_scale

def cmyk_to_rgb(c,m,y,k):

r = rgb_scale*(1.0-(c+k)/float(cmyk_scale))

g = rgb_scale*(1.0-(m+k)/float(cmyk_scale))

b = rgb_scale*(1.0-(y+k)/float(cmyk_scale))

return r,g,b

5 0
3 years ago
A _____ describes two or more computers connected to each other.
Soloha48 [4]
I’m pretty sure it’s server
4 0
3 years ago
Read 2 more answers
Defination of formula bar​
laila [671]

Answer:

formula bar shows the contents of the current cell and allows you to create and view the formulas

6 0
3 years ago
Can you help please.
liberstina [14]
1. true
2.false
3.true
4. many - I'm not too certain of this answer
5. track changes
3 0
2 years ago
The IT infrastructure components should be evaluated based on their expected financial value. All of the following are used to q
vladimir2022 [97]

Answer:(A) usability

Explanation:

The term usability refers to the usage value of products, how much they can be used and their value after their use. So adding on these points usability helps to quantify the financial value of IT components.

5 0
3 years ago
Other questions:
  • How does microchip work
    12·1 answer
  • what aspect should you consider before adding pictures to a document? you should structure the first before you search for a rel
    15·2 answers
  • What is the acronym that helps you remember the order of math operations?
    9·2 answers
  • Diane is receiving a lot of unwanted e-mail. What steps can she take to reduce the amount of e-mail she receives?
    12·1 answer
  • Besides earning money why do people work​
    6·2 answers
  • Xavier wants to print the slides of his PowerPoint presentation to practice and make notes but doesn't want to use too much ink
    5·2 answers
  • Write an application named Hurricane that outputs a hurricane’s category based on the user’s input of the wind speed. Category 5
    7·1 answer
  • A network consists of 75 workstations and three servers. The workstations are currently connected to the network with 100 Mbps s
    12·1 answer
  • To what extent do you agree with the assertion that “Collection development begins with community analysis”. (Give reasons to bu
    7·1 answer
  • What do you think that the next version of IR (IR 5.0) will bring if it was discovered in near future? (hint:- advance IR 4.0 fe
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!