1.

#Considering Python 3.xP=input("Enter Principal amount:")T=input("Enter Time:")if T>10:SI = P*T*10/100 °Celse:SI = 2*8*15/100print("Simple Interest = ",SI)principal amount is 20000 and time is 10 years​

Answer»

According to the PROGRAM.

P = 20000 and T = 10 years

So, Formula used in the program is .

S.I = P*T*15/100

so, At the first STEP ( if statement )

It EVALUATES false because 10 is not GREATER than 10. so it will move to the else block.

so,

S.I = 20000×10×15/100

S.I = 2000 × 15

S.I = 30000

OUPUT: Simple Interest = 30000



Discussion

No Comment Found