Computer Science, asked by surbhiyati90064, 6 months ago

write a program to calculate simple interest it principal amount,rate of interest and time is given,also calculate the compound interest.​

Answers

Answered by valeriy69
2

p = 696969 #principal amount

r = .07 #7% rate of interest

t = 10 #years

n = 1 #no of times its compounded in a year

simple_interest = p * ( 1 + r * t)

compound_interest = p * (1 + (r / n)) ** (n * t)

print(f"simple: {simple_interest - p}\ncompound: {compound_interest - p}")

\small\mathsf\color{lightblue}useful?\: \color{white}\mapsto\: \color{gold}brainliest

Similar questions