{"id":34821,"date":"2016-04-04T23:50:21","date_gmt":"2016-04-05T04:50:21","guid":{"rendered":"http:\/\/batmantec.wordpress.com\/?p=323"},"modified":"2016-04-04T23:55:00","modified_gmt":"2016-04-05T04:55:00","slug":"quiz-5-10","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2016\/2016\/04\/quiz-5-10\/","title":{"rendered":"Quiz 5"},"content":{"rendered":"<p>Hey there, I am finally uploading all the Quiz, here I leave you the explanation for each one of the 2 problems of the Quiz 5 and how I solve it.<\/p>\n<p>Part 1:<\/p>\n<p>The part one of the Quiz was a little bit like the #YoSoy196 but it was a little bit different because for flipping the word I look on the internet for a different method because the one I use on the program that look for Lychrel numbers it uses a function to flip number using mod, but this time it was completely different, but in the process of checking it was the same as the #YoSoy196.<\/p>\n<p>Here is what our teacher asked for:<\/p>\n<ul>\n<li>Create a function called is_palindrome which receives a string as a parameter and\u00a0returns true if that string is a palindrome, false otherwise. Remember that a palindrome\u00a0is a word that is the same forward or backward. For full points your function must ignore\u00a0case and must work with any character (not just letters).\u00a0So (\u201cDad$dad\u201d is a palindrome even though the D is capital and d is lower case).<\/li>\n<\/ul>\n<p>You can check the hall assignment on this link:\u00a0<a href=\"http:\/\/kenscourses.com\/tc101winter2016\/2016\/03\/quiz-05\/\" >http:\/\/kenscourses.com\/tc101winter2016\/2016\/03\/quiz-05\/<\/a><\/p>\n<p>Here is the link for the program:\u00a0<a href=\"https:\/\/gist.github.com\/batmantec\/24c127e27fef36fed4d21c167b529ec5\" >https:\/\/gist.github.com\/batmantec\/24c127e27fef36fed4d21c167b529ec5<\/a><\/p>\n<p>Here is the pictures of the program running:<\/p>\n<p><img decoding=\"async\" class=\" size-full wp-image-354 aligncenter\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/c58e684c62a63a398d5f1865e14e57a0.jpg\" alt=\"Quiz5-1\"   \/><\/p>\n<p>Part 2:<\/p>\n<p>For the part 2 it was somehow easier for me to get it done, because I didn&#8217;t need to look on the internet \u00a0for doing it. I just recall some knowledge that I had before it from other programs.<\/p>\n<p>Here is what our teacher asked for:<\/p>\n<ul>\n<li>Create a function called find_threes that receives as a parameter a list (or Vector or array for C++ students) of numbers and\u00a0returns the sum of all numbers in that list that are evenly divisible by 3. Note if using vectors,\n<div class=\"post-limited-image\"><img decoding=\"async\" class=\" size-full wp-image-347 aligncenter\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/442a32d82a311185fe311b2ab9d03a2a.jpg\" alt=\"Quiz5-2\"   \/><\/div>\n<div class=\"post-limited-image\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/efe48276a335d9667d3cbfca43f18ad5.jpg\" \/><\/div>\n<div class=\"post-limited-image\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/1e36f66e227730457f2a4f8201a8122c.jpg#038;blog=105220712&#038;%23038;post=323&#038;%23038;subd=batmantec&#038;%23038;ref=&#038;%23038;feed=1\" width=\"1\" height=\"1\" \/><\/div>\n<p><!--more--> will need an additional parameter to represent the number of numbers in the array.\u00a0So if the list was [0,4,2,6,9,8,3,12], the function would return 30 (0+6+9+3+12)<\/li>\n<\/ul>\n<p>You can check the hall assignment on this link:\u00a0<a href=\"http:\/\/kenscourses.com\/tc101winter2016\/2016\/03\/quiz-05\/\" >http:\/\/kenscourses.com\/tc101winter2016\/2016\/03\/quiz-05\/<\/a><\/p>\n<p>Here is the link for the program:\u00a0<a href=\"https:\/\/gist.github.com\/batmantec\/3085ef3cb8ead203c68cf8f33abbcd85\" >https:\/\/gist.github.com\/batmantec\/3085ef3cb8ead203c68cf8f33abbcd85<\/a><\/p>\n<p>Here is the pictures of the program running:<\/p>\n<p><img decoding=\"async\" class=\" size-full wp-image-347 aligncenter\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/442a32d82a311185fe311b2ab9d03a2a.jpg\" alt=\"Quiz5-2\"   \/><\/p>\n<p>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/batmantec.wordpress.com\/323\/\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/efe48276a335d9667d3cbfca43f18ad5.jpg\" \/><\/a> <img loading=\"lazy\" decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/1e36f66e227730457f2a4f8201a8122c.jpg#038;blog=105220712&#038;%23038;post=323&#038;%23038;subd=batmantec&#038;%23038;ref=&#038;%23038;feed=1\" width=\"1\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey there, I am finally uploading all the Quiz, here I leave you the explanation for each one of the 2 problems of the Quiz 5 and how I solve it. Part 1: The part one of the Quiz was a little bit like the #YoSoy196 but it was a little bit different because for &hellip; <a href=\"https:\/\/kenscourses.com\/tc101winter2016\/2016\/04\/quiz-5-10\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Quiz 5<\/span><\/a><\/p>\n","protected":false},"author":10,"featured_media":34822,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[209,58],"class_list":["post-34821","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-quiz5","tag-c"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/34821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/comments?post=34821"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/34821\/revisions"}],"predecessor-version":[{"id":34830,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/34821\/revisions\/34830"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media\/34822"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media?parent=34821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/categories?post=34821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/tags?post=34821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}