{"id":91,"date":"2025-12-12T15:04:24","date_gmt":"2025-12-12T15:04:24","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/d_harkless\/?p=91"},"modified":"2025-12-12T15:04:24","modified_gmt":"2025-12-12T15:04:24","slug":"free-friday-12-12-25","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/d_harkless\/2025\/12\/12\/free-friday-12-12-25\/","title":{"rendered":"Free Friday 12\/12\/25"},"content":{"rendered":"\n<p>Today in class, I made a spelling checker. When you spell a word wrong it turns the word red. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"599\" height=\"526\" src=\"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2025\/12\/image-9.png\" alt=\"\" class=\"wp-image-93\" style=\"width:411px;height:auto\" srcset=\"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2025\/12\/image-9.png 599w, https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2025\/12\/image-9-300x263.png 300w\" sizes=\"auto, (max-width: 599px) 100vw, 599px\" \/><\/figure>\n\n\n\n<p>This is the check code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> def check(self, event):\n        content = self.text.get(\"1.0\", tk.END)\n        space_count = content.count(\" \")\n\n        if space_count != self.old_spaces:\n            self.old_spaces = space_count\n\n        for tag in self.text.tag_names():\n            self.text.tag_delete(tag)\n\n            for word in content.split(\" \"):\n                if re.sub(r\"&#91;^\\w]\", \"\", word.lower()) not in words.words():\n                    position = content.find(word)\n                    self.text.tag_add(word, f\"1.{position}\", f\"1.{position + len(word)}\")\n                    self.text.tag_config(word, foreground=\"red\")\n\n\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"591\" height=\"528\" src=\"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2025\/12\/image-10.png\" alt=\"\" class=\"wp-image-94\" style=\"aspect-ratio:1.1193459760101856;width:513px;height:auto\" srcset=\"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2025\/12\/image-10.png 591w, https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2025\/12\/image-10-300x268.png 300w\" sizes=\"auto, (max-width: 591px) 100vw, 591px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Real-Time Spelling Checker in Python\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/_nkQd9SyEpw?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Today in class, I made a spelling checker. When you spell a word wrong it turns the word red. This is the check code:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-91","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/comments?post=91"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts\/91\/revisions"}],"predecessor-version":[{"id":95,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts\/91\/revisions\/95"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/media?parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/categories?post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/tags?post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}