PablO_CVi<\/span><\/a><\/p>\nIn this assignment you will estimate the mathematical constant e. You should create a function called calculuate_e which receives one parameter called precision that should specify the number of decimal points of accuracy.<\/span><\/span><\/p>\nHere is my code: <\/span><\/span><\/p>\ndef calculate_e(precision):<\/span><\/span><\/p>\n x = precision<\/span><\/span><\/p>\n e = (1+1\/x)**x<\/span><\/span><\/p>\n return float(e)<\/span><\/span><\/p>\nprecision=int(input(“How many decimals do you want?”))<\/span><\/span><\/p>\na = calculate_e(precision)<\/span><\/span><\/p>\nround(a,precision)<\/span><\/span><\/p>\nprint(“The estimate of the constant e is: “,a)<\/span><\/span><\/p>\n <\/p>\n
<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"
#WSQ14- Estimating e #TC1014 &nb… Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":46,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3,25],"tags":[166,144,190,182,45,391],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/10142"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/comments?post=10142"}],"version-history":[{"count":1,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/10142\/revisions"}],"predecessor-version":[{"id":10143,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/10142\/revisions\/10143"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/media?parent=10142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/categories?post=10142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/tags?post=10142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}