{"id":204941,"date":"2025-05-29T08:12:55","date_gmt":"2025-05-29T00:12:55","guid":{"rendered":"https:\/\/server.hk\/cnblog\/204941\/"},"modified":"2025-05-29T08:12:55","modified_gmt":"2025-05-29T00:12:55","slug":"%e7%bc%96%e5%86%99-emi-%e8%ae%a1%e7%ae%97%e5%99%a8%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/204941\/","title":{"rendered":"\u7f16\u5199 EMI \u8ba1\u7b97\u5668\u7a0b\u5e8f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>\u7f16\u5199 EMI \u8ba1\u7b97\u5668\u7a0b\u5e8f<\/h1>\n<p>\u5077\u5077\u52aa\u529b\uff0c\u6084\u65e0\u58f0\u606f\u5730\u53d8\u5f3a\uff0c\u7136\u540e\u60ca\u8273\u6240\u6709\u4eba\uff01\u54c8\u54c8\uff0c\u5c0f\u4f19\u4f34\u4eec\u53c8\u6765\u5b66\u4e60\u5566~\u4eca\u5929\u6211\u5c06\u7ed9\u5927\u5bb6\u4ecb\u7ecd<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300a\u7f16\u5199 EMI \u8ba1\u7b97\u5668\u7a0b\u5e8f\u300b<\/span>\uff0c\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u4f1a\u8bb2\u5230<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u4e0d\u77e5\u9053\u5927\u5bb6\u5bf9\u5176\u90fd\u6709\u591a\u5c11\u4e86\u89e3\uff0c\u4e0b\u9762\u6211\u4eec\u5c31\u4e00\u8d77\u6765\u770b\u4e00\u5427\uff01\u5f53\u7136\uff0c\u975e\u5e38\u5e0c\u671b\u5927\u5bb6\u80fd\u591a\u591a\u8bc4\u8bba\uff0c\u7ed9\u51fa\u5408\u7406\u7684\u5efa\u8bae\uff0c\u6211\u4eec\u4e00\u8d77\u5b66\u4e60\uff0c\u4e00\u8d77\u8fdb\u6b65\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241119\/1732024851673c9a13d19c5.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>emi \u8ba1\u7b97\u5668\uff1a<\/strong><\/p>\n<p>emi \u8ba1\u7b97\u5668\u53ef\u5e2e\u52a9\u60a8\u8f7b\u677e\u4f30\u7b97\u6bcf\u6708\u5206\u671f\u4ed8\u6b3e\u3002\u4e00\u65e6\u60a8\u8f93\u5165\u5fc5\u8981\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u4f8b\u5982\u8d37\u6b3e\u91d1\u989d\u3001\u8d37\u6b3e\u671f\u9650\u548c\u5229\u7387\uff0c\u94f6\u884c\u7684 emi \u8ba1\u7b97\u5668\u5c06\u7acb\u5373\u663e\u793a\u60a8\u4f30\u8ba1\u7684\u7b49\u503c\u6bcf\u6708\u5206\u671f\u4ed8\u6b3e (emi)\u3002<\/p>\n<p>\u8981\u8ba1\u7b97 emi\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u516c\u5f0f\uff1a<\/p>\n<p><strong>emi = [p x r x ( 1 + r )^n] \/ [( 1 + r )^n -1]<\/strong><\/p>\n<p>\u5730\u70b9\uff1a<\/p>\n<p>p = \u672c\u91d1<\/p>\n<p>r = \u6708\u5229\u7387\uff08\u5e74\u5229\u7387\/12\u4e2a\u6708\uff09<\/p>\n<p>n = \u8d37\u6b3e\u671f\u9650\uff08\u4ee5\u6708\u4e3a\u5355\u4f4d\uff09<\/p>\n<p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n<pre># input the loan amount\nloan = int(input(\"enter the loan amount: \"))\n\n# input the loan tenure in years and convert to months\ntenure_year = int(input(\"enter the loan tenure in years: \"))\ntenure_month = tenure_year * 12  # convert years to months\nprint(\"loan tenure in months:\", tenure_month)\n\n# input the interest rate per year and convert to monthly interest rate\ninterest_year = float(input(\"enter the interest per year: \"))\ninterest_month = interest_year \/ 12 \/ 100  # convert annual interest rate to monthly decimal rate\nprint(\"interest per month in percentage:\", interest_month)\n\n# calculate emi using the formula\nemi = loan * (interest_month * (1 + interest_month) ** tenure_month) \/ ((1 + interest_month) ** tenure_month - 1)\n\n# display the calculated emi, rounded to 2 decimal places\nprint(\"emi:\", round(emi, 2))\n<\/pre>\n<p><strong>\u8f93\u51fa\uff1a<\/strong><\/p>\n<pre>Enter the loan amount:500000\nEnter the loan tenure in years :10\nLoan tenure in months: 120\nEnter the interest per year:3.5\nInterest per month in percentage: 0.002916666666666667\nEMI: 4944.29\n\n\n<\/pre>\n<p>\u4eca\u5929\u5e26\u5927\u5bb6\u4e86\u89e3\u4e86\u7684\u76f8\u5173\u77e5\u8bc6\uff0c\u5e0c\u671b\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff1b\u5173\u4e8e\u6587\u7ae0\u7684\u6280\u672f\u77e5\u8bc6\u6211\u4eec\u4f1a\u4e00\u70b9\u70b9\u6df1\u5165\u4ecb\u7ecd\uff0c\u6b22\u8fce\u5927\u5bb6\u5173\u6ce8\u516c\u4f17\u53f7\uff0c\u4e00\u8d77\u5b66\u4e60\u7f16\u7a0b~<\/p>\n<p>      \u7248\u672c\u58f0\u660e \u672c\u6587\u8f6c\u8f7d\u4e8e\uff1adev.to \u5982\u6709\u4fb5\u72af\uff0c\u8bf7\u8054\u7cfb\u5220\u9664<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7f16\u5199 EMI \u8ba1\u7b97\u5668\u7a0b\u5e8f \u5077\u5077\u52aa&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-204941","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/204941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=204941"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/204941\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=204941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=204941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=204941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}