习题8.9

import numpy as np
import pandas as pd
import sympy as sp
sp.init_printing(use_latex=True)
from scipy.integrate import odeint
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif']=['Times New Roman + SimSun + WFM Sans SC']
plt.rcParams['mathtext.fontset']='stix'
# Times New Roman + SimSun + WFM Sans SC
# simsum宋体, times new roman -*, simhei黑体, kaiti楷体,
# dengxian等线, fangsong仿宋, Microsoft Yahei微软雅黑
plt.rcParams['axes.unicode_minus']=False
plt.rcParams['figure.dpi'] = 200
# plt.rcParams['figure.figsize'] = [4, 3]
# plt.rcParams['font.size'] = 12
plt.rcParams['xtick.direction']='in'
plt.rcParams['ytick.direction']='in'
Q = 60e4 - 20e4         # 贷款总额
r = 0.36/100    # 月利率
N = 30*12         # 总月数 (还款期限)
x = np.round((1+r)**N*Q*r / ((1+r)**N - 1), 2)
print("每月还款:", x)
print("总还款额:", x*N)
print("我的学号是: 31")

posted @ 2024-11-19 18:36  等我刷把宗师  阅读(4)  评论(0编辑  收藏  举报