Answer:
it's all up to personal preference some different ones have upsides and downsides but it's more of what you feel is best
1. spreadsheet
2. Computers will continue to become smaller in size and become faster
def dx(fn, x, delta=0.001):
return (fn(x+delta) - fn(x))/delta
def solve(fn, value, x=0.5, maxtries=1000, maxerr=0.00001):
for tries in xrange(maxtries):
err = fn(x) - value
if abs(err) < maxerr:
return x
slope = dx(fn, x)
x -= err/slope
raise ValueError('no solution found')
Answer:
PRINT "Values for Principal (P), Rate (A) and Time (T)"
INPUT P, A, T
I = P * A * T/100
Amount = P + I
PRINT "Interest: ", I
PRINT "Amount: ", Amount
Explanation:
This prompts the user for values for Principal, Rate and Time
PRINT "Values for Principal (P), Rate (A) and Time (T)"
This gets values for Principal (P), Rate (R) and Time (T)
INPUT P, A, T
This calculates the interest (I)
I = P * A * T/100
This calculates the amount (A)
Amount = P + I
This prints the interest (I)
PRINT "Interest: ", I
This prints the amount (A)
PRINT "Amount: ", Amount