{"id":79,"date":"2025-09-19T13:31:04","date_gmt":"2025-09-19T13:31:04","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/d_eanes\/?p=79"},"modified":"2025-09-19T13:50:33","modified_gmt":"2025-09-19T13:50:33","slug":"free-friday-calculator","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/d_eanes\/2025\/09\/19\/free-friday-calculator\/","title":{"rendered":"Free Friday: Calculator"},"content":{"rendered":"\n<p>Today, I watched this <a href=\"https:\/\/www.youtube.com\/watch?v=6CZB6VTy3Hg&amp;list=PLl316cKxhMxtOWHa88kDqm42uWz1aqGfD\" data-type=\"link\" data-id=\"https:\/\/www.youtube.com\/watch?v=6CZB6VTy3Hg&amp;list=PLl316cKxhMxtOWHa88kDqm42uWz1aqGfD\">video<\/a> and made a calculator.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    def show(self, value):\n        self.entry_value += str(value)\n        self.equation.set(self.entry_value)<\/code><\/pre>\n\n\n\n<p>^ This is called whenever a button on the calculator is pressed. It takes a button&#8217;s value, adds it to a string, then updates the display with a new string. That&#8217;s how the numbers and operators appear as you type.<\/p>\n\n\n\n<p>This project taught me how to open a window in Tkinter.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"351\" height=\"439\" src=\"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-15-094817.png\" alt=\"\" class=\"wp-image-81\" srcset=\"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-15-094817.png 351w, https:\/\/theroyalscode.com\/students\/d_eanes\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-15-094817-240x300.png 240w\" sizes=\"auto, (max-width: 351px) 100vw, 351px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Today, I watched this video and made a calculator. ^ This is called whenever a button on the calculator is pressed. It takes a button&#8217;s value, adds it to a string, then updates the display with a new string. That&#8217;s how the numbers and operators appear as you type. This project taught me how to&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-79","post","type-post","status-publish","format-standard","hentry","category-free-friday"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/posts\/79","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/comments?post=79"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/posts\/79\/revisions"}],"predecessor-version":[{"id":82,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/posts\/79\/revisions\/82"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/media?parent=79"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/categories?post=79"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/tags?post=79"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}