{"id":35916,"date":"2016-04-08T21:26:45","date_gmt":"2016-04-09T02:26:45","guid":{"rendered":"http:\/\/edmoprogramming.wordpress.com\/?p=455"},"modified":"2016-04-08T22:05:38","modified_gmt":"2016-04-09T03:05:38","slug":"quiz-5-17","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2016\/2016\/04\/quiz-5-17\/","title":{"rendered":"QUIZ 5"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone size-full wp-image-470\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/84768132b1cdc9c2420e4bfd19f63975.jpg\" alt=\"42c150433839bad235f1f83925cf3875527c7bb3-vector-storefront_189303863\"   \/><\/p>\n<p>Hello people.<\/p>\n<p>I am here to post about the quiz that I made some days ago about two programs: One which has to:<\/p>\n<ol>\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<\/ol>\n<p>On this program I learned how to use vectors and make a palindrom with it, taking the word and then taking the reverse of the word, Yeah, vectors rules.<\/p>\n<p>To learn more about vectors on C: \u00a0http:\/\/www.cplusplus.com\/reference\/vector\/vector\/<\/p>\n<p>Here my code:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-466\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/19726d0d422ddeca8903157ceda1b258.jpg\" alt=\"q5\"   \/><\/p>\n<p>Running:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-465\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/93ea8822052a22232ec07abd12b663d8.jpg\" alt=\"palg\"   \/><\/p>\n<p>And the second one:<\/p>\n<ol>\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, you 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<\/ol>\n<p>Here, we have to use an array to get the range of numbers that we are going to use in our function &#8220;threes&#8221;. It was a little bit difficult but with the help of other students of the class I can make it.<\/p>\n<p>The code:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-475\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/07cda5b6e3577cb2dd913dfbee63ca6b.jpg\" alt=\"3\"   \/><\/p>\n<p>And running:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-476\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/aa957b42e9fad30e143075c1b4704d90.jpg\" alt=\"g3\"   \/><\/p>\n<p>To more information check all my codes on github and dont forget to make questions or add comments to stay in contact with me;D<\/p>\n<p><a href=\"https:\/\/github.com\/eduardomrlsg\/TC101\/blob\/master\/Quiz5Palindrome\" rel=\"nofollow\">https:\/\/github.com\/eduardomrlsg\/TC101\/blob\/master\/Quiz5Palindrome<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/eduardomrlsg\/TC101\/blob\/master\/Quiz5Threes\" rel=\"nofollow\">https:\/\/github.com\/eduardomrlsg\/TC101\/blob\/master\/Quiz5Threes<\/a><\/p>\n<p>Regards, EdMo.<\/p>\n<p>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/edmoprogramming.wordpress.com\/455\/\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/06c568ea27066be03c169ad918c14440.jpg\" \/><\/a> <img loading=\"lazy\" decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/756f421d941994c9e900f83a07b7a1fa.jpg#038;blog=105297467&#038;%23038;post=455&#038;%23038;subd=edmoprogramming&#038;%23038;ref=&#038;%23038;feed=1\" width=\"1\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello people. I am here to post about the quiz that I made some days ago about two programs: One which has to: 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 &hellip; <a href=\"https:\/\/kenscourses.com\/tc101winter2016\/2016\/04\/quiz-5-17\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">QUIZ 5<\/span><\/a><\/p>\n","protected":false},"author":25,"featured_media":35922,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[20,45],"class_list":["post-35916","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-quiz","tag-sin-categoria"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/35916","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\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/comments?post=35916"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/35916\/revisions"}],"predecessor-version":[{"id":35934,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/35916\/revisions\/35934"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media\/35922"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media?parent=35916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/categories?post=35916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/tags?post=35916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}