Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":13618,"date":"2015-05-05T16:26:43","date_gmt":"2015-05-05T21:26:43","guid":{"rendered":"https:\/\/jorgepadilla95.withknown.com\/2015\/validated-user-input-in-python"},"modified":"2015-05-05T16:26:43","modified_gmt":"2015-05-05T21:26:43","slug":"validated-user-input-in-python-3","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2015\/2015\/validated-user-input-in-python-3\/","title":{"rendered":"Validated user input in Python"},"content":{"rendered":"
\n

#Mastery<\/a>29<\/span><\/p>\n

#TC<\/a>1014<\/span><\/p>\n

This is very useful since it helps to make a good and clean code without too many errors to fix, for example:<\/span><\/p>\n

while\u00a0 True:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 q=int(input(“Please enter a non-negative integer number: “))<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 break<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 except ValueError:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print(“this is not a integer number, try again: “)<\/strong><\/p>\n

\u00a0<\/p>\n

while q
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 q=int(input(“this is not a positive number,try again: “))<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 except ValueError:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print (“this is not a integer number, try again:\u00a0 “)<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 while True:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 q=int(input(“Please enter a non-negative integer number: “))<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 break<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 except ValueError:<\/strong>
\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print (“this is not a integer number, try again: “<\/strong>)<\/strong><\/p>\n

\u00a0<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"

\n

#Mastery<\/a>29<\/span><\/p>\n

#TC<\/a>1014<\/span><\/p>\n

This is very useful since it helps to make a good and clean code without too many errors to fix, for example:<\/span><\/p>\n

while  True:<\/strong>
        try:<\/strong>
            q=int(input(“Please enter a non-negative integer number: “))<\/strong>
            break<\/strong>
        except ValueError:<\/strong>
            print(“this is not a integer number, try again: “)<\/strong><\/p>\n

 <\/p>\n

while q
        try:<\/strong>
            q=int(input(“this is not a positive number,try again: “))<\/strong>
        except ValueError:<\/strong>
            print (“this is not a integer number, try again:  “)<\/strong>
            while True:<\/strong>
                try:<\/strong>
                    q=int(input(“Please enter a non-negative integer number: “))<\/strong>
                    break<\/strong>
                except ValueError:<\/strong>
                    print (“this is not a integer number, try again: “<\/strong>)<\/strong><\/p>\n

 <\/p>\n<\/div>\n

Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":30,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3,25],"tags":[166,144,227,486,45,287],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/13618"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/comments?post=13618"}],"version-history":[{"count":5,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/13618\/revisions"}],"predecessor-version":[{"id":17468,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/13618\/revisions\/17468"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/media?parent=13618"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/categories?post=13618"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/tags?post=13618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}