{"id":46,"date":"2025-11-21T15:27:21","date_gmt":"2025-11-21T15:27:21","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/r_najim\/?p=46"},"modified":"2025-11-21T15:27:21","modified_gmt":"2025-11-21T15:27:21","slug":"friday-november-21-2025","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/r_najim\/2025\/11\/21\/friday-november-21-2025\/","title":{"rendered":"Friday, November, 21 2025"},"content":{"rendered":"\n<ul class=\"wp-block-list\">\n<li>Today This Free Friday I am working on a project on YouTube a slot Machine<\/li>\n\n\n\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=NpmFbWO6HPU&amp;t=7515s\">https:\/\/www.youtube.com\/watch?v=NpmFbWO6HPU&amp;t=7515s<\/a><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>def deposit():\n    while True:\n        amount = input(\"What would you like to deposit? $\")\n        if amount.isdigit():\n            amount = int(amount)\n            if amount > 0:\n                break\n            else:\n                print(\"Amount must be greater than 0.\")\n            \n        else:\n            print(\"Please enter a number.\")\n\n    return amount<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This part of the code tells the user to deposit amount that is not 0 or under.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>def get_number_of_lines():\n     while True:\n        lines  = input(\"Enter the number of lines to bet on (1-\" + str(MAX_LINES) + \")? \")\n        if lines.isdigit():\n            lines = int(lines)\n            if 1 &lt;= lines &lt;= MAX_LINES:\n                break\n            else:\n                print(\"Enter a valid number of lines.\")\n            \n        else:\n            print(\"Please enter a number.\")\n            \n     return lines\n\n\n\ndef main():\n    balance = deposit()\n    lines = get_number_of_lines()\n    print(balance, lines)\n\n\nmain()<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This part of the code tells the user to Enter the number of lines to bet on and makes sure to Enter a valid number of lines.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>def get_bet():\n    while True:\n        amount = input(\"What would you like to bet on each line? $\")\n        if amount.isdigit():\n            amount = int(amount)\n            if MIN_BET &lt;= amount &lt;= MAX_BET:\n                break\n            else:\n                print(f\"Amount must be between ${MIN_BET} - ${MAX_BET}.\")\n            \n        else:\n            print(\"Please enter a number.\")\n\n    return amount\n\n\ndef main():\n    balance = deposit()\n    lines = get_number_of_lines()\n    bet = get_bet()\n    total_bet = bet * lines\n    print(f\"You are betting ${bet} on {lines} lines. Total bet is equal to: ${total_bet}\")\n\n\n\n\nmain()<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This part of the code tells the user how much does the user  would like to bet on each line. And make sure the user bet a amount that is Enter a valid number of lines. <\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"","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-46","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/posts\/46","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=46"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":47,"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/posts\/46\/revisions\/47"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/categories?post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/r_najim\/wp-json\/wp\/v2\/tags?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}