{"id":37894,"date":"2016-05-05T16:44:34","date_gmt":"2016-05-05T21:44:34","guid":{"rendered":"http:\/\/martikasblog.wordpress.com\/?p=532"},"modified":"2016-05-05T17:29:05","modified_gmt":"2016-05-05T22:29:05","slug":"fixing-mistakes","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2016\/2016\/05\/fixing-mistakes\/","title":{"rendered":"Fixing mistakes"},"content":{"rendered":"<p>This task is about fixing our programs made for the second partial. The problems were:<\/p>\n<blockquote>\n<div data-shortcode=\"caption\" id=\"attachment_537\" style=\"width: 109px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" class=\"  wp-image-537 alignleft\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/05\/bad68742b84ba2b57a450dca94ea2180.jpg#038;h=129\" alt=\"49139c2074d3fc239df813c0452a0907\" width=\"99\" height=\"129\" \/><\/p>\n<p class=\"wp-caption-text\">Got it from <a href=\"https:\/\/es.pinterest.com\/fairhurst\/triangle-pattern\/\" >Pinterest<\/a>.<\/p>\n<\/div>\n<p>Write a function called triangles which receives a single parameter (int) which represents the size of a triangle as explained below. 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.<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>The Second:<\/p>\n<blockquote>\n<p>Write a function called superpower that has two parameters of type long and returns a long which is first parameter raised to the power of the second, which is to say it returns a b So, superpower(3,4) would return 81.<\/p>\n<\/blockquote>\n<p>The Third:<\/p>\n<blockquote>\n<p>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; So, fibonacci(0) would return 0. fibonacci(5) would return 5, fibonacci(8) would return 21. Note that the first two fibonacci numbers are 0 and 1. All others are the sum of the previous two fibonacci numbers.<\/p>\n<\/blockquote>\n<p>The last one:<\/p>\n<blockquote>\n<p>Write a function called isPalindrome which receives a string \u201cx\u201d and returns true if the string x is a palindrome, otherwise false.<\/p>\n<\/blockquote>\n<p>You can see my solutions here. For making it I asked for help to my friend Edith, you can see her blog <a href=\"https:\/\/edithsantoscom.wordpress.com\/\" >here<\/a>.<\/p>\n<p><a href=\"https:\/\/github.com\/MartikaGlez\/Homeworks\/blob\/master\/Triangles%20with%20T%C2%B4s\">Triangles with T\u00b4s<\/a>,\u00a0<a href=\"https:\/\/github.com\/MartikaGlez\/Homeworks\/blob\/master\/SuperPower\">SuperPower<\/a>,\u00a0<a href=\"https:\/\/github.com\/MartikaGlez\/Homeworks\/blob\/master\/Palindrome\">Palindrome<\/a>,\u00a0<a href=\"https:\/\/github.com\/MartikaGlez\/Homeworks\/blob\/master\/Fibonacci\">Fibonacci<\/a>.<\/p>\n<p><a href=\"https:\/\/martikasblog.wordpress.com\/2016\/05\/05\/fixing-mistakes\/#gallery-532-3-slideshow\">Haga click para ver el pase de diapositivas.<\/a><br \/>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/martikasblog.wordpress.com\/532\/\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/05\/a6ce40d047b0e829f82b49aa9ea3aba2.jpg\" \/><\/a> <img loading=\"lazy\" decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/05\/ea72ddb43aa1fbe83773daa94222d0ca.jpg#038;blog=105343222&#038;%23038;post=532&#038;%23038;subd=martikasblog&#038;%23038;ref=&#038;%23038;feed=1\" width=\"1\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This task is about fixing our programs made for the second partial. The problems were: Got it from Pinterest. Write a function called triangles which receives a single parameter (int) which represents the size of a triangle as explained below. The function should print a triangle using loops (for or while). The only characters printed &hellip; <a href=\"https:\/\/kenscourses.com\/tc101winter2016\/2016\/05\/fixing-mistakes\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Fixing mistakes<\/span><\/a><\/p>\n","protected":false},"author":32,"featured_media":37907,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[45],"class_list":["post-37894","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-sin-categoria"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/37894","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\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/comments?post=37894"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/37894\/revisions"}],"predecessor-version":[{"id":37911,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/37894\/revisions\/37911"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media\/37907"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media?parent=37894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/categories?post=37894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/tags?post=37894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}