Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.2 KB

File metadata and controls

37 lines (24 loc) · 1.2 KB

6.1: Simple Interest


The Problem

You borrowed $5000 for 2 years with 2% interest per year. Calculate the simple interest to know how much you have to pay?

Hint

Just take amount, duration and interest rate.

You have to multiply these three. And, don’t forget: you have to convert percent to a fraction by dividing it by 100.

The Solution

principle=int(input("Money you borrowed: ")) interest_rate=float(input("Interest Rate: ")) time=float(input("Overall Duration: ")) # Calculates simple interestsimple_interest=principle* (interest_rate/100) *timeprint("Simple interest is:", simple_interest)

Try it on Programming Hero

Explanation

Read the code. I think you don’t need any extra explanation here.

  Next Page  

tags: programming-heropythonpython3problem-solvingprogrammingcoding-challengeinterviewlearn-pythonpython-tutorialprogramming-exercisesprogramming-challengesprogramming-fundamentalsprogramming-contestpython-coding-challengespython-problem-solving

close