{"id":1089,"date":"2016-03-22T21:19:29","date_gmt":"2016-03-22T21:19:29","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/?p=1089"},"modified":"2016-03-22T21:21:27","modified_gmt":"2016-03-22T21:21:27","slug":"fizzbuzz","status":"publish","type":"post","link":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/2016\/03\/22\/fizzbuzz\/","title":{"rendered":"FizzBuzz"},"content":{"rendered":"<p>So I was reading a programming blog from a few years ago that was asking, <a href=\"http:\/\/blog.codinghorror.com\/why-cant-programmers-program\/\" target=\"_blank\">why can&#8217;t programmers.. program?<\/a>. The article set a challenge to<\/p>\n<blockquote><p>Write a program that prints the numbers from 1 to 100.\u00a0But for multiples of three print &#8220;Fizz&#8221; instead of the number\u00a0and for the multiples of five print &#8220;Buzz&#8221;.\u00a0For numbers which are multiples of both three and five print &#8220;FizzBuzz&#8221;.<\/p><\/blockquote>\n<p>Now technically the answer to the puzzle uses nothing more than Nat 5 constructs, so can you code a Python solution? Share it here if you get a nice one<\/p>\n<p>(hint after the jump)<\/p>\n<p><!--more--><\/p>\n<p>The key to this program, like every other is understanding the problem. How about if I move the program description about a little to help?<\/p>\n<p>Write a program that for\u00a0the numbers 1 to 100.<\/p>\n<ul>\n<li>For numbers which are multiples of both three and five print &#8220;FizzBuzz&#8221;.<\/li>\n<li>For multiples of three print &#8220;Fizz&#8221;.<\/li>\n<li>For the multiples of five print &#8220;Buzz&#8221;.<\/li>\n<li>For everything else print the number.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>So I was reading a programming blog from a few years ago that was asking, why can&#8217;t programmers.. program?. The article set a challenge to Write a program that prints the numbers from 1 to 100.\u00a0But for multiples of three print &#8220;Fizz&#8221; instead of the number\u00a0and for the multiples of five print &#8220;Buzz&#8221;.\u00a0For numbers which &hellip;<\/p>\n","protected":false},"author":32,"featured_media":1093,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17932,17009],"tags":[],"class_list":["post-1089","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computational-constructs","category-software-design-devlopment"],"jetpack_featured_media_url":"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/ColtnessHS-ComputingScience\/uploads\/sites\/12638\/2016\/03\/brainteaser.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/1089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/comments?post=1089"}],"version-history":[{"count":3,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/1089\/revisions"}],"predecessor-version":[{"id":1092,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/1089\/revisions\/1092"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/media\/1093"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/media?parent=1089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/categories?post=1089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/tags?post=1089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}