{"id":122,"date":"2026-01-25T03:36:26","date_gmt":"2026-01-25T03:36:26","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/d_eanes\/?p=122"},"modified":"2026-01-25T03:37:08","modified_gmt":"2026-01-25T03:37:08","slug":"free-friday-12-19-25","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/d_eanes\/2026\/01\/25\/free-friday-12-19-25\/","title":{"rendered":"Free Friday: 12\/19\/25"},"content":{"rendered":"\n<p>Today, I watched a video and created a Python alarm clock. This video helped me better understand Python&#8217;s time and datetime modules. The program runs in the terminal, asks the user to enter a time, and then waits until that time to play a sound and alert the user.<\/p>\n\n\n\n<p><strong>SNIPPETS<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import time\nimport datetime\nimport pygame\n<\/code><\/pre>\n\n\n\n<p>^These imports provide the tools needed for the program. time and datetime let the program keep track of the current time, and pygame is used to play a music file when the alarm goes off.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def set_alarm(alarm_time):\n    print(f\"Alarm set for {alarm_time}\")\n    sound_file = \"my_music.mp3\"\n    is_running = True<\/code><\/pre>\n\n\n\n<p>^This function sets up the alarm. It prints the time the alarm is set for, chooses a sound file to play, and creates a loop  to keep the alarm running.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"474\" height=\"200\" src=\"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-content\/uploads\/2026\/01\/Screenshot-2026-01-24-223223.png\" alt=\"\" class=\"wp-image-123\" srcset=\"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-content\/uploads\/2026\/01\/Screenshot-2026-01-24-223223.png 474w, https:\/\/theroyalscode.com\/students\/d_eanes\/wp-content\/uploads\/2026\/01\/Screenshot-2026-01-24-223223-300x127.png 300w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Today, I watched a video and created a Python alarm clock. This video helped me better understand Python&#8217;s time and datetime modules. The program runs in the terminal, asks the user to enter a time, and then waits until that time to play a sound and alert the user. SNIPPETS: ^These imports provide the tools&#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-122","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\/122","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=122"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/posts\/122\/revisions"}],"predecessor-version":[{"id":124,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/posts\/122\/revisions\/124"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/media?parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/categories?post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_eanes\/wp-json\/wp\/v2\/tags?post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}