{"id":56,"date":"2025-10-21T14:59:46","date_gmt":"2025-10-21T11:29:46","guid":{"rendered":"https:\/\/mbahrani.yclass2.ir\/?page_id=56"},"modified":"2025-10-21T15:52:49","modified_gmt":"2025-10-21T12:22:49","slug":"56-2","status":"publish","type":"page","link":"https:\/\/mbahrani.yclass2.ir\/?page_id=56","title":{"rendered":""},"content":{"rendered":"\n<style>\n  body {\n    font-family: 'Courier New', monospace;\n    background-color: #111;\n    color: #eee;\n    text-align: center;\n    padding: 50px;\n  }\n  .problem {\n    font-size: 2em;\n    margin: 20px;\n  }\n  .timer {\n    font-size: 1.5em;\n    color: #f33;\n  }\n  input, button {\n    font-size: 1em;\n    padding: 10px;\n    margin: 10px;\n  }\n  .feedback {\n    font-size: 1.2em;\n    margin-top: 20px;\n  }\n<\/style>\n\n<div class=\"problem\" id=\"problem\">Loading&#8230;<\/div>\n<div class=\"timer\" id=\"timer\">Time: 30<\/div>\n<input type=\"number\" id=\"answer\" placeholder=\"Your answer\">\n<button onclick=\"checkAnswer()\">Submit<\/button>\n<div class=\"feedback\" id=\"feedback\"><\/div>\n<button onclick=\"nextProblem()\">Next Problem<\/button>\n\n\n\n<script>\n  let currentAnswer = 0;\n  let timeLeft = 30;\n  let timerInterval;\n\n  function generateProblem() {\n    const ops = ['+', '-', '*', '\/'];\n    const op = ops[Math.floor(Math.random() * ops.length)];\n    let a = Math.floor(Math.random() * 101) - 50;\n    let b = Math.floor(Math.random() * 101) - 50;\n\n    if (op === '\/') {\n      b = b === 0 ? 1 : b;\n      a = a * b;\n    }\n\n    const question = ${a} ${op} ${b};\n    currentAnswer = Math.round(eval(question));\n    document.getElementById('problem').textContent = question + ' = ?';\n    document.getElementById('feedback').textContent = '';\n    document.getElementById('answer').value = '';\n    resetTimer();\n  }\n\n  function resetTimer() {\n    clearInterval(timerInterval);\n    timeLeft = 30;\n    document.getElementById('timer').textContent = Time: ${timeLeft};\n    timerInterval = setInterval(() => {\n      timeLeft--;\n      document.getElementById('timer').textContent = Time: ${timeLeft};\n      if (timeLeft <= 0) {\n        clearInterval(timerInterval);\n        document.getElementById('feedback').textContent = \u23f0 Time's up! Answer was ${currentAnswer};\n      }\n    }, 1000);\n  }\n\n  function checkAnswer() {\n    clearInterval(timerInterval);\n    const userAnswer = parseInt(document.getElementById('answer').value);\n    if (userAnswer === currentAnswer) {\n      document.getElementById('feedback').textContent = ':white_check_mark: Correct!';\n    } else {\n      document.getElementById('feedback').textContent = \u274c Wrong! Answer was ${currentAnswer};\n    }\n  }\n\n  function nextProblem() {\n    generateProblem();\n  }\n\n  generateProblem();\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Loading&#8230; Time: 30 Submit Next Problem<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-56","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>- \u0637\u0631\u0627\u062d\u06cc<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"- \u0637\u0631\u0627\u062d\u06cc\" \/>\n<meta property=\"og:description\" content=\"Loading&#8230; Time: 30 Submit Next Problem\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mbahrani.yclass2.ir\/?page_id=56\" \/>\n<meta property=\"og:site_name\" content=\"\u0637\u0631\u0627\u062d\u06cc\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-21T12:22:49+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mbahrani.yclass2.ir\/?page_id=56\",\"url\":\"https:\/\/mbahrani.yclass2.ir\/?page_id=56\",\"name\":\"- \u0637\u0631\u0627\u062d\u06cc\",\"isPartOf\":{\"@id\":\"https:\/\/mbahrani.yclass2.ir\/#website\"},\"datePublished\":\"2025-10-21T11:29:46+00:00\",\"dateModified\":\"2025-10-21T12:22:49+00:00\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mbahrani.yclass2.ir\/?page_id=56\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mbahrani.yclass2.ir\/#website\",\"url\":\"https:\/\/mbahrani.yclass2.ir\/\",\"name\":\"\u0637\u0631\u0627\u062d\u06cc\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mbahrani.yclass2.ir\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"- \u0637\u0631\u0627\u062d\u06cc","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"- \u0637\u0631\u0627\u062d\u06cc","og_description":"Loading&#8230; Time: 30 Submit Next Problem","og_url":"https:\/\/mbahrani.yclass2.ir\/?page_id=56","og_site_name":"\u0637\u0631\u0627\u062d\u06cc","article_modified_time":"2025-10-21T12:22:49+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/mbahrani.yclass2.ir\/?page_id=56","url":"https:\/\/mbahrani.yclass2.ir\/?page_id=56","name":"- \u0637\u0631\u0627\u062d\u06cc","isPartOf":{"@id":"https:\/\/mbahrani.yclass2.ir\/#website"},"datePublished":"2025-10-21T11:29:46+00:00","dateModified":"2025-10-21T12:22:49+00:00","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mbahrani.yclass2.ir\/?page_id=56"]}]},{"@type":"WebSite","@id":"https:\/\/mbahrani.yclass2.ir\/#website","url":"https:\/\/mbahrani.yclass2.ir\/","name":"\u0637\u0631\u0627\u062d\u06cc","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mbahrani.yclass2.ir\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/mbahrani.yclass2.ir\/index.php?rest_route=\/wp\/v2\/pages\/56","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mbahrani.yclass2.ir\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mbahrani.yclass2.ir\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mbahrani.yclass2.ir\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mbahrani.yclass2.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=56"}],"version-history":[{"count":4,"href":"https:\/\/mbahrani.yclass2.ir\/index.php?rest_route=\/wp\/v2\/pages\/56\/revisions"}],"predecessor-version":[{"id":60,"href":"https:\/\/mbahrani.yclass2.ir\/index.php?rest_route=\/wp\/v2\/pages\/56\/revisions\/60"}],"wp:attachment":[{"href":"https:\/\/mbahrani.yclass2.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}