{"id":14282,"date":"2026-06-19T01:01:00","date_gmt":"2026-06-19T05:01:00","guid":{"rendered":"https:\/\/www.both.org\/?p=14282"},"modified":"2026-06-06T08:14:00","modified_gmt":"2026-06-06T12:14:00","slug":"teaching-python","status":"publish","type":"post","link":"https:\/\/www.both.org\/?p=14282","title":{"rendered":"Teaching Python"},"content":{"rendered":"<div class=\"pld-like-dislike-wrap pld-template-1\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"14282\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                        <i class=\"fas fa-thumbs-up\"><\/i>\r\n                <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\r\n<\/div><\/div>\n<p class=\"wp-block-paragraph\">Recently, a friend who was getting started with Python asked me to check some code she had been working with. She was building a tool to assess the impact of artificial intelligence on small businesses in a particular geographic area. She was using AI to teach herself Python.&nbsp;I love learning, and my friend\u2019s request invited me to rethink how I teach Python.&nbsp;I have recently been using&nbsp;VSCodium, which is identical to Microsoft\u2019s Visual Studio Code and is open source. There is a lot of pushback on AI, including concerns about its threat to learning and the code it generates.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Rather than implementing a ban on AI, we should utilize it as a \u201ctutor on demand.\u201d Can we use AI as a Socratic assistant when instructing students in Python programming? Encourage students to ask questions like&nbsp;\u201cWhy is this loop not working?\u201d&nbsp;instead of simply saying&nbsp;\u201cFix this code.\u201d&nbsp;This approach encourages a deeper engagement with the underlying logic. Teach students how to evaluate their own code critically.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s important to highlight that generative AI does not inherently guarantee correctness and can often introduce subtle logical or performance issues. One of the strengths of AI and coding is quickly and easily illustrating to students that there are multiple ways to accomplish the same or similar goals, such as drawing a circle. One day, while using an AI agent, I entered: \u201cdraw a circle with Python.\u201d&nbsp;I was thinking of the&nbsp;<strong><a href=\"https:\/\/docs.python.org\/3\/library\/turtle.html\">turtle<\/a><\/strong>&nbsp;module, but instead, the AI program gave me code that used the&nbsp;<strong><a href=\"https:\/\/matplotlib.org\/\">matplotlib<\/a><\/strong>&nbsp;library. I don\u2019t think I would have ever thought of that iteration on my own.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import matplotlib.pyplot as plt\n\n# Create a figure and an axis\nfig, ax = plt.subplots()\n\n# Create a circle patch (Center: x=0, y=0, Radius=5)\ncircle = plt.Circle((0, 0), 5, color='blue', fill=False, linewidth=2)\n\n# Add the circle to the axis\nax.add_patch(circle)\n\n# Set equal scaling so the circle is not distorted into an oval\nax.set_aspect('equal', adjustable='datalim')\n\n# Automatically scale the plot limits to show the circle\nax.autoscale_view()\n\n# Display the plot\nplt.title(\"Circle using Matplotlib\")\nplt.grid(True)\nplt.show()<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"533\" height=\"420\" src=\"http:\/\/www.both.org\/wp-content\/uploads\/2026\/06\/matplotlib.png\" alt=\"picture of a circle made with the matplot lib library of Python\" class=\"wp-image-14283\" style=\"width:393px;height:auto\"\/><figcaption class=\"wp-element-caption\">Screen picture by Don Watkins CC by SA 4.0<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Making programming easier for students also makes it more appealing to them. Learning should be fun, and the combination of AI with open-source tools like VSCodium,&nbsp;<a href=\"https:\/\/thonny.org\/\">Thonny<\/a>, or&nbsp;<a href=\"https:\/\/codewith.mu\/\">Mu<\/a>&nbsp;ensures that students not only learn effectively but also enjoy the process.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In conclusion, the integration of AI into Python programming instruction represents a significant evolution in educational methods. By leveraging open-source tools like VSCodium, Mu, and Thonny, educators can create an engaging and effective learning environment that fosters curiosity and critical thinking. Rather than viewing AI as a threat, we should embrace its potential to enhance our teaching practices and encourage students to explore concepts deeply and independently. As we navigate this exciting landscape, the goal should remain clear: to make learning enjoyable and accessible, ensuring that the next generation of programmers is not only skilled but also inspired to innovate. Through collaborative exploration and the smart use of technology, we can cultivate a community of learners ready to tackle the challenges of tomorrow.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, a friend who was getting started with Python asked me to check some code she had been<\/p>\n","protected":false},"author":32,"featured_media":3803,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[5,150,238],"tags":[446,91,152,659,983],"class_list":["post-14282","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-programming","category-python","tag-learning","tag-linux","tag-programming","tag-python","tag-training"],"modified_by":"David Both","_links":{"self":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/14282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14282"}],"version-history":[{"count":2,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/14282\/revisions"}],"predecessor-version":[{"id":14286,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/14282\/revisions\/14286"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/media\/3803"}],"wp:attachment":[{"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}