{"id":39135,"date":"2016-11-23T20:20:54","date_gmt":"2016-11-24T02:20:54","guid":{"rendered":"http:\/\/union20.wordpress.com\/?p=624"},"modified":"2016-11-23T20:20:54","modified_gmt":"2016-11-24T02:20:54","slug":"writing","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/writing\/","title":{"rendered":"Writing"},"content":{"rendered":"<p class=\"syndicated-attribution\"><em> --Originally published at <a href=\"https:\/\/union20.wordpress.com\/2016\/11\/24\/writing\/\"><a href=\"https:\/\/union20.wordpress.com\">Coding with jared<\/a><\/a><\/em><br \/><\/p>\n<p>There\u00b4s another way to write down notes without using Word, LibreOffice, Notepad or any other famous text editors&#8230;..<\/p>\n<p><img class=\"irc_mi ilVbMP_xvf0k-pQOPx8XEepE alignright\" src=\"https:\/\/i0.wp.com\/technodyan.com\/wp-content\/uploads\/2014\/04\/Libreoffice-Writer_thumb-25255B1-25255D.png\" alt=\"Resultado de imagen para libreoffice writer\" width=\"150\" height=\"185\" \/><\/p>\n<p><img class=\"irc_mi ilVbMP_xvf0k-pQOPx8XEepE alignleft\" src=\"https:\/\/lh3.ggpht.com\/j6aNgkpGRXp9PEinADFoSkyfup46-6Rb83bS41lfQC_Tc2qg96zQ_aqZcyiaV3M-Ai4=w300\" alt=\"Resultado de imagen para word\" width=\"195\" height=\"195\" \/><img class=\"irc_mi iJJsWDG_uwWo-pQOPx8XEepE aligncenter\" src=\"https:\/\/i0.wp.com\/www.ilovegenerator.com\/large\/love-no-more-131441531598.png\" alt=\"Resultado de imagen para no more\" width=\"241\" height=\"205\" \/><\/p>\n<p>You can now create your very own text files with Python3, and it is pretty easy, you may only need a command o do it which is <strong>.write<\/strong>(&#8220;Whatever You Want&#8221;)<\/p>\n<p>You may also wanto to create a .txt file, so in order to do this we need to make a variable<\/p>\n<p>You need the command open(), and inside the parentheses you can name your file, but it has to end with .txt, then you use a comma , parentheses and &#8220;w&#8221;, the w means that you are able to write on that file.<\/p>\n<p><img class=\"alignnone size-full wp-image-655\" src=\"https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-19-58-212.png?w=1000\" alt=\"screenshot-from-2016-11-23-19-58-21\" srcset=\"https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-19-58-212.png 368w, https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-19-58-212.png?w=150 150w, https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-19-58-212.png?w=300 300w\" sizes=\"(max-width: 368px) 100vw, 368px\"   \/><\/p>\n<p>You may run this code on the terminal , but the terminal won\u00b4t show anything, but the file will be created, here appears mine on my desktop.<\/p>\n<p><img class=\"alignnone size-full wp-image-648\" src=\"https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-02-21.png?w=1000\" alt=\"screenshot-from-2016-11-23-20-02-21\" srcset=\"https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-02-21.png?w=1000 1000w, https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-02-21.png?w=150 150w, https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-02-21.png?w=300 300w, https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-02-21.png?w=768 768w, https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-02-21.png?w=1024 1024w, https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-02-21.png 1366w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"   \/><\/p>\n<p>&nbsp;<\/p>\n<p>Now to write on the new file you need to write the name of the variable plus .write(), and inside the parentheses between brackets you write whaterver you want.<\/p>\n<p><img class=\"alignnone size-full wp-image-656\" src=\"https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-03-171.png?w=1000\" alt=\"screenshot-from-2016-11-23-20-03-17\" srcset=\"https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-03-171.png 725w, https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-03-171.png?w=150 150w, https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-03-171.png?w=300 300w\" sizes=\"(max-width: 725px) 100vw, 725px\"   \/><\/p>\n<p>Be sure to save the file and run it again on the terminal, once again it will show nothing on it&#8230;<\/p>\n<p><img class=\"alignnone size-full wp-image-657\" src=\"https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-04-031.png?w=1000\" alt=\"screenshot-from-2016-11-23-20-04-03\" srcset=\"https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-04-031.png 734w, https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-04-031.png?w=150 150w, https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-04-031.png?w=300 300w\" sizes=\"(max-width: 734px) 100vw, 734px\"   \/><\/p>\n<p>&nbsp;<\/p>\n<p>but if you double click your .txt file. the text you wrote on python will appear on the text editor.<\/p>\n<p><img class=\"alignnone size-full wp-image-658\" src=\"https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-04-471.png?w=1000\" alt=\"screenshot-from-2016-11-23-20-04-47\" srcset=\"https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-04-471.png 882w, https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-04-471.png?w=150 150w, https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-04-471.png?w=300 300w, https:\/\/union20.files.wordpress.com\/2016\/11\/screenshot-from-2016-11-23-20-04-471.png?w=768 768w\" sizes=\"(max-width: 882px) 100vw, 882px\"   \/><\/p>\n<p><img src=\"https:\/\/s0.wp.com\/wp-content\/mu-plugins\/wpcom-smileys\/twemoji\/2\/72x72\/1f642.png\" alt=\"?\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/><\/p>\n<p>I learned to create and modify text files from this video:<\/p>\n<div class=\"jetpack-video-wrapper\"><iframe class='youtube-player' type='text\/html' width='1000' height='593' src='https:\/\/www.youtube.com\/embed\/m0o0CkYsDzI?version=3&#038;rel=1&%23038;fs=1&%23038;autohide=2&%23038;showsearch=0&%23038;showinfo=1&%23038;iv_load_policy=1&%23038;wmode=transparent' allowfullscreen='true' style='border:0;'><\/iframe><\/div>\n<p>&nbsp;<\/p>\n<p>Cheers to Computer Science UK for making great videos.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p><br \/>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/union20.wordpress.com\/624\/\"><img alt=\"\" border=\"0\" src=\"http:\/\/feeds.wordpress.com\/1.0\/comments\/union20.wordpress.com\/624\/\" \/><\/a> <img alt=\"\" border=\"0\" src=\"https:\/\/pixel.wp.com\/b.gif?host=union20.wordpress.com&#038;blog=115237589&%23038;post=624&%23038;subd=union20&%23038;ref=&%23038;feed=1\" width=\"1\" height=\"1\" \/>","protected":false},"excerpt":{"rendered":"<p>&#8211;Originally published at Coding with jared There\u00b4s another way to write down notes without using Word, LibreOffice, Notepad or any other famous text editors&#8230;.. You can now create your very own text files with Python3, and it is pretty easy, you may only need a command o do it which is .write(&#8220;Whatever You Want&#8221;) You &hellip; <a href=\"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/writing\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Writing<\/span><\/a><\/p>\n","protected":false},"author":29,"featured_media":39137,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[89,148,33],"class_list":["post-39135","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-python3","tag-learning","tag-tc101"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/39135","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\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/comments?post=39135"}],"version-history":[{"count":22,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/39135\/revisions"}],"predecessor-version":[{"id":42692,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/39135\/revisions\/42692"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/media\/39137"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/media?parent=39135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/categories?post=39135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/tags?post=39135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}