{"id":38807,"date":"2016-10-19T22:38:34","date_gmt":"2016-10-20T03:38:34","guid":{"rendered":"http:\/\/rodrigomerinos.wordpress.com\/?p=431"},"modified":"2016-10-19T22:38:34","modified_gmt":"2016-10-20T03:38:34","slug":"do-this-not-like-that-oh-cmon","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/do-this-not-like-that-oh-cmon\/","title":{"rendered":"Do this\u2026 Not like that\u2026 Oh\u2026 C\u2019mon\u2026"},"content":{"rendered":"<p class=\"syndicated-attribution\"><em> --Originally published at <a href=\"https:\/\/rodrigomerinos.wordpress.com\/2016\/10\/19\/do-this-not-like-that-oh-cmon\/\"><a href=\"https:\/\/rodrigomerinos.wordpress.com\">M E R I N O<\/a><\/a><\/em><br \/><\/p>\n<p>Ok, let&#8217;s go straight to the point. Humans never follow instructions. Why? Because we&#8217;re humans and we love doing whatever we want.<\/p>\n<p>The problem is that computers don&#8217;t work that way. If a program ask you to write 7, as a number not as letters.<\/p>\n<p>As programmers we can &#8220;obligate&#8221; the user to write the way we want.<\/p>\n<p>How? With a cool function called\u00a0<em>try\u00a0<\/em>and\u00a0<em>except<\/em><\/p>\n<p><img class=\"alignnone size-full wp-image-440\" src=\"https:\/\/rodrigomerinos.files.wordpress.com\/2016\/10\/captura-de-pantalla-2016-10-28-a-las-22-24-58.png?w=736\" alt=\"Captura de pantalla 2016-10-28 a la(s) 22.24.58.png\" srcset=\"https:\/\/rodrigomerinos.files.wordpress.com\/2016\/10\/captura-de-pantalla-2016-10-28-a-las-22-24-58.png 535w, https:\/\/rodrigomerinos.files.wordpress.com\/2016\/10\/captura-de-pantalla-2016-10-28-a-las-22-24-58.png?w=150 150w, https:\/\/rodrigomerinos.files.wordpress.com\/2016\/10\/captura-de-pantalla-2016-10-28-a-las-22-24-58.png?w=300 300w\" sizes=\"(max-width: 535px) 100vw, 535px\"   \/><\/p>\n<p><img class=\"alignnone size-full wp-image-445\" src=\"https:\/\/rodrigomerinos.files.wordpress.com\/2016\/10\/captura-de-pantalla-2016-10-28-a-las-22-28-00.png?w=736\" alt=\"Captura de pantalla 2016-10-28 a la(s) 22.28.00.png\" srcset=\"https:\/\/rodrigomerinos.files.wordpress.com\/2016\/10\/captura-de-pantalla-2016-10-28-a-las-22-28-00.png 204w, https:\/\/rodrigomerinos.files.wordpress.com\/2016\/10\/captura-de-pantalla-2016-10-28-a-las-22-28-00.png?w=150 150w\" sizes=\"(max-width: 204px) 100vw, 204px\"   \/><\/p>\n<p><img class=\"alignnone size-full wp-image-446\" src=\"https:\/\/rodrigomerinos.files.wordpress.com\/2016\/10\/captura-de-pantalla-2016-10-28-a-las-22-28-41.png?w=736\" alt=\"Captura de pantalla 2016-10-28 a la(s) 22.28.41.png\"   \/><\/p>\n<p>This make the question if &#8220;something&#8221; isn&#8217;t an integer then print &#8220;this is not a whole number&#8221;, if it is, then print &#8220;Good Job!&#8221;.<\/p>\n<p>If you want to know more about validating inputs click <a href=\"http:\/\/www.101computing.net\/number-only\/\">here<\/a><\/p><br \/>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/rodrigomerinos.wordpress.com\/431\/\"><img alt=\"\" border=\"0\" src=\"http:\/\/feeds.wordpress.com\/1.0\/comments\/rodrigomerinos.wordpress.com\/431\/\" \/><\/a> <img alt=\"\" border=\"0\" src=\"https:\/\/pixel.wp.com\/b.gif?host=rodrigomerinos.wordpress.com&#038;blog=115217129&%23038;post=431&%23038;subd=rodrigomerinos&%23038;ref=&%23038;feed=1\" width=\"1\" height=\"1\" \/>","protected":false},"excerpt":{"rendered":"<p>&#8211;Originally published at M E R I N O Ok, let&#8217;s go straight to the point. Humans never follow instructions. Why? Because we&#8217;re humans and we love doing whatever we want. The problem is that computers don&#8217;t work that way. If a program ask you to write 7, as a number not as letters. As &hellip; <a href=\"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/do-this-not-like-that-oh-cmon\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Do this\u2026 Not like that\u2026 Oh\u2026 C\u2019mon\u2026<\/span><\/a><\/p>\n","protected":false},"author":46,"featured_media":440,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[124,24],"class_list":["post-38807","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-code","tag-python"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/38807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/comments?post=38807"}],"version-history":[{"count":5,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/38807\/revisions"}],"predecessor-version":[{"id":42166,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/38807\/revisions\/42166"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/media?parent=38807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/categories?post=38807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/tags?post=38807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}