{"id":155,"date":"2026-04-17T14:00:41","date_gmt":"2026-04-17T14:00:41","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/d_harkless\/?p=155"},"modified":"2026-04-17T14:00:41","modified_gmt":"2026-04-17T14:00:41","slug":"free-friday-4-17-26","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/d_harkless\/2026\/04\/17\/free-friday-4-17-26\/","title":{"rendered":"Free Friday 4\/17\/26"},"content":{"rendered":"\n<p>Today in class, I made a alarm clock. It asks the user to enter a time for the alarm and shows the time until the entered time, then it says wake up.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"389\" height=\"126\" src=\"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2026\/04\/image-5.png\" alt=\"\" class=\"wp-image-156\" srcset=\"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2026\/04\/image-5.png 389w, https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2026\/04\/image-5-300x97.png 300w\" sizes=\"auto, (max-width: 389px) 100vw, 389px\" \/><\/figure>\n\n\n\n<p>This is the code that asks the user to enter a time.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if __name__ == \"__main__\":\n    alarm_time = input(\"Enter the alarm time (HH:MM:SS): \")\n    set_alarm(alarm_time)<\/code><\/pre>\n\n\n\n<p>This is the code that shows the time changing.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> while is_running:\n        current_time = datetime.datetime.now().strftime(\"%H:%M:%S\")\n        print(current_time)\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"101\" height=\"273\" src=\"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2026\/04\/image-6.png\" alt=\"\" class=\"wp-image-157\"\/><\/figure>\n\n\n\n<p>This is the code that prints &#8220;WAKE UP&#8221;.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> if current_time == alarm_time:\n            print(\"WAKE UP!\")\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"561\" height=\"494\" src=\"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2026\/04\/image-7.png\" alt=\"\" class=\"wp-image-158\" style=\"width:460px;height:auto\" srcset=\"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2026\/04\/image-7.png 561w, https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2026\/04\/image-7-300x264.png 300w\" sizes=\"auto, (max-width: 561px) 100vw, 561px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Today in class, I made a alarm clock. It asks the user to enter a time for the alarm and shows the time until the entered time, then it says wake up. This is the code that asks the user to enter a time. This is the code that shows the time changing. This is [&hellip;]<\/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-155","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts\/155","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=155"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts\/155\/revisions"}],"predecessor-version":[{"id":159,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts\/155\/revisions\/159"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/media?parent=155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/categories?post=155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/tags?post=155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}