{"id":36493,"date":"2016-04-27T22:05:12","date_gmt":"2016-04-28T03:05:12","guid":{"rendered":"http:\/\/linecodesite.wordpress.com\/?p=264"},"modified":"2016-04-27T23:04:41","modified_gmt":"2016-04-28T04:04:41","slug":"exam2-wsq13-2","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2016\/2016\/04\/exam2-wsq13-2\/","title":{"rendered":"Exam2 WSQ13"},"content":{"rendered":"<p>Well kind of late but here are my codes from the partial exam, \u00a0I will leave links for my codes in Github, hopefully you&#8217;ll find useful.<\/p>\n<ol>\n<li>Write a function called triangles which receives a single parameter (int) which represents the size of a triangle. The function should print a triangle using loops (for or while). The only characters printed here are &#8216;T&#8217; and the new-line character. The first line is length one, the middle line is length size and the last line is length one.\u00a0<a href=\"https:\/\/github.com\/linecodeSite\/TC101-tasks-winter2016\/blob\/master\/Triangles%20Partial%20Exam%202\" >Link to GitHub<\/a><\/li>\n<\/ol>\n<p><img decoding=\"async\" class=\" size-full wp-image-275 aligncenter\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/78dbc9027209fa47da26a06080128ad2.jpg\" alt=\"Captura de pantalla 2016-04-27 a las 9.54.41 p.m..png\"   \/><\/p>\n<div class=\"page\" title=\"Page 2\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<ol start=\"2\">\n<li>Write a function called superpower that has two parameters of type long and returns a long which\u00a0is first parameter raised to the power of the second, which is to say it returns a^b.\u00a0<a href=\"https:\/\/github.com\/linecodeSite\/TC101-tasks-winter2016\/blob\/master\/Superpower%20Partial%20Exam%202\" >Link to GitHub<\/a>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-283\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/13eddc6c7fe51cf05e77ed5da500aab7.jpg\" alt=\"Captura de pantalla 2016-04-27 a las 9.59.14 p.m..png\"   \/>&nbsp;<\/li>\n<li>Write a function called fibonacci which receives a long \u201cn\u201d and returns a long which is the value of the nth number in the fibonacci series which is: 0,1,1,2,3,5,8,13,21,34,55,89&#8230;&#8230;&#8230;&#8230;<br \/>\nSo, fibonacci(0) would return 0. fibonacci(5) would return 5, fibonacci(8) would return 21.<br \/>\nNote that the first two fibonacci numbers are 0 and 1.<br \/>\nAll others are the sum of the previous two fibonacci numbers.\u00a0<a href=\"https:\/\/github.com\/linecodeSite\/TC101-tasks-winter2016\/blob\/master\/Fibonacci-Partial-Exam-2\" >Link to GitHub<\/a><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-289\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/751a2af866fc22ae764db130acd38cdb.jpg\" alt=\"Captura de pantalla 2016-04-27 a las 10.02.25 p.m..png\"   \/><\/li>\n<\/ol>\n<ol start=\"2\">\n<li>Write a function called isPalindrome which receives a string \u201cx\u201d and returns true if the string x is a palindrome, otherwise false.\u00a0<a href=\"https:\/\/github.com\/linecodeSite\/TC101-tasks-winter2016\/blob\/master\/Palindrome%20Partial%20Exam%202\" >Lint to GitHub<\/a>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-294\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/d26986b6b5b381c7abb3d46411e913a6.jpg\" alt=\"Captura de pantalla 2016-04-27 a las 10.04.27 p.m..png\"   \/><\/li>\n<\/ol>\n<div class=\"page\" title=\"Page 2\"><\/div>\n<div class=\"page\" title=\"Page 2\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/linecodesite.wordpress.com\/264\/\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/c5a76676c947f98e3775f0e993425c51.jpg\" \/><\/a> <img loading=\"lazy\" decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/04\/63538f99ec75a8f0fa025342a9c71549.jpg#038;blog=105404964&#038;%23038;post=264&#038;%23038;subd=linecodesite&#038;%23038;ref=&#038;%23038;feed=1\" width=\"1\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well kind of late but here are my codes from the partial exam, \u00a0I will leave links for my codes in Github, hopefully you&#8217;ll find useful. Write a function called triangles which receives a single parameter (int) which represents the size of a triangle. The function should print a triangle using loops (for or while). &hellip; <a href=\"https:\/\/kenscourses.com\/tc101winter2016\/2016\/04\/exam2-wsq13-2\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Exam2 WSQ13<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":36495,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[114,31,112,44,243,41],"class_list":["post-36493","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-keepcoding","tag-tc101","tag-tc101winter","tag-wsq13","tag-programming-c","tag-wsqs"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/36493","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/comments?post=36493"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/36493\/revisions"}],"predecessor-version":[{"id":36506,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/36493\/revisions\/36506"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media\/36495"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media?parent=36493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/categories?post=36493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/tags?post=36493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}