{"id":33,"date":"2025-10-17T13:38:00","date_gmt":"2025-10-17T13:38:00","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/r_najim\/?p=33"},"modified":"2025-10-17T13:38:00","modified_gmt":"2025-10-17T13:38:00","slug":"friday-oct-17-2025","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/r_najim\/2025\/10\/17\/friday-oct-17-2025\/","title":{"rendered":"Friday Oct, 17, 2025"},"content":{"rendered":"\n<p>Today This Free Friday I am working on a project on YouTube a  Timed Math challenge<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=21FnnGKSRZo&amp;t=1776s\">https:\/\/www.youtube.com\/watch?v=21FnnGKSRZo&amp;t=1776s<\/a><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>import random\n\nOPERATORS = &#91;\"+\", \"-\",\"*\"]\nMIN_OPERAND = 3\nMAX_OPERAND = 12\n\ndef generate_problem():\n    left = random.randint(MIN_OPERAND, MAX_OPERAND)\n    right = random.randint(MIN_OPERAND, MAX_OPERAND)\n    operator = random.choice(OPERATORS)\n\n    expr = str(left) + \" \" + str(right)\n    answer = evalexpr)\n    return expr\n\n\nexpr, answer = generate_problem()<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This part of the code does the random choice of a number in the game <\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>for i in range(TOTAL_PROBLEMS):\n    expr, anwer = generate_problem()\n    while True:\n        guess = input(\"Problem #\" + str(i+1) + \": \" + expr + \" = \")\n        if guess == str(answer):\n            break<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This part of the code does the question and makes sure that the answer you put in is correct<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today This Free Friday I am working on a project on YouTube a Timed Math challenge<\/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":"default","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-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":"","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-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":"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":""},"mobile":{"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":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-33","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/posts\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/comments?post=33"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/posts\/33\/revisions"}],"predecessor-version":[{"id":34,"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/posts\/33\/revisions\/34"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/media?parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/categories?post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/tags?post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}