{"id":152,"date":"2026-05-29T13:52:36","date_gmt":"2026-05-29T13:52:36","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/l_rankins\/?p=152"},"modified":"2026-05-29T13:52:36","modified_gmt":"2026-05-29T13:52:36","slug":"post-28-casinomad","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/l_rankins\/2026\/05\/29\/post-28-casinomad\/","title":{"rendered":"POST 28: CASINOMAD"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Today I made a Slot machine<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>symbols = &#91;\"\ud83c\udf52\", \"\ud83c\udf4b\", \"\ud83d\udd14\", \"\ud83d\udc8e\", \"7\", \"\ud83c\udf40\"]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>This is the code for the Symbols<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>while True:\n\n\n    spin = random.choices(symbols, k=3)\n\n\n    print(\"\\nSpinning...\")\n    print(f\"\\n| {spin&#91;0]} | {spin&#91;1]} | {spin&#91;2]} |\")<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>This is the code for the spinning<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    if spin&#91;0] == spin&#91;1] == spin&#91;2]:\n        print(\"\\n\ud83c\udf89 JACKPOT! All three match!\")\n    elif spin&#91;0] == spin&#91;1] or spin&#91;0] == spin&#91;2] or spin&#91;1] == spin&#91;2]:\n        print(\"\\n\u2728 Two symbols match! Not bad!\")\n    else:\n        print(\"\\n\ud83d\ude41 No match. Try again!\")\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>This is the code that sees if you won<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    choice = input(\"\\nPlay again? (y\/n): \").strip().lower()\n    if choice != 'y':\n        print(\"\\nThanks for playing! \ud83c\udfb2\")\n        break<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>This is the code that allows you to play again<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I made a Slot machine This is the code for the Symbols This is the code for the spinning [&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-152","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/posts\/152","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=152"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/posts\/152\/revisions"}],"predecessor-version":[{"id":153,"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/posts\/152\/revisions\/153"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/media?parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/categories?post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_rankins\/wp-json\/wp\/v2\/tags?post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}