{"id":37385,"date":"2016-09-04T00:44:12","date_gmt":"2016-09-04T05:44:12","guid":{"rendered":"http:\/\/a01228858.wordpress.com\/?p=154"},"modified":"2016-09-04T00:44:12","modified_gmt":"2016-09-04T05:44:12","slug":"calling-creating-functions","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/calling-creating-functions\/","title":{"rendered":"Calling &amp; Creating Functions"},"content":{"rendered":"<p class=\"syndicated-attribution\"><em> --Originally published at <a href=\"https:\/\/a01228858.wordpress.com\/2016\/09\/04\/calling-creating-functions\/\"><a href=\"https:\/\/a01228858.wordpress.com\">Py(t)hon<\/a><\/a><\/em><br \/><\/p>\n<p>I think is time to start with functions, i&#8217;m no experts at this topic so maybe we can learn together, let&#8217;s go<\/p>\n<p>First, what is a function? Very simple, is a piece of reusable code that can be call upon whenever you need it. In other words, if you are going to repeat a code several time the best you can do is create a function, so you don\u2019t have to write it all over again and again. Is to make your life easier.<\/p>\n<p>To create a function you have to start with <strong><em>def <\/em><\/strong>follow by parenthesis (), inside this parenthesis goes the parameters necessary, if needed of course, after the parenthesis goes a colon (:) and then to close it, use the return function follow by the value statement, if you don\u2019t want it to return anything, just leave a blank space, the system will take it like None.<\/p>\n<p>Here is my example:<\/p>\n<p><img class=\"alignnone size-full wp-image-179\" src=\"https:\/\/a01228858.files.wordpress.com\/2016\/09\/def1.png?w=1000\" alt=\"def1.png\"   \/><\/p>\n<p>In this example I can call whenever I want the areacuadro function, that will be all:) #Pug#Tec#TC101#Functions<\/p>\n<p>Here is a webpage where you can find it better explain <a href=\"http:\/\/www.tutorialspoint.com\/python\/python_functions.htm\">link<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p><br \/>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/a01228858.wordpress.com\/154\/\"><img alt=\"\" border=\"0\" src=\"http:\/\/feeds.wordpress.com\/1.0\/comments\/a01228858.wordpress.com\/154\/\" \/><\/a> <img alt=\"\" border=\"0\" src=\"https:\/\/pixel.wp.com\/b.gif?host=a01228858.wordpress.com&#038;blog=115152340&%23038;post=154&%23038;subd=a01228858&%23038;ref=&%23038;feed=1\" width=\"1\" height=\"1\" \/>","protected":false},"excerpt":{"rendered":"<p>&#8211;Originally published at Py(t)hon I think is time to start with functions, i&#8217;m no experts at this topic so maybe we can learn together, let&#8217;s go First, what is a function? Very simple, is a piece of reusable code that can be call upon whenever you need it. In other words, if you are going &hellip; <a href=\"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/calling-creating-functions\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Calling &amp; Creating Functions<\/span><\/a><\/p>\n","protected":false},"author":28,"featured_media":179,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[126,34,42,33,36],"class_list":["post-37385","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-functions","tag-isc","tag-pug","tag-tc101","tag-tec"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/37385","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\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/comments?post=37385"}],"version-history":[{"count":3,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/37385\/revisions"}],"predecessor-version":[{"id":38095,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/37385\/revisions\/38095"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/media?parent=37385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/categories?post=37385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/tags?post=37385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}