{"id":94,"date":"2019-10-07T06:00:37","date_gmt":"2019-10-07T06:00:37","guid":{"rendered":"https:\/\/www.beens.ca\/python\/?p=94"},"modified":"2019-10-08T13:41:51","modified_gmt":"2019-10-08T13:41:51","slug":"day-6-learning-summary-for-100daysofcode","status":"publish","type":"post","link":"https:\/\/www.beens.ca\/python\/2019\/10\/07\/day-6-learning-summary-for-100daysofcode\/","title":{"rendered":"Day 6 Learning Summary for #100DaysOfCode"},"content":{"rendered":"<p>[<a href=\"https:\/\/github.com\/pbeens\/100DaysOfCode\/tree\/master\/Days\/06\" target=\"_blank\" rel=\"noopener noreferrer\">Project folder<\/a>]<\/p>\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a85232aec8bb\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a85232aec8bb\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.beens.ca\/python\/2019\/10\/07\/day-6-learning-summary-for-100daysofcode\/#Goals_for_Today\" >Goals for Today<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.beens.ca\/python\/2019\/10\/07\/day-6-learning-summary-for-100daysofcode\/#What_I_Learned\" >What I Learned<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.beens.ca\/python\/2019\/10\/07\/day-6-learning-summary-for-100daysofcode\/#Maintaining_This_Site\" >Maintaining This Site<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.beens.ca\/python\/2019\/10\/07\/day-6-learning-summary-for-100daysofcode\/#List_Comprehension\" >List Comprehension<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.beens.ca\/python\/2019\/10\/07\/day-6-learning-summary-for-100daysofcode\/#Day_2_Challenge\" >Day 2 Challenge<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.beens.ca\/python\/2019\/10\/07\/day-6-learning-summary-for-100daysofcode\/#Hackerrank\" >Hackerrank<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Goals_for_Today\"><\/span>Goals for Today<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>To make maintaining the GitHub site more efficient.<\/li>\n<li>To do more list comprehension lessons.<\/li>\n<li>Finish the day 2 challenge!<\/li>\n<li>Do some other challenges<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"What_I_Learned\"><\/span>What I Learned<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><!--more--><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Maintaining_This_Site\"><\/span>Maintaining This Site<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Maintaining this site was too time-consuming, with too much duplication of words and concepts, so I&#8217;m in the process of simplifying it. Namely, I&#8217;m reducing the sections on these pages from:<\/p>\n<ul>\n<li>Goal<\/li>\n<li>My Approach<\/li>\n<li>Solution, and<\/li>\n<li>What I Learned.<\/li>\n<\/ul>\n<p>&#8230;to just:<\/p>\n<ul>\n<li>Goal(s), and<\/li>\n<li>What I Learned.<\/li>\n<\/ul>\n<p>You&#8217;ll notice Goal changed to Goal(s) because I often want to cover more than one topic in a day.<\/p>\n<p>In addition, I&#8217;m greatly simplifying what I put on the main <a href=\"https:\/\/github.com\/pbeens\/100DaysOfCode\/blob\/master\/README.md\" target=\"_blank\" rel=\"noopener noreferrer\">README.md<\/a> file and just pointing the reader to the daily pages instead. The main page will have a very concise summary only.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"List_Comprehension\"><\/span>List Comprehension<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>I got sidetracked by the Hackerrank challenges. Perhaps I&#8217;ll come back to this if the need arises.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Day_2_Challenge\"><\/span>Day 2 Challenge<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The <a href=\"https:\/\/www.pythonmorsels.com\/exercises\/cb8fbdd52cf14f8cb31df4f0634\" target=\"_blank\" rel=\"noopener noreferrer\">challenge website<\/a> (subscription needed) listed these resources to help with the two bonuses.<\/p>\n<ul>\n<li><a href=\"http:\/\/treyhunner.com\/2016\/04\/how-to-loop-with-indexes-in-python\/\" rel=\"nofollow noopener\" target=\"_blank\">How to loop with indexes in Python<\/a><\/li>\n<li><a href=\"https:\/\/treyhunner.com\/2018\/03\/tuple-unpacking-improves-python-code-readability\/\" rel=\"nofollow noopener\" target=\"_blank\">Multiple assignment and tuple unpacking improve Python code readability &#8211; Trey Hunner<\/a><\/li>\n<li><a href=\"https:\/\/treyhunner.com\/2015\/12\/python-list-comprehensions-now-in-color\/\" rel=\"nofollow noopener\" target=\"_blank\">Python List Comprehensions: Explained Visually &#8211; Trey Hunner<\/a><\/li>\n<li><a href=\"https:\/\/treyhunner.com\/2018\/10\/asterisks-in-python-what-they-are-and-how-to-use-them\/#Asterisks_for_packing_arguments_given_to_function\" rel=\"nofollow noopener\" target=\"_blank\">Asterisks in Python: what they are and how to use them &#8211; Trey Hunner<\/a><\/li>\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/36901\/what-does-double-star-asterisk-and-star-asterisk-do-for-parameters\/36908#36908\" rel=\"nofollow noopener\" target=\"_blank\">What does ** (double star\/asterisk) and * (star\/asterisk) do for parameters?<\/a><\/li>\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/2052390\/manually-raising-throwing-an-exception-in-python\" rel=\"nofollow noopener\" target=\"_blank\">Manually raising (throwing) an exception in Python<\/a><\/li>\n<\/ul>\n<p>The last one proved beneficial to review how to throw exceptions.<\/p>\n<p>I wrote a test program to develop a function to test for inconsistencies in matrix lengths. See <a href=\"https:\/\/github.com\/pbeens\/100DaysOfCode\/blob\/master\/Days\/06\/test-sublist-lengths.py\" target=\"_blank\" rel=\"noopener noreferrer\">test-sublist-lengths.py<\/a>.<\/p>\n<p>I think I&#8217;ve got the program working to where I want it to. I&#8217;m having trouble with Bonus 2 because I&#8217;m not understanding how to use the test file they provided. I could ask about it in a forum I&#8217;m sure but I just want to get on with some other challenges.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Hackerrank\"><\/span>Hackerrank<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>For some other challenges, I&#8217;ve decided to use Hackerrank as it&#8217;s a site I&#8217;ve used in the past and have been impressed with the quality of the challenges and the interface.<\/p>\n<p>Just for fun, I decided to start right at the beginning of their Python challenges which starts at Hello World but then ramps up fairly quickly. For me, it&#8217;s an excellent review.<\/p>\n<p>So far I&#8217;ve completed all the Introduction section and three of the Basic Data Types challenges. (See this <a href=\"https:\/\/github.com\/pbeens\/100DaysOfCode\/blob\/master\/Hackerrank\" target=\"_blank\" rel=\"noopener noreferrer\">folder<\/a>)<\/p>\n<p>If you&#8217;re wondering what the <a href=\"https:\/\/github.com\/pbeens\/100DaysOfCode\/blob\/master\/Days\/06\/....%5CHackerrank%5Cfilename.py\" target=\"_blank\" rel=\"noopener noreferrer\">filename.py<\/a> file is, it&#8217;s a quick utility I wrote for generating filenames for the challenges and the screenshots I&#8217;m saving. You&#8217;ll note that it uses <a href=\"https:\/\/realpython.com\/python-f-strings\/\" target=\"_blank\" rel=\"noopener noreferrer\">f-strings<\/a>, which I&#8217;m a big fan of.<\/p>\n<p><code><\/code><\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<div dir=\"auto\" lang=\"en\">Don&#8217;t forget to check out the ongoing <a href=\"https:\/\/github.com\/pbeens\/100DaysOfCode\/blob\/master\/Links.md\" target=\"_blank\" rel=\"noopener noreferrer\">Links<\/a> document I keep adding to. It&#8217;s already starting to look like a good resource for this kind of endeavour.<\/div>\n<div dir=\"auto\" lang=\"en\"><\/div>\n<div dir=\"auto\" lang=\"en\">You can see this project on GitHub <a href=\"https:\/\/github.com\/pbeens\/100DaysOfCode\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/div>\n<p>&nbsp;<\/p>\n<div dir=\"auto\" lang=\"en\" style=\"text-align: center;\"><em>Please consider subscribing to this blog!\u00a0<\/em><\/div>\n","protected":false},"excerpt":{"rendered":"<p>[Project folder] Goals for Today To make maintaining the GitHub site more efficient. To do more list comprehension lessons. Finish the day 2 challenge! Do some other challenges What I Learned<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,8,10],"tags":[12,26,25,20],"class_list":["post-94","post","type-post","status-publish","format-standard","hentry","category-100daysofcode","category-blog","category-github","tag-100daysofcode","tag-challenges","tag-hackerrank","tag-list-comprehension"],"_links":{"self":[{"href":"https:\/\/www.beens.ca\/python\/wp-json\/wp\/v2\/posts\/94","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.beens.ca\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.beens.ca\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.beens.ca\/python\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.beens.ca\/python\/wp-json\/wp\/v2\/comments?post=94"}],"version-history":[{"count":4,"href":"https:\/\/www.beens.ca\/python\/wp-json\/wp\/v2\/posts\/94\/revisions"}],"predecessor-version":[{"id":101,"href":"https:\/\/www.beens.ca\/python\/wp-json\/wp\/v2\/posts\/94\/revisions\/101"}],"wp:attachment":[{"href":"https:\/\/www.beens.ca\/python\/wp-json\/wp\/v2\/media?parent=94"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.beens.ca\/python\/wp-json\/wp\/v2\/categories?post=94"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.beens.ca\/python\/wp-json\/wp\/v2\/tags?post=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}