From dfcc85886a69e538fda46428d9a1585b6cdbda7b Mon Sep 17 00:00:00 2001 From: acevest Date: Fri, 21 Oct 2022 20:07:51 +0800 Subject: [PATCH] ... --- tools/comm/EqualPrincipalAndInterest.py | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 tools/comm/EqualPrincipalAndInterest.py diff --git a/tools/comm/EqualPrincipalAndInterest.py b/tools/comm/EqualPrincipalAndInterest.py new file mode 100755 index 0000000..d5d4c9e --- /dev/null +++ b/tools/comm/EqualPrincipalAndInterest.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------ +# File Name: EqualPrincipalAndInterest.py +# Author: Zhao Yanbai +# 2022-05-25 18:36:12 Wednesday CST +# Description: none +# ------------------------------------------------------------------------ + +import math + +total = 420*10000 +year=30 +yearRate = 0.0588 + + +monthCount = year * 12 +monthRate = yearRate / 12.0 + + + +r = math.pow(1+monthRate, monthCount) + +X = total*monthRate*r / (r - 1) + +X = round(X, 2) + +print(X) -- 2.44.0