{"id":111,"date":"2026-01-16T16:13:58","date_gmt":"2026-01-16T16:13:58","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/l_rankins\/?p=111"},"modified":"2026-01-16T16:13:58","modified_gmt":"2026-01-16T16:13:58","slug":"blog-make-up-2","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/l_rankins\/2026\/01\/16\/blog-make-up-2\/","title":{"rendered":"BLOG MAKE UP 2:"},"content":{"rendered":"\n<p><strong>I made a Clock<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from tkinter import *\nimport time\n\nclk = Tk()\nclk.title(\"Clock\")\nclk.geometry(\"1350x700+0+0\")\nclk.config(bg=\"#0C1E28\")\n\ndef clock():\n    hr = str(time.strftime(\"%H\"))\n    mn = str(time.strftime(\"%M\"))\n    sc = str(time.strftime(\"%S\"))\n    # print(hr,mn,sc)\n    if int(hr)>12 and int (mn) > 0 :\n        lb_dn.config(text = \"PM\")\n    if int(hr) > 12:\n        hr = str(int(int(hr)-12))\n<\/code><\/pre>\n\n\n\n<p><strong>This is the code that calculates the time and decides if its AM or PM<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n    lb_hr.config(text = hr)\n    lb_mn.config(text = mn)\n    lb_sc.config(text = sc)\n\n    lb_hr.after( 200, clock)\n\nlb_hr = Label(clk,text= \"12\", font = (\"Times 20 bold\",75,'bold'),bg = \"#087587\", fg= \"white\")\nlb_hr.place(x=350,y=200,width=150,height=150)\n\nlb_hr_text = Label(clk, text = \"HOUR\", font = (\"Times 20 bold\",20,'bold'), bg = \"#087587\", fg= \"white\")\nlb_hr_text.place(x=350,y=360,width=150,height= 50)\n\nlb_mn = Label(clk,text= \"12\", font = (\"Times 20 bold\",75,'bold'),bg = \"#008EA4\", fg= \"white\")\nlb_mn.place(x=520,y=200,width=150,height=150)\n\nlb_mn_text = Label(clk, text = \"MINUTE\", font = (\"Times 20 bold\",20,'bold'), bg = \"#008EA4\", fg= \"white\")\nlb_mn_text.place(x=520,y=360,width=150,height= 50)\n\nlb_sc = Label(clk,text= \"12\", font = (\"Times 20 bold\",75,'bold'),bg = \"#06B4BB\", fg= \"white\")\nlb_sc.place(x=690,y=200,width=150,height=150)\n\nlb_sc_text = Label(clk, text = \"SECOND\", font = (\"Times 20 bold\",20,'bold'), bg = \"#06B4BB\", fg= \"white\")\nlb_sc_text.place(x=690,y=360,width=150,height= 50)\n\nlb_dn = Label(clk,text= \"AM\", font = (\"Times 20 bold\",70,'bold'),bg = \"#9F0646\", fg= \"white\")\nlb_dn.place(x=860,y=200,width=150,height=150)\n\nlb_dn_text = Label(clk, text = \"NOON\", font = (\"Times 20 bold\",20,'bold'), bg = \"#9F0646\", fg= \"white\")\nlb_dn_text.place(x=860,y=360,width=150,height= 50)\n\nclock()\nclk.mainloop()<\/code><\/pre>\n\n\n\n<p><strong>This is the code that makes it look nice deciding its colors and border and such.<\/strong><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I made a Clock. This is the code that calculates the time and decides if its AM or PM. This [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-111","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/posts\/111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/comments?post=111"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/posts\/111\/revisions"}],"predecessor-version":[{"id":114,"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/posts\/111\/revisions\/114"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/media?parent=111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/categories?post=111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/tags?post=111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}