{"id":53313,"date":"2022-11-11T01:26:24","date_gmt":"2022-11-11T07:26:24","guid":{"rendered":"https:\/\/www.codewizardshq.com\/?p=53313"},"modified":"2025-04-22T23:48:26","modified_gmt":"2025-04-23T05:48:26","slug":"python-tutorial-for-kids-pig-dice-game","status":"publish","type":"post","link":"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/","title":{"rendered":"Python Tutorial for Kids: \u201cPig\u201d Dice Game"},"content":{"rendered":"\n<p><strong>\u201cPig\u201d is an easy and fun dice game that anyone in the family can play. <\/strong>You only need one die in hand and know basic arithmetic to play the game. It\u2019s an entertaining way for kids to practice adding and learn about probability.<\/p>\n\n\n<p style=\"background: none repeat scroll 0 0 #ecf3f6; clear: both; margin-bottom: 18px; overflow: hidden; border: 1px solid #011e41; padding: 16px;\"><span>\ud83d\udccc<\/span><small><strong> [Download] Free Python Lesson Plans<\/strong> Get free 1-week Python lesson plans and slides for kids ages 11-13 to start learning about Python coding. <a href=\"#lesson-plans\">Download Now<\/a><\/small><\/p>\n\n\n\n<p><strong>If there\u2019s no one around to play with, you can challenge the computer! <\/strong>Build your own \u201cPig\u201d game using Python that you can play anytime. This simple app will roll the dice for you and the computer and add up your points too. All you have to do is click.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-complete-this-python-coding-tutorial-to-make-your-own-pig-dice-game\"><strong>Complete this Python coding tutorial to make your own \u201cPig\u201d Dice Game.<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/hzZ2-BKEwnvTvJXqlciQPts5hBfBkrTSsWS8FGTjE2JMQHbYdxRMgYrjoPrUaWF6A-hY5ks1v1RjEY4AJzi7yk_p42dLmliCR_9X38dl94gmTExpYMAwEoRem6SHKoC-t8stYp5_JYJHmBjZK7ZoR1N4-fQeYoPYdgDFeYpOhlGMC3L5y7p4aqeekNOX-g\" alt=\"Pig dice game \"\/><\/figure>\n\n\n\n<p>This is a beginner Python tutorial that will walk you through all of the code from start to finish.<\/p>\n\n\n\n<p>Play the completed <a href=\"https:\/\/projects.codewizardshq.com\/x_hour_of_code_2022\/python-projects\/pig\/main.py\">\u201cPig\u201d Dice Game<\/a>.&nbsp;<\/p>\n\n\n<div class=\"lazyblock-cw1-wide-post-container-aUEj6 wp-block-lazyblock-cw1-wide-post-container\"><div class=\"wide \"><div class=\"lazyblock-inner-blocks\">\n\n<div class=\"wp-block-atomic-blocks-ab-container table-of-contents ab-block-container\"><div class=\"ab-container-inside\"><div class=\"ab-container-content\">\n<p class=\"has-text-align-left title\"><strong>Tutorial Steps<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#step1\">Step 1: Create and display a welcome message with the game rules<\/a><\/li>\n\n\n\n<li><a href=\"#step2\">Step 2: Get the user&#8217;s name and create the game loop<\/a><\/li>\n\n\n\n<li><a href=\"#step3\">Step 3: Simulate rolling dice<\/a><\/li>\n\n\n\n<li><a href=\"#step4\">Step 4: Create a function to update the scores of each player<\/a><\/li>\n\n\n\n<li><a href=\"#step5\">Step 5: Display a formatted scoreboard<\/a><\/li>\n\n\n\n<li><a href=\"#step6\">Step 6: Determine the game winner<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/complete\">Finished project!<\/a><\/li>\n<\/ul>\n<\/div><\/div><\/div>\n\n<\/div><\/div><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-you-need\">What you need:<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-text-editor\">1. Text editor<\/h3>\n\n\n\n<p><strong>We\u2019ll be using the CodeWizardsHQ editor to write and run our Python code. <\/strong>If you\u2019re a CodeWizardsHQ student, download the x_hour_of_code_2022 project for the completed code.&nbsp;<\/p>\n\n\n\n<p>You can also use an online text editor like <a href=\"https:\/\/replit.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">replit<\/a> that allows you to author and run Python programs in a web browser.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-an-empty-python-file\">2. An empty Python file<\/h3>\n\n\n\n<p><strong>Create a new empty Python file and add your code there.<\/strong>&nbsp;<\/p>\n\n\n\n<p>Our file is named main.py. If you&#8217;re using another platform to write and execute your code, you can choose whichever name you like.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-this-tutorial-is-for-beginner-python-programmers-ages-11-it-assumes-you-understand-basic-python-code-let-s-get-started\">This tutorial is for beginner Python programmers ages 11+. It assumes you understand basic Python code. Let&#8217;s get started!<\/h3>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step1\">Step 1: Create and display a welcome message with the game rules<\/h2>\n\n\n\n<p>We&#8217;ll begin by displaying a welcome message to the user that explains the rules of &#8220;Pig&#8221;, the dice game we&#8217;ll build in this project.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Create a multi-line string representing the game rules of &#8220;Pig&#8221; and store this string inside a variable called <code>welcome_message<\/code>.<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>\n<mark>\nwelcome_message = \"\"\"\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Welcome to 'Pig', a dice game!\n&nbsp; &nbsp;\n&nbsp; &nbsp; In this game, a user and a computer opponent\n&nbsp; &nbsp; roll a 6-sided die each round. If the value of\n&nbsp; &nbsp; the die is a 1, the player that rolled the 1 loses\n&nbsp; &nbsp; all of their points. Otherwise, the player gets the\n&nbsp; &nbsp; value of the die added to their points. The first\n&nbsp; &nbsp; player to reach 30 points wins!\n\"\"\"\n<\/mark><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use Python&#8217;s built-in print() function to display the welcome_message. <\/strong>Note, don&#8217;t type the &#8230; characters, those are used to hide unnecessary code from an example!<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>welcome_message = \"\"\"\n&nbsp; &nbsp; &nbsp; &nbsp; ...\n\"\"\"\n\n<mark>print(welcome_message)<\/mark><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1 Output:<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/MSMpKyt9NU0yOvZTfcPXRJ7jitjAsW6OmsPVh3HlhgOnJqi034Y7M7eTsECGLWsXylt4AF-8bs8GMqjK-gnSRIed60BktZkfjm9WGoSgdwyeyTUX0cUqLbemUtQEcr8XZBABA60sweqPppHszsBLlEqVp2w2cqrF9BkiVfE35UU2mPm-5XHh6pp1Ht8PmA\" alt=\"Python tutorial step 1 output\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step2\">Step 2: Get the user&#8217;s name and create the game loop<\/h2>\n\n\n\n<p>Prompt the user for their name, create a game loop, and allow the user to roll the dice.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Create a variable called username.<\/strong><\/li>\n\n\n\n<li><strong>Use the input() function to prompt the user for their name and store it in the variable.<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>welcome_message = \"\"\"\n&nbsp; &nbsp; &nbsp; &nbsp; ...\n\"\"\"\n\nprint(welcome_message)\n\n<mark>username = input(\"What is your name? \")<\/mark><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Create a while loop to represent the game loop.<\/strong> <\/li>\n\n\n\n<li><strong>Inside the while loop, use the input() function to prompt the user to press &#8220;Enter&#8221; to roll the die.<\/strong> <\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>username = input(\"What is your name? \")\n<mark>\nwhile True:\n    input(f\"Press 'Enter' to roll the die {username}!\\n\")<\/mark><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Add a break statement to ensure the loop only runs once. <\/strong>We do this while building a game to make it easy to test out our game logic once and then exit.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>while True:\n    input(f\"Press 'Enter' to roll the die {username}!\\n\")\n\n    <mark>break<\/mark><\/code><\/pre>\n\n\n\n<p style=\"background: none repeat scroll 0 0 #ececec; clear: both; margin-bottom: 18px; overflow: hidden; border: 1px solid #eeeeee; padding: 13px;\"><strong><i> Hint:<\/i><\/strong><i> Ask any question you like and get the input from the user. The \\n notation adds an additional new line which makes our output look a little nicer.<\/i><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2 Output<\/strong>:<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/T4_vwEDuOdBZEavlSiOmLz8uSSxukBTs8pWtRk-SkqYT7YXf9oDMF6fMyy7pUEZqbppaTbLPhjJC5oXAwmuCOyFgmOd8343Y4euRTej0IGcPwxXQXIkzgJVFpNHIyNIce6MTLo_ZkISK6QelTY1veG8SMP7I5xMRFu05rHqUNlNJQsblj9Q1DHJNOXTXSw\" alt=\"Python tutorial step 2 output\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step3\">Step 3: Simulate rolling dice<\/h2>\n\n\n\n<p>Simulate rolling a six-sided die and display the player\u2019s and computer\u2019s roll.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Import the randint() function from Python&#8217;s built-in random module. <\/strong>This function allows us to generate random numbers, which we&#8217;ll use to &#8220;fake&#8221; rolling a six-sided die. Imports should always appear at the <strong><em>top<\/em><\/strong> of your file, before any other code.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code><mark>from random import randint<\/mark>\n\n\nwelcome_message = \"\"\"\n    ...\n\"\"\"<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>In the while loop, use the randint() function to generate a random number between 1 and 6.<\/strong> Store this number in a player_die_value and use an f-string to display the username and player_die_value.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>while True:\n    input(f\"Press 'Enter' to roll the die {username}!\\n\")\n<mark>\n    player_die_value = randint(1, 6)\n    print(f\"{username} rolls a {player_die_value}\")\n<\/mark>\n    break<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use the randint() function to generate another random number between 1 and 6.<\/strong> Store this number in a computer_die_value and use an f-string to display the computer_die_value. Note that the break statement still needs to be the last thing in the while loop.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>while True:\n    input(f\"Press 'Enter' to roll the die {username}!\\n\")\n\n    player_die_value = randint(1, 6)\n    print(f\"{username} rolls a {player_die_value}\")\n<mark>\n    computer_die_value = randint(1, 6)\n    print(f\"Computer rolls a {computer_die_value}\")\n<\/mark>\n    break<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3 Output:<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/885Ldo0WjB6HfbgU9MRcUlZDxJVLCejbiWqSVvUbsGackAUstH20xQRf_JhotJGsBnudUJ9ZWG5PpMwwHl3wzubyWX0tsHv4kFG2-TjNKV5KOpTEER38LyijlyelHGwIC1JfFoITmfkZ1SoWZop0NNpO1kDGrq5QOYJC9v3kV9jW6giTwTPHX16T4oemIQ\" alt=\"Python tutorial step 3 output\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step4\">Step 4: Create a function to update the scores of each player<\/h2>\n\n\n\n<p>Now, let\u2019s calculate and track the player\u2019s and computer\u2019s score after each roll. We\u2019ll create a function to determine whether each player gets points added to their score or gets their score reset to 0.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Create two variables to hold the scores of our players: player_score and computer_score. <\/strong>Each variable should initially be set to 0 because our players start with no points.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code><mark>player_score = 0\ncomputer_score = 0\n<\/mark>\nwelcome_message = \"\"\"\n    ...\n\"\"\"<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Define a function at the <em>top<\/em> of your file called update_score(). <\/strong>It should take two parameters: score and die_value. We&#8217;ll use this function to return 0 if the die_value is 1 and the sum of the score and die_value for any other die_value. Function definitions always go at the top of your file, after any import statements.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>from random import randint\n\n\n<mark>def update_score(score, die_value):<\/mark>\n\n\n\nplayer_score = 0\ncomputer_score = 0<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>In the body of the update_score() function, add an if&#8230;else conditional statement.<\/strong> We&#8217;ll return 0 if the die_value is 1, and the sum of the score and die_value for any other case. The return statement lets us send a value out of a function that can be used by the function caller.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>def update_score(score, die_value):\n<mark>\n    if die_value == 1:\n        return 0\n    else:\n        return score + die_value\n<\/mark>\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>In the while loop, use update_score with the player and computer&#8217;s score and die values. <\/strong>Store the return values in player_score and computer_score variables.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>while True:\n    ...\n\n    computer_die_value = randint(1, 6)\n    print(f\"Computer rolls a {computer_die_value}\")\n<mark>\n    player_score = update_score(player_score, player_die_value)\n    computer_score = update_score(computer_score, computer_die_value)\n<\/mark>\n    break<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use the f-string syntax f&#8221;{variable_name=}&#8221; syntax to test that the player_score and computer_score take on the value you&#8217;d expect based on the die value of each player. <\/strong>That special syntax prints the variable name along with its value, and is a handy debugging tool when you&#8217;re developing a program and want to confirm a variable&#8217;s value! Note that the break statement still needs to be the last line of the while loop.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>while True:\n    ...\n\n    player_score = update_score(player_score, player_die_value)\n    computer_score = update_score(computer_score, computer_die_value)\n<mark>\n    print(f\"{player_score=}\")\n    print(f\"{computer_score=}\")\n<\/mark>\n    break<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4 Output<\/strong>:<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/FedqMlcYIGnFA8VZFHb-dqkeI5RtRUkTujhrdhWSm8bCmUNt9dYwK-29Grg1ws3CDy3zjOvoE14iYWmNcc3qASAE-Cz_w61MbIXwi7VJT5xx1KCDlpVFO5AHnxiElxFyeVk5xJfL18reoPTIv6d5Hmgpx_pbBPnRdV2ARqV-Gc4RxJtqLX69J1AmuesgtQ\" alt=\"Python tutorial step 4 output\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step5\">Step 5: Display a formatted scoreboard<\/h2>\n\n\n\n<p>In this step, we&#8217;ll make our game feel a bit more realistic by creating and displaying a scoreboard each round that holds the current score.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>At the <em>top<\/em> of your file, create a function called display_scoreboard() that takes two parameters: player_score and computer_score.&nbsp;<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>def update_score(score, die_value):\n    ...\n\n\n<mark>def display_scoreboard(player_score, computer_score):<\/mark><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>In the body of the display_scoreboard() function, use print() statements to display a formatted scoreboard. <\/strong>Empty print() statements give us some newline padding between calls to display_scoreboard().<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>def display_scoreboard(player_score, computer_score):\n<mark>\n    print()\n    print(\"#\" * 20)\n    print(f\"Player Score: {player_score}\")\n    print(f\"Computer Score: {computer_score}\")\n    print(\"#\" * 20)\n    print()<\/mark><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>In the while loop, remove the print() statements that displayed the player_score and computer_score.<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>while True:\n    ...\n\n    player_score = update_score(player_score, player_die_value)\n    computer_score = update_score(computer_score, computer_die_value)\n<mark>\n    <s>print(f\"{player_score=}\")<\/s>    # Remove this!\n    <s>print(f\"{computer_score=}\") <\/s> # Remove this!\n<\/mark>\n    break<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use the display_scoreboard() function to display your formatted scoreboard. <\/strong>The break statement still needs to be the final statement in your while loop.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>while<\/strong> <strong>True<\/strong>:\n&nbsp; &nbsp; ...\n\n&nbsp; &nbsp; player_score = update_score(player_score, player_die_value)\n&nbsp; &nbsp; computer_score = update_score(computer_score, computer_die_value)\n\n&nbsp; &nbsp; <mark>display_scoreboard(player_score, computer_score)<\/mark>\n\n&nbsp; &nbsp; <strong>break<\/strong><\/code><\/pre>\n\n\n\n<p style=\"background: none repeat scroll 0 0 #ececec; clear: both; margin-bottom: 18px; overflow: hidden; border: 1px solid #eeeeee; padding: 13px;\"><strong><i> Hint:<\/i><\/strong><i> You can create multiple copies of a string in Python using the star (*) operator, which is a handy tool for building our scoreboard banner.<\/i><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 5 Output:<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/OZ6pkVB8oWP8Rf8LlaAms95havAOS7_abXohuDQc5RP8vHkhd9L89PWwCASJoj6RgImysZ0uTXgdjUG0TEdJqTc758n00Ovb_W07BhslogBqF4bUcV99bAxaAOKAB1PHstPNJ-j_e9ZZzYgFGyOz7bM6wdLxz18DqRaxLpD2NB_F9bUWzHFgbnSgdHxWbw\" alt=\"Python tutorial step 5 output\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step6\">Step 6: Determine the game winner<\/h2>\n\n\n\n<p>In the final step, we&#8217;ll check the scores of each player at the end of our game loop and determine who wins! The first player to reach 30 points is the winner.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>At the end of the while loop, remove the break statement.<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>while<\/strong> <strong>True<\/strong>:\n&nbsp; &nbsp; ...\n\n&nbsp; &nbsp; player_score = update_score(player_score, player_die_value)\n&nbsp; &nbsp; computer_score = update_score(computer_score, computer_die_value)\n\n&nbsp; &nbsp; display_scoreboard(player_score, computer_score)\n\n&nbsp; &nbsp; <mark><strong><s>break<\/s><\/strong><\/mark>&nbsp; <em># Remove this!<\/em><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Add an if&#8230;elif conditional statement to determine the winner.<\/strong> Each conditional body should display the respective winner and exit the while loop with a break statement.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>while True:\n    ...\n\n    display_scoreboard(player_score, computer_score)\n<mark>\n    if player_score &gt;= 30:\n        print(f\"{username} wins!\")\n        break\n    elif computer_score &gt;= 30:\n        print(\"Computer wins!\")\n        break<\/mark><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 6 Output<\/strong>:<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/ZZlonqktPvaGuPa2pG642FnRWAXAOIl9kX4V37h2cG_zaRpoCGgtfVHO19dByBU4EbJHp9tPt66Gq4oNd88aXozZLkSpbQuKR2hQP10hE0bFrxCjpkYnocd8RXx62ijipnQT62ShYPAIJp1Gazqw82G2SevnuDiok81qZ-v8k3r2KWiDHGXzb9CcA_P05w\" alt=\"Python tutorial step 6 output\"\/><\/figure>\n\n\n\n<p style=\"background: none repeat scroll 0 0 #ececec; clear: both; margin-bottom: 18px; overflow: hidden; border: 1px solid #eeeeee; padding: 13px;\"><strong><i> Hint:<\/i><\/strong><i> We didn&#8217;t handle ties in this version, but challenge yourself to do that with another \u201cif\u201d statement.<\/i><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"complete\">Your game is complete!<\/h2>\n\n\n\n<p>Check out the <a href=\"https:\/\/projects.codewizardshq.com\/x_hour_of_code_2022\/python-projects\/pig\/main.py\">finished project<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/5FBNe-7n2LkKeCLBppuVd6O2j9a2nPeC86Bt4yNZtW9nvusJYdFxnAO6oRjjY2RT2nNBYn_pZLRzhhkhef5t9hyamdgpSvcMsVLRWffY-ZwDc-NZqnnkBk55HL3V67aG9AXuOW_njSlYTIHh384YqkX_WOPoCfau-rubcoo2tLWPGxbKZohqQxe1NbA2_g\" alt=\"Complete python tutorial for kids\"\/><\/figure>\n\n\n\n<p><strong>Download the <\/strong><a href=\"https:\/\/drive.google.com\/drive\/folders\/1-smD1McHD2dI1C2FT3utjzHE5JKykU8N?usp=sharing\"><strong>project files<\/strong><\/a><strong> and open main.py to view the completed project.<\/strong><\/p>\n\n\n\n<p>We\u2019ve built a simple version together, but there\u2019s plenty more you can do to customize and upgrade your version of \u201cPig\u201d.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"lesson-plans\"><strong>Download 1-Week Python Lesson Plans<\/strong><\/h2>\n\n\n\n<p>Kids, ages 11-13, can start learning Python in a structured way. Download a FREE 1-week lesson plan with activities and slides. Enter your name and email to receive the free lesson plans in your inbox today.<\/p>\n\n\n<!-- This site is converting visitors into subscribers and customers with OptinMonster - https:\/\/optinmonster.com :: Campaign Title: Python Lesson Plans with Location [Download] -->\n<div id=\"om-cvhl80abvbnee4dvgs0y-holder\"><\/div>\n<script>(function(d,u,ac){var s=d.createElement('script');s.type='text\/javascript';s.src='https:\/\/a.omappapi.com\/app\/js\/api.min.js';s.async=true;s.dataset.user=u;s.dataset.campaign=ac;d.getElementsByTagName('head')[0].appendChild(s);})(document,16320,'cvhl80abvbnee4dvgs0y');<\/script>\n<!-- \/ OptinMonster -->\n\n\n<div style=\"height:60px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>If you want to build more games and apps in Python, join CodeWizardsHQ\u2019s live <a href=\"\/\">coding classes for kids<\/a>. <\/strong>It\u2019s the most fun and effective way for kids to learn Python and advance to a real-world coding internship.&nbsp;<\/p>\n\n\n\n<p>Students in our <a href=\"https:\/\/www.codewizardshq.com\/coding-classes-middle-school-students\/\">middle school<\/a> and <a href=\"https:\/\/www.codewizardshq.com\/coding-classes-high-school-students\/\">high school<\/a> core track start by learning fundamental coding concepts in Python. They work with a live, expert instructor who supports them every step of the way. Classes are engaging and you\u2019ll build personalized projects and applications in every lesson.&nbsp;<\/p>\n\n\n\n<p>Enjoy this project!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u201cPig\u201d is an easy and fun dice game that anyone in the family can play. You only need one die in hand and know basic arithmetic to play the game. It\u2019s an entertaining way for kids to practice adding and learn about probability. If there\u2019s no one around to play with, you can challenge the [&hellip;]<\/p>\n","protected":false},"author":336,"featured_media":53401,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"inline_featured_image":false,"_lmt_disableupdate":"yes","_lmt_disable":"","footnotes":""},"categories":[10809,4758],"tags":[10738,10814],"class_list":["post-53313","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-activities","category-learn-coding","tag-python","tag-tutorials"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.8 (Yoast SEO v26.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Python Tutorial for Kids: \u201cPig\u201d Dice Game | CodeWizardsHQ<\/title>\n<meta name=\"description\" content=\"Code your own Pig Dice Game in Python. A step-by-step Python game tutorial for kids and beginners learning to code. Try it out!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Tutorial for Kids: \u201cPig\u201d Dice Game\" \/>\n<meta property=\"og:description\" content=\"Code your own Pig Dice Game in Python. A step-by-step Python game tutorial for kids and beginners learning to code. Try it out!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/\" \/>\n<meta property=\"og:site_name\" content=\"CodeWizardsHQ\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codewizardshq\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-11T07:26:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-23T05:48:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/11\/Pig-python-game-social-banner.png\" \/>\n\t<meta property=\"og:image:width\" content=\"620\" \/>\n\t<meta property=\"og:image:height\" content=\"323\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Daniel Schroeder\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codewizardshq\" \/>\n<meta name=\"twitter:site\" content=\"@codewizardshq\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daniel Schroeder\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\/\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"Article\",\n\t            \"@id\": \"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Daniel Schroeder\",\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/#\/schema\/person\/8f483c66dd46a2d608d50adde5c5c0f2\"\n\t            },\n\t            \"headline\": \"Python Tutorial for Kids: \u201cPig\u201d Dice Game\",\n\t            \"datePublished\": \"2022-11-11T07:26:24+00:00\",\n\t            \"dateModified\": \"2025-04-23T05:48:26+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/\"\n\t            },\n\t            \"wordCount\": 1430,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/11\/Pig-python-game-banner.png\",\n\t            \"keywords\": [\n\t                \"Python\",\n\t                \"tutorials\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Activities\",\n\t                \"Learn Coding\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/\",\n\t            \"url\": \"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/\",\n\t            \"name\": \"Python Tutorial for Kids: \u201cPig\u201d Dice Game | CodeWizardsHQ\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/11\/Pig-python-game-banner.png\",\n\t            \"datePublished\": \"2022-11-11T07:26:24+00:00\",\n\t            \"dateModified\": \"2025-04-23T05:48:26+00:00\",\n\t            \"description\": \"Code your own Pig Dice Game in Python. A step-by-step Python game tutorial for kids and beginners learning to code. Try it out!\",\n\t            \"breadcrumb\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/#breadcrumb\"\n\t            },\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/#primaryimage\",\n\t            \"url\": \"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/11\/Pig-python-game-banner.png\",\n\t            \"contentUrl\": \"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/11\/Pig-python-game-banner.png\",\n\t            \"width\": 1600,\n\t            \"height\": 395,\n\t            \"caption\": \"Pig python game banner\"\n\t        },\n\t        {\n\t            \"@type\": \"BreadcrumbList\",\n\t            \"@id\": \"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/#breadcrumb\",\n\t            \"itemListElement\": [\n\t                {\n\t                    \"@type\": \"ListItem\",\n\t                    \"position\": 1,\n\t                    \"name\": \"Home\",\n\t                    \"item\": \"https:\/\/www.codewizardshq.com\/\"\n\t                },\n\t                {\n\t                    \"@type\": \"ListItem\",\n\t                    \"position\": 2,\n\t                    \"name\": \"Python Tutorial for Kids: \u201cPig\u201d Dice Game\"\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\/\/www.codewizardshq.com\/#website\",\n\t            \"url\": \"https:\/\/www.codewizardshq.com\/\",\n\t            \"name\": \"CodeWizardsHQ\",\n\t            \"description\": \"The leading online coding academy for kids and teens ages 8-18\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\/\/www.codewizardshq.com\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\/\/www.codewizardshq.com\/#organization\",\n\t            \"name\": \"CodeWizardsHQ\",\n\t            \"url\": \"https:\/\/www.codewizardshq.com\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/#\/schema\/logo\/image\/\",\n\t                \"url\": \"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2016\/08\/blueVertical@2x-e1572141901928.png\",\n\t                \"contentUrl\": \"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2016\/08\/blueVertical@2x-e1572141901928.png\",\n\t                \"width\": 150,\n\t                \"height\": 108,\n\t                \"caption\": \"CodeWizardsHQ\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/#\/schema\/logo\/image\/\"\n\t            },\n\t            \"sameAs\": [\n\t                \"https:\/\/www.facebook.com\/codewizardshq\/\",\n\t                \"https:\/\/x.com\/codewizardshq\",\n\t                \"https:\/\/www.instagram.com\/codewizardshq\/\",\n\t                \"https:\/\/www.linkedin.com\/company\/codewizardshq\",\n\t                \"https:\/\/www.pinterest.com\/codewizardshq\/\",\n\t                \"https:\/\/www.youtube.com\/channel\/UC4NM0jfN0LI8_vWtiwLqgGw\"\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\/\/www.codewizardshq.com\/#\/schema\/person\/8f483c66dd46a2d608d50adde5c5c0f2\",\n\t            \"name\": \"Daniel Schroeder\",\n\t            \"image\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/#\/schema\/person\/image\/\",\n\t                \"url\": \"https:\/\/secure.gravatar.com\/avatar\/8a310902521019d3ffab08d7e0833119829be11c3593564c614e825a12882b09?s=96&d=mm&r=g\",\n\t                \"contentUrl\": \"https:\/\/secure.gravatar.com\/avatar\/8a310902521019d3ffab08d7e0833119829be11c3593564c614e825a12882b09?s=96&d=mm&r=g\",\n\t                \"caption\": \"Daniel Schroeder\"\n\t            },\n\t            \"description\": \"Daniel has been a curriculum developer, instructor, forum moderator, and all-around problem-solver at CodeWizardsHQ since mid-2020. He's passionate about programming and constantly strives to improve educational outcomes by creating practical, fun assignments and pushing students to pursue coding as a creative endeavor.\",\n\t            \"url\": \"https:\/\/www.codewizardshq.com\/author\/danielj\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python Tutorial for Kids: \u201cPig\u201d Dice Game | CodeWizardsHQ","description":"Code your own Pig Dice Game in Python. A step-by-step Python game tutorial for kids and beginners learning to code. Try it out!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/","og_locale":"en_US","og_type":"article","og_title":"Python Tutorial for Kids: \u201cPig\u201d Dice Game","og_description":"Code your own Pig Dice Game in Python. A step-by-step Python game tutorial for kids and beginners learning to code. Try it out!","og_url":"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/","og_site_name":"CodeWizardsHQ","article_publisher":"https:\/\/www.facebook.com\/codewizardshq\/","article_published_time":"2022-11-11T07:26:24+00:00","article_modified_time":"2025-04-23T05:48:26+00:00","og_image":[{"width":620,"height":323,"url":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/11\/Pig-python-game-social-banner.png","type":"image\/png"}],"author":"Daniel Schroeder","twitter_card":"summary_large_image","twitter_creator":"@codewizardshq","twitter_site":"@codewizardshq","twitter_misc":{"Written by":"Daniel Schroeder","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/#article","isPartOf":{"@id":"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/"},"author":{"name":"Daniel Schroeder","@id":"https:\/\/www.codewizardshq.com\/#\/schema\/person\/8f483c66dd46a2d608d50adde5c5c0f2"},"headline":"Python Tutorial for Kids: \u201cPig\u201d Dice Game","datePublished":"2022-11-11T07:26:24+00:00","dateModified":"2025-04-23T05:48:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/"},"wordCount":1430,"publisher":{"@id":"https:\/\/www.codewizardshq.com\/#organization"},"image":{"@id":"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/11\/Pig-python-game-banner.png","keywords":["Python","tutorials"],"articleSection":["Activities","Learn Coding"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/","url":"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/","name":"Python Tutorial for Kids: \u201cPig\u201d Dice Game | CodeWizardsHQ","isPartOf":{"@id":"https:\/\/www.codewizardshq.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/#primaryimage"},"image":{"@id":"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/11\/Pig-python-game-banner.png","datePublished":"2022-11-11T07:26:24+00:00","dateModified":"2025-04-23T05:48:26+00:00","description":"Code your own Pig Dice Game in Python. A step-by-step Python game tutorial for kids and beginners learning to code. Try it out!","breadcrumb":{"@id":"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/#primaryimage","url":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/11\/Pig-python-game-banner.png","contentUrl":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/11\/Pig-python-game-banner.png","width":1600,"height":395,"caption":"Pig python game banner"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codewizardshq.com\/python-tutorial-for-kids-pig-dice-game\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codewizardshq.com\/"},{"@type":"ListItem","position":2,"name":"Python Tutorial for Kids: \u201cPig\u201d Dice Game"}]},{"@type":"WebSite","@id":"https:\/\/www.codewizardshq.com\/#website","url":"https:\/\/www.codewizardshq.com\/","name":"CodeWizardsHQ","description":"The leading online coding academy for kids and teens ages 8-18","publisher":{"@id":"https:\/\/www.codewizardshq.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codewizardshq.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codewizardshq.com\/#organization","name":"CodeWizardsHQ","url":"https:\/\/www.codewizardshq.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codewizardshq.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2016\/08\/blueVertical@2x-e1572141901928.png","contentUrl":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2016\/08\/blueVertical@2x-e1572141901928.png","width":150,"height":108,"caption":"CodeWizardsHQ"},"image":{"@id":"https:\/\/www.codewizardshq.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codewizardshq\/","https:\/\/x.com\/codewizardshq","https:\/\/www.instagram.com\/codewizardshq\/","https:\/\/www.linkedin.com\/company\/codewizardshq","https:\/\/www.pinterest.com\/codewizardshq\/","https:\/\/www.youtube.com\/channel\/UC4NM0jfN0LI8_vWtiwLqgGw"]},{"@type":"Person","@id":"https:\/\/www.codewizardshq.com\/#\/schema\/person\/8f483c66dd46a2d608d50adde5c5c0f2","name":"Daniel Schroeder","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codewizardshq.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8a310902521019d3ffab08d7e0833119829be11c3593564c614e825a12882b09?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8a310902521019d3ffab08d7e0833119829be11c3593564c614e825a12882b09?s=96&d=mm&r=g","caption":"Daniel Schroeder"},"description":"Daniel has been a curriculum developer, instructor, forum moderator, and all-around problem-solver at CodeWizardsHQ since mid-2020. He's passionate about programming and constantly strives to improve educational outcomes by creating practical, fun assignments and pushing students to pursue coding as a creative endeavor.","url":"https:\/\/www.codewizardshq.com\/author\/danielj\/"}]}},"modified_by":"Dima","featured_image_src":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/11\/Pig-python-game-banner-600x395.png","featured_image_src_square":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/11\/Pig-python-game-banner-600x395.png","author_info":{"display_name":"Daniel Schroeder","author_link":"https:\/\/www.codewizardshq.com\/author\/danielj\/"},"_links":{"self":[{"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/posts\/53313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/users\/336"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/comments?post=53313"}],"version-history":[{"count":8,"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/posts\/53313\/revisions"}],"predecessor-version":[{"id":71740,"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/posts\/53313\/revisions\/71740"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/media\/53401"}],"wp:attachment":[{"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/media?parent=53313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/categories?post=53313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/tags?post=53313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}