{"id":5796,"date":"2024-08-31T19:01:01","date_gmt":"2024-08-31T11:01:01","guid":{"rendered":""},"modified":"2024-08-31T19:01:01","modified_gmt":"2024-08-31T11:01:01","slug":"\u590d\u5229\u8ba1\u7b97\u5668_\u590d\u52293.0%\u7684\u4fdd\u9669\u503c\u5f97\u4e70\u5417","status":"publish","type":"post","link":"https:\/\/mushiming.com\/5796.html","title":{"rendered":"\u590d\u5229\u8ba1\u7b97\u5668_\u590d\u52293.0%\u7684\u4fdd\u9669\u503c\u5f97\u4e70\u5417"},"content":{"rendered":"

\n <\/path> \n<\/svg> <\/p>\n

def<\/span> compound_interest<\/span>(<\/span>num,<\/span>start=<\/span> 1<\/span>,<\/span>time=<\/span>0<\/span>,<\/span>P=<\/span>0<\/span>,<\/span>result=<\/span>[<\/span>]<\/span>)<\/span>:<\/span> N =<\/span> num*<\/span>P+<\/span>num print<\/span>(<\/span>'\u5f53\u524d\u7b2c'<\/span>+<\/span>start.<\/span>__repr__(<\/span>)<\/span>+<\/span>'\u671f,\u6bcf\u671f\u5229\u7387\u4e3a'<\/span>+<\/span>P.<\/span>__repr__(<\/span>)<\/span>+<\/span>',\u5f53\u524d\u672c\u606f\u4e3a:'<\/span>+<\/span>N.<\/span>__repr__(<\/span>)<\/span>)<\/span> if<\/span> time !=<\/span> 1<\/span>:<\/span> time -=<\/span> 1<\/span> start +=<\/span> 1<\/span> result.<\/span>append(<\/span>{ \n   <\/span>start-<\/span>1<\/span>:<\/span>N}<\/span>)<\/span> return<\/span> compound_interest(<\/span>N,<\/span>start,<\/span>time,<\/span>P)<\/span> else<\/span>:<\/span> result.<\/span>append(<\/span>{ \n   <\/span>start:<\/span>N}<\/span>)<\/span> return<\/span> result,<\/span>N compound_interest(<\/span>10000<\/span>,<\/span>time=<\/span>12<\/span>,<\/span>P=<\/span>0.003<\/span>)<\/span> compound_interest(<\/span>float<\/span>(<\/span>compound_interest(<\/span>20000<\/span>,<\/span>time=<\/span>12<\/span>,<\/span>P=<\/span>0.003<\/span>)<\/span>[<\/span>-<\/span>1<\/span>]<\/span>)<\/span>,<\/span>t .<\/span>.<\/span>.<\/span>:<\/span> ime=<\/span>20<\/span>,<\/span>P=<\/span>0.06<\/span>)<\/span> <\/code><\/pre>\n

num\u4e3a\u672c\u91d1
start \u4e3a\u521d\u59cb\u6b21\u6570\u503c\uff0c\u9ed8\u8ba4\u4e3a\u5efa\u8bae\u4e3a0
time \u4e3a\u8fed\u4ee3\u6b21\u6570
P\u4e3a\u5229\u606f\u6bd4\u4f8b<\/p>\n","protected":false},"excerpt":{"rendered":"\u590d\u5229\u8ba1\u7b97\u5668_\u590d\u52293.0%\u7684\u4fdd\u9669\u503c\u5f97\u4e70\u5417defcompound_interest(num,time,P=0.02):N=num*P+numprint(time)iftime=12:returnNelse:ti...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/5796"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=5796"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/5796\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=5796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=5796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=5796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}