{"id":2203,"date":"2016-11-28T12:48:13","date_gmt":"2016-11-28T20:48:13","guid":{"rendered":"http:\/\/miriamposner.com\/classes\/dh101f16\/?page_id=2203"},"modified":"2016-11-28T16:42:24","modified_gmt":"2016-11-29T00:42:24","slug":"lets-play-with-python","status":"publish","type":"page","link":"http:\/\/miriamposner.com\/classes\/dh101f16\/tutorials-guides\/programming\/lets-play-with-python\/","title":{"rendered":"Let&#8217;s play with Python!"},"content":{"rendered":"<div id=\"wrapper\">\n<div id=\"header-row\">\n<figure id=\"attachment_2230\" aria-describedby=\"caption-attachment-2230\" style=\"width: 300px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/Python_logo.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2230\" src=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/Python_logo-300x127.png\" alt=\"People always feel compelled to make dumb Monty Python jokes when they hear about Python. I know you won't do that, though.\" width=\"300\" height=\"127\" srcset=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/Python_logo-300x127.png 300w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/Python_logo-768x325.png 768w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/Python_logo-1024x433.png 1024w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/Python_logo-1200x508.png 1200w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/Python_logo.png 1890w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-2230\" class=\"wp-caption-text\">People always feel compelled to make dumb Monty Python jokes when they hear about Python. I know you won&#8217;t do that, though.<\/figcaption><\/figure>\n<p>It&#8217;s really fun to work in the terminal, but Python is a more broadly useful programming language. A lot of people use it to manipulate data and documents, automate tasks, and even build complex applications.<\/p>\n<\/div>\n<div><\/div>\n<div id=\"clarify-article-content\">\n<div class=\"clarify-article-description\">\n<p>Python is installed on the Lab computers. If you want to install it on your own computer later, <a href=\"http:\/\/www.pyladies.com\/blog\/Get-Your-Mac-Ready-for-Python-Programming\/\">here are instructions<\/a> for how to do it.<\/p>\n<p>We&#8217;ll start by using Python in the terminal, and then we&#8217;ll move to a Python-specific coding environment called IDLE.<\/p>\n<p>(By the way, <a href=\"https:\/\/docs.python.org\/2\/faq\/general.html#why-is-it-called-python\">you may wonder why it&#8217;s called Python<\/a>.)<\/p>\n<\/div>\n<div class=\"clarify-steps-container\">\n<div id=\"clarify-step-1\" class=\"clarify-step-container\">\n<h2 class=\"clarify-step-title\">Start Python<\/h2>\n<div class=\"clarify-step-instructions\">\n<p>This is incredibly complicated. Type<\/p>\n<p><code>python<\/code><\/p>\n<p>and press <strong>return<\/strong>. You should then see some information about the version of Python you&#8217;re running, followed by three little angled brackets, like this: &gt;&gt;&gt; Those three angled brackets mean your computer is waiting for you to tell it what to do, in the Python computer language.<\/p>\n<\/div>\n<div class=\"clarify-step-image-wrapper\">\n<div class=\"clarify-step-image-container\"><a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/start-python.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2204\" src=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/start-python.png\" alt=\"start-python\" width=\"653\" height=\"113\" srcset=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/start-python.png 653w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/start-python-300x52.png 300w\" sizes=\"auto, (max-width: 653px) 85vw, 653px\" \/><\/a><\/div>\n<\/div>\n<\/div>\n<div class=\"clarify-clear\"><\/div>\n<div id=\"clarify-step-2\" class=\"clarify-step-container\">\n<h2 class=\"clarify-step-title\">Pretend your computer is a giant calculator<\/h2>\n<div class=\"clarify-step-instructions\">\n<p>Your computer is waiting for you to give it instructions in Python, so let&#8217;s do that. Type<\/p>\n<p><code>2+2<\/code><\/p>\n<p>and press <strong>return<\/strong>.<\/p>\n<p>Python, as you can see, recognizes <strong>integers, <\/strong>like the number 2, and <strong>operators<\/strong>, like the plus sign (as well as other operators, like the multiplication (*) and division (\/) signs). If you want, try writing some other arithmetical expressions and pressing <strong>return<\/strong> so that your computer will tell you the answer.<\/p>\n<p>Admire yourself as you do this. You look like a hacker!<\/p>\n<p><a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/pretend-your-computer-is-a-giant-calculator.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2205\" src=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/pretend-your-computer-is-a-giant-calculator.png\" alt=\"pretend-your-computer-is-a-giant-calculator\" width=\"98\" height=\"56\" \/><\/a><\/p>\n<\/div>\n<div class=\"clarify-step-image-wrapper\"><\/div>\n<\/div>\n<div id=\"clarify-step-3\" class=\"clarify-step-container\">\n<h2 class=\"clarify-step-title\">Concatenate strings<\/h2>\n<div class=\"clarify-step-instructions\">\n<p>In programming parlance, a <strong>string<\/strong> is a series of characters. <strong>Concatenate<\/strong> is a fun word that basically means &#8220;stick them together.&#8221; In Python, you denote a string by surrounding it with quotation marks. You concatenate with the plus sign. Try this:<\/p>\n<p><code>\"I\"+\"love\"+\"digital\"+\"humanities\"<\/code><\/p>\n<p>and press <strong>return<\/strong>. Your computer should spit out a concatenated version of the strings you fed it.<\/p>\n<p><a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/concatenate-strings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2206\" src=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/concatenate-strings.png\" alt=\"concatenate-strings\" width=\"358\" height=\"79\" srcset=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/concatenate-strings.png 358w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/concatenate-strings-300x66.png 300w\" sizes=\"auto, (max-width: 358px) 85vw, 358px\" \/><\/a><\/p>\n<\/div>\n<div class=\"clarify-step-image-wrapper\"><\/div>\n<\/div>\n<div id=\"clarify-step-4\" class=\"clarify-step-container\">\n<h2 class=\"clarify-step-title\">Assign a variable<\/h2>\n<div class=\"clarify-step-instructions\">\n<p>You can begin unlocking the power of a programming language when you start using <strong>variables<\/strong>. A variable is a set of characters that <em>stands for<\/em> something else. A variable could stand for a string, or a number, or even a series of operations. We&#8217;ll assign a variable to a string. Type:<\/p>\n<p><code>a = \"I love digital humanities\"<\/code><\/p>\n<p>and press <strong>return<\/strong>. Then type<\/p>\n<p><code>print(a)<\/code><\/p>\n<p>and press return. (With a lot of programming languages, <strong>print<\/strong> doesn&#8217;t mean &#8220;print something on paper&#8221;; it means &#8220;show me this on the screen.&#8221;)<\/p>\n<p>Your computer will show you the contents of the variable called <strong>a<\/strong> &#8212; namely, the string &#8220;I love digital humanities.&#8221;<\/p>\n<p><a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/assign-a-variable.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2207\" src=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/assign-a-variable.png\" alt=\"assign-a-variable\" width=\"342\" height=\"91\" srcset=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/assign-a-variable.png 342w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/assign-a-variable-300x80.png 300w\" sizes=\"auto, (max-width: 342px) 85vw, 342px\" \/><\/a><\/p>\n<\/div>\n<div class=\"clarify-step-image-wrapper\"><\/div>\n<\/div>\n<div id=\"clarify-step-5\" class=\"clarify-step-container\">\n<h2 class=\"clarify-step-title\">Perform operations with variables<\/h2>\n<div class=\"clarify-step-instructions\">\n<p>What do you think will happen if you type<\/p>\n<p><code>a+a+a+a<\/code><\/p>\n<p>and press <strong>return<\/strong>? Try it and see.<\/p>\n<p>Now try<\/p>\n<p><code>a*3<\/code><\/p>\n<p>and press <strong>return<\/strong>.<\/p>\n<p><a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/perform-operations-with-variables.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2208\" src=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/perform-operations-with-variables.png\" alt=\"perform-operations-with-variables\" width=\"119\" height=\"36\" \/><\/a><\/p>\n<\/div>\n<div class=\"clarify-step-image-wrapper\"><\/div>\n<\/div>\n<div id=\"clarify-step-6\" class=\"clarify-step-container\">\n<h2 class=\"clarify-step-title\">Open your IDLE<\/h2>\n<div class=\"clarify-step-instructions\">\n<p>As you&#8217;ve seen, you can work with Python directly in the terminal. But it&#8217;s kind of a pain, because you have to type in one line at a time, and you can&#8217;t go back and change stuff once you&#8217;ve pressed return.<\/p>\n<p>Most people, instead of writing programs directly in the terminal, will write code in a text document, which you can work on and save to run again whenever you want. You can use any kind of code editor to write Python &#8212; you just save the document with the file extension <strong>.py<\/strong> so that your computer knows it&#8217;s a Python program.<\/p>\n<p>Today, we&#8217;ll use <strong>IDLE<\/strong> to write our Python program. IDLE, which stands for Integrated DeveLopment Environment, is sort of a combination of a text editor and a terminal. You&#8217;ll write your Python code in a document and then press <strong>Run<\/strong> to make the program go.<\/p>\n<p>To find IDLE, go to your <strong>Applications<\/strong> folder and open up the folder called <strong>Python 3.5<\/strong>. (The version is important.) Once inside that folder, find the application called <strong>IDLE<\/strong> and double-click.<\/p>\n<p><a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/open-your-idle.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2209\" src=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/open-your-idle.png\" alt=\"open-your-idle\" width=\"672\" height=\"429\" srcset=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/open-your-idle.png 672w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/open-your-idle-300x192.png 300w\" sizes=\"auto, (max-width: 672px) 85vw, 672px\" \/><\/a><\/p>\n<\/div>\n<div class=\"clarify-step-image-wrapper\"><\/div>\n<\/div>\n<div id=\"clarify-step-7\" class=\"clarify-step-container\">\n<h2 class=\"clarify-step-title\">Understanding IDLE<\/h2>\n<div class=\"clarify-step-instructions\">\n<p>When IDLE first opens, you&#8217;ll see the <strong>shell<\/strong>, which is kind of like your terminal, but just running Python. You won&#8217;t do your coding there, though. Instead, open a new, blank file by going to <strong>File<\/strong>, then <strong>New<\/strong> <strong>File<\/strong>.<\/p>\n<p>This new, blank file is where you&#8217;ll write your code. Go ahead and save it now (<strong>File<\/strong> -&gt; <strong>Save<\/strong>). It doesn&#8217;t matter where you save it or what you call it, but try to put it somewhere where you can find it again later.<\/p>\n<p><a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/understanding-idle.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2211\" src=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/understanding-idle.png\" alt=\"understanding-idle\" width=\"635\" height=\"471\" srcset=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/understanding-idle.png 635w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/understanding-idle-300x223.png 300w\" sizes=\"auto, (max-width: 635px) 85vw, 635px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"clarify-step-image-wrapper\"><\/div>\n<\/div>\n<div id=\"clarify-step-8\" class=\"clarify-step-container\">\n<h2 class=\"clarify-step-title\">Our first expression in IDLE<\/h2>\n<div class=\"clarify-step-instructions\">\n<p>Let&#8217;s just get the hang of how IDLE works. In the new file you just created, type<\/p>\n<p><code>print(\"Hello world\")<\/code><\/p>\n<p>That means <strong>print the string inside the quotation marks<\/strong>. Save your document, and then, from the top menu, click on <strong>Run<\/strong> and then <strong>Run Module<\/strong>. This tells IDLE that you now want to execute the Python program you wrote.<\/p>\n<p>Look over at the shell. You should see the output of your program there.<\/p>\n<p><a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/our-first-expression-in-idle-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2212\" src=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/our-first-expression-in-idle-1.png\" alt=\"our-first-expression-in-idle\" width=\"590\" height=\"404\" srcset=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/our-first-expression-in-idle-1.png 590w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/our-first-expression-in-idle-1-300x205.png 300w\" sizes=\"auto, (max-width: 590px) 85vw, 590px\" \/><\/a><\/p>\n<\/div>\n<div class=\"clarify-step-image-wrapper\"><\/div>\n<\/div>\n<div id=\"clarify-step-9\" class=\"clarify-step-container\">\n<h2 class=\"clarify-step-title\">Our first real program!<\/h2>\n<div class=\"clarify-step-instructions\">\n<p>(Borrowed from\u00a0<a href=\"https:\/\/automatetheboringstuff.com\/\"><em>Automate the Boring Stuff with Python<\/em><\/a>.)<\/p>\n<p>Delete the contents of your file and copy and paste the following into the document:<\/p>\n<pre># This program says hello and asks for my name.\r\nprint('Hello world!')\r\nprint('What is your name?') \u00a0 \u00a0# ask for their name\r\nmyName = input()\r\nprint('It is good to meet you, ' + myName)\r\nprint('The length of your name is:')\r\nprint(len(myName))\r\nprint('What is your age?') \u00a0 \u00a0# ask for their age\r\nmyAge = input()\r\nprint('You will be ' + str(int(myAge) + 1) + ' in a year.')<\/pre>\n<p>Before you run this little program, let&#8217;s talk about what it&#8217;s doing. Read through the explanation contained in the image.<\/p>\n<p>If you don&#8217;t get it, put up a red flag, and we&#8217;ll talk you through it.<\/p>\n<figure id=\"attachment_2214\" aria-describedby=\"caption-attachment-2214\" style=\"width: 1010px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/Screen-Shot-2016-11-28-at-12.06.19-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2214\" src=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/Screen-Shot-2016-11-28-at-12.06.19-PM.png\" alt=\"Click on the image to see it full-size.\" width=\"1010\" height=\"761\" srcset=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/Screen-Shot-2016-11-28-at-12.06.19-PM.png 1010w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/Screen-Shot-2016-11-28-at-12.06.19-PM-300x226.png 300w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/Screen-Shot-2016-11-28-at-12.06.19-PM-768x579.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><figcaption id=\"caption-attachment-2214\" class=\"wp-caption-text\">Click on the image to see it full-size.<\/figcaption><\/figure>\n<\/div>\n<div class=\"clarify-step-image-wrapper\"><\/div>\n<\/div>\n<div id=\"clarify-step-10\" class=\"clarify-step-container\">\n<h2 class=\"clarify-step-title\">Run your program<\/h2>\n<div class=\"clarify-step-instructions\">\n<p>Save your file, and then from the top menu, click on <strong>Run<\/strong> and then <strong>Run module<\/strong>. If all goes well, you should be able to interact with the Python program you just created.<\/p>\n<p><a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/run-your-program.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2215\" src=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/run-your-program.png\" alt=\"run-your-program\" width=\"589\" height=\"383\" srcset=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/run-your-program.png 589w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/run-your-program-300x195.png 300w\" sizes=\"auto, (max-width: 589px) 85vw, 589px\" \/><\/a><\/p>\n<\/div>\n<div class=\"clarify-step-image-wrapper\"><\/div>\n<\/div>\n<div id=\"clarify-step-11\" class=\"clarify-step-container\">\n<h2 class=\"clarify-step-title\">Next steps<\/h2>\n<div class=\"clarify-step-instructions\">\n<p>That&#8217;s probably enough for today, but now you know the basics of writing a Python program! Because you&#8217;ve written your code in a file and saved it, you could in theory run it anytime you wanted.<\/p>\n<p>Of course, Python gets a lot more complicated, but it&#8217;s nothing you can&#8217;t handle. If you want to learn more, many people like <em><a href=\"https:\/\/learnpythonthehardway.org\/book\/\" target=\"_blank\">Learn Python the Hard Way,<\/a><\/em> which is available for free online or for purchase as a book. I like <em><a href=\"https:\/\/automatetheboringstuff.com\/\" target=\"_blank\">Automate the Boring Stuff with Python<\/a><\/em> because it covers a lot of familiar tasks. Finally, many people have gotten up and running with humanities programming with the excellent <a href=\"http:\/\/programminghistorian.org\/\" target=\"_blank\">Programming Historian<\/a>.<\/p>\n<p>If you prefer learning in person, you might be interested in joining <a href=\"http:\/\/www.meetup.com\/Pyladies-LA\/\">PyLadies L.A.<\/a> (You don&#8217;t actually have to be a lady!) This is a welcoming group of people who are interested in fostering diversity and inclusion.<\/p>\n<p>When you&#8217;re learning to program, play and have fun. Take a break if you get overwhelmed and come back to it later. It takes time to absorb programming concepts, even though everyone&#8217;s always talking\u00a0about bootcamps and crash courses and the like.<\/p>\n<p><strong>If we still have time left in class,<\/strong> take a look at chapter two of <em><a href=\"https:\/\/automatetheboringstuff.com\/chapter2\/\" target=\"_blank\">Automate the Boring Stuff with Python<\/a><\/em> and learn about control structures, one of the most important things to know about any kind of programming language.<\/p>\n<\/div>\n<div class=\"clarify-step-image-wrapper\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"footer\">\n<figure id=\"attachment_2216\" aria-describedby=\"caption-attachment-2216\" style=\"width: 689px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/next-steps.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2216\" src=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/next-steps.png\" alt=\"Control structures, oh my! Image from Automate the Boring Stuff with Python.\" width=\"689\" height=\"600\" srcset=\"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/next-steps.png 689w, http:\/\/miriamposner.com\/classes\/dh101f16\/wp-content\/uploads\/sites\/5\/2016\/11\/next-steps-300x261.png 300w\" sizes=\"auto, (max-width: 689px) 85vw, 689px\" \/><\/a><figcaption id=\"caption-attachment-2216\" class=\"wp-caption-text\">Control structures, oh my! Image from Automate the Boring Stuff with Python.<\/figcaption><\/figure>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s really fun to work in the terminal, but Python is a more broadly useful programming language. A lot of people use it to manipulate data and documents, automate tasks, &hellip; <a href=\"http:\/\/miriamposner.com\/classes\/dh101f16\/tutorials-guides\/programming\/lets-play-with-python\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Let&#8217;s play with Python!&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2186,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_eb_attr":"","footnotes":""},"class_list":["post-2203","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/pages\/2203","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/comments?post=2203"}],"version-history":[{"count":0,"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/pages\/2203\/revisions"}],"up":[{"embeddable":true,"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/pages\/2186"}],"wp:attachment":[{"href":"http:\/\/miriamposner.com\/classes\/dh101f16\/wp-json\/wp\/v2\/media?parent=2203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}