Computer Science, asked by sneha3999, 8 months ago

A bank accepts fixed deposits (FDs) and the policy it adopts on interest is as follows- (I)-if a deposit is for less than Rs. 10001 for 3or more years, the interest rate is 6%.
(ii)- if a deposit is between Rs. 10001 and Rs. 50000 for 3 or more years, the interest rate is 7.5%.
(iii) -if a deposit is for more than Rs. 50000 for 1 year or more ,the interest rate is 8%.
(iv) On all other deposits for more than 5 years , the interest rate is 9 %.
(v)- On all other deposits non covered in the above conditions , the interest rate is 4.5%.
Given the amount deposited and the number of years . write a program to calculate the compound interest given to the customer for his /her FD.
plz tell me the answer as soon as possible .​

Answers

Answered by Equestriadash
14

con = "YES"

while con == "YES" or con == "NO":

   fd = float(input("Enter the amount [in Rupees]: "))

   years = float(input("Enter the time period [in years]: "))

   n = int(input("Enter the number of times you'd like the interest to be compounded: "))

   print(fd, "is your fixed deposit amount for", years, "years.")

   choice = input("Do you confirm? [YES/NO]: ")

   if choice == "YES":

       if fd > 10001 and fd < 50000 and years >= 3:

           rate = 7.5/100

           print("Your interest rate is 7.5%")

       elif fd > 50000 and years >= 1:

           rate = 8/100

           print("Your interest rate is 8%.")

       elif years > 5:

           rate = 9/100

           print("Your interest rate is 9%.")

       else:

           rate = 4.5

           print("Your interest rate is 4.5%.")

       print(fd*(1 + rate/n)**(n*years), "is your final compound interest.")

       print()

       con = input("Would you like to go ahead with further transactions? [YES/NO]: ")

       print()

   else:

       con = "NO"

       print()


Equestriadash: Thanks for the Brainliest! ♥
Answered by krrew
4

Answer:

con = "YES"

while con == "YES" or con == "NO":

  fd = float(input("Enter the amount [in Rupees]: "))

  years = float(input("Enter the time period [in years]: "))

  n = int(input("Enter the number of times you'd like the interest to be compounded: "))

  print(fd, "is your fixed deposit amount for", years, "years.")

  choice = input("Do you confirm? [YES/NO]: ")

  if choice == "YES":

      if fd > 10001 and fd < 50000 and years >= 3:

          rate = 7.5/100

          print("Your interest rate is 7.5%")

      elif fd > 50000 and years >= 1:

          rate = 8/100

          print("Your interest rate is 8%.")

      elif years > 5:

          rate = 9/100

          print("Your interest rate is 9%.")

      else:

          rate = 4.5

          print("Your interest rate is 4.5%.")

      print(fd*(1 + rate/n)**(n*years), "is your final compound interest.")

      print()

      con = input("Would you like to go ahead with further transactions? [YES/NO]: ")

      print()

  else:

      con = "NO"

      print()

Similar questions