Hello, this quiz consisted on fulfilling two assignments: calculate the value of e with a given accuracy and open a file and search for the word banana and count them even if they are written in capital letters. The first question was a little tricky since I didn’t actually understand if it should calculate until the given accuracy and then output the value with certain decimals or just do the calculation, so I just set the precision to the number of repetitions required to get to the number. Here’s the code for that problem:<\/p>\n
https:\/ The last one was a bit more complicated, I had to do some research to understand how to open a file and then turn all of the information into something easier to interact with. Then I found this page: http:\/ https:\/ Thanks! #TC1017<\/a> #Quiz11<\/a><\/p>\n \u00a0<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":" Hello, this quiz consisted on fulfilling two assignments: calculate the value of e with a given accuracy and open a file and search for the word banana and count them even if they are written in capital letters. The first question was a little tricky since I didn’t actually understand if it should calculate until the given accuracy and then output the value with certain decimals or just do the calculation, so I just set the precision to the number of repetitions required to get to the number. Here’s the code for that problem:<\/p>\n https:\/\/github.com\/CarlosGallegosT\/Codes007\/blob\/master\/Q1.cpp<\/a><\/p>\n The last one was a bit more complicated, I had to do some research to understand how to open a file and then turn all of the information into something easier to interact with. Then I found this page: http:\/\/stackoverflow.com\/questions\/7868936\/read-file-line-byline<\/a>. Afterwards, I turned all of the string into lower case letters so when I searche for bananas it would also consider the ones with capital letters. I didn´t understood why it did not work when I hit the Enter button within the file, I guess I will ask about it in class. Anyway, here’s the code:<\/p>\n https:\/\/github.com\/CarlosGallegosT\/Codes007\/blob\/master\/Q2.cpp<\/a><\/p>\n Thanks! #TC1017<\/a> #Quiz11<\/a><\/p>\n <\/p>\n<\/div>\n","protected":false},"author":226,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[40,456],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26461"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/users\/226"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=26461"}],"version-history":[{"count":3,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26461\/revisions"}],"predecessor-version":[{"id":29992,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26461\/revisions\/29992"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=26461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=26461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=26461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}