0% found this document useful (0 votes)
5 views

f22t3cs121-Lec4-The Meaning of Loops

Uploaded by

ricksonyonah24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

f22t3cs121-Lec4-The Meaning of Loops

Uploaded by

ricksonyonah24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

The meaning of loops

Prof Sane
1. What is a Computation / Program
a. Any steps of any sort that produce sequences of values in collections of boxes
2. Sequences of values
a. values of i → 1, 2, 3, 4, …
b. values of S → 1, 3, 6, 10, …
c. S(1) → 1*(1+1)/2, S(2) → 2*(2+1)/2 and so on
d. This formula S of 1 to n == n*(n+1)/2 is true for every step of the sequence
3. What is compound interest and if you can remember the formula or ideally
derive it.
4.
Derivation of Compound interest
a0 : P

a1 : a0 + a0*r ; a1 = a0(1 + r)

a2 : a1 + a1*r ; a2 = a1(1+r) ⇒ a0(1+r)(1+r) => a2 == a0 * (1+r)^2

an = a0 * (1 + r)^n
Rohan
Compound interest is a system for incurring interests on a principal amount.
Rather than applying the interest to the base amount like simple interest, it applies
it to the new value with the interest.
Pratik Patil
Compound interest is the interest on a loan or deposit calculated based on both
the initial principal and the accumulated interest from previous periods. The
formula for compound interest is A = P(1 + r/n)^(nt), where A is the final amount, P
is the principal, r is the annual interest rate, n is the number of times the interest is
compounded per year, and t is the number of years.
Pratik Patil2
Ishaan
Compound interest is interest calculated on a particular amount of money, which updates
after every iteration. This means that the interest rate stays constant, but the principal
amount increases by the amount of interest calculated in one unit of time.
Formula - A = P(1 + r/n)^nt
P - Principal Amount
r - Rate of Interest
n - Number of times interest is compounded per year
t - Time in Years
A - Amount
Mukund Tekriwal
Compound interest is when you are adding the interest earned by you into the principal amount after each interest term.

Amount = P [ 1 + r/100]^n

P = principal amount

r = rate per annum

n = number of years

Compound_interest = Amount - Principle

To use loops for calculating compound interest, use the simple interest formula for each year.
P
Deevankumar
Gurpreet
Interest on last year’s amount each time

((Amount * (interest/100)) * (interest/100)) … t times

Amount ( 1 + interest/100)^t
Nidhi
A = P * ( 1 + R/N)^NT
Kinjal
Compound interest increases from the amount of the interest accumulated from all
previous time periods.

Therefore i _x = (i_x-1) + (simple interest in xth time period)

And i_1 = (simple interest in 1st time period) WRONG


Bhargavi
Interest is added to the principal amount and interest for the successive time
periods is calculated on the new principal amount.
Aadit Shah
it is interest earned on (interest + principal)
Laya lakshminarayanan
principal + interest becomes the principal for the next year and interest is
calculated upon this new principal
Rishi
Compound Interest: Interest on the savings in the initial period and previous instances.

Formula: A = P( 1 + (r/n) )^nt

A= final amount

P= initial principal balance

r= interest rate

n= No of times interest per time period

t= No of time periods elapsed


Aria
● Earning interest on the initial money saved and the accumulated interest earnt
from the initial money as well
● Compound interest = P(1+r)^n*t

Ayesha
It is the addition of interest on a principal sum of loan over a particular period of time.

A = Final Amount
P = principal sum
R = rate of interest
N = number of times interest is compounded in a time period (usually a year)
T = time period
Formula => A = P(1 + (R/N)) ** (NT)
Kaavya Rajasekar

● A = amount
● P = principal
● r = rate of interest
● n = number of times interest is compounded per year
● t = time (in years)

A= P(1+ r/n) ^nt


Maanya
A= P(1+r/n)^nt
Muskan
Compound interest:
Final amount = principal balance ( 1 + interest rate(r) / no. of times interest applied per time
period(n) )^nt
Diya
Shatakshi barde

Compound interest is when you earn interest on both the money you've saved and the interest you earn.

The formula used to calculate compound interest is CI = P( 1 + r/100)n - P.

The compound interest formula can be derived with the help of of simple interest, formulas as shown below.

The formula for Sl is:

S.I = (PRT/100)

Where; P is the principal amount, R is the rate of interest and T denotes the time.
The simple interest = CI for one year

The SI for the first year is;

SI (first year) = (PxRxT) 100

Amount = SI+P

Hence, the amount after the 1st year = P+SI(first year)


Amount= P + (PRT)/100 = P(1 + (RT)/100) = P(1 + R/100)
Shatakshi barde (2)
Here T = 1 as we are calculating for one year.

This total amount is now the principal for second year as per the CI concept: Hence P(for second year) = P(1+R/100)

The SI for the second year is= (PRT/100)

Therefore, the amount after the 2nd year is again= SI+P= P(1 + R/100)

But here P = P(1 + R/100)

Hence, amount P(1 + R/100)(1 + R/100)

Amount (after second year) =P (1 + R/100) ^ 2


Similarly for n years,

Amount (A) = P(1+0)" R

Now, Cl = A - P

CI = P * (1 + R/100) ^ n - P

After simplification we get:

CI = P[(1 + R/100) ^ n - 1]

Hence proved.
Piya Shah
A = p(1+(r/100))^t
CI = A - p
A = amount
p = principle
r = rate of interest
t = time
CI = compound interest
Sneh Pahuja
What is compound interest

F = final amount
T = time
P = principal amount
R = rate of interest

F1 = P + P*r/100
For the next time period the new P, F1 becomes the new principal amount for interest
F2 = F1 + F1*r/100
= P+P*r/100 + {(P + P*r/100) * r /100}
= P(1 + r/100) + {P(1 + r/100)* r/100}
= P(1 + r/100)(1 + r/100)
= P (1 + r/100)^2 which is time t
= P(1 + r/100)^t
To get interest we have to subtract principal
= P(1 + r/100)^t - P

You might also like