Loan1.0 algorithm made in Python