{"id":480,"date":"2026-09-21T19:44:24","date_gmt":"2026-09-21T19:44:24","guid":{"rendered":"https:\/\/ndovu.org.uk\/cs\/?p=480"},"modified":"2026-09-21T19:48:25","modified_gmt":"2026-09-21T19:48:25","slug":"yr-5-term-1-1-7-stock-market-game","status":"publish","type":"post","link":"https:\/\/ndovu.org.uk\/cs\/yr-5-term-1-1-7-stock-market-game\/","title":{"rendered":"Yr 5 Term 1.1.7 Stock Market Game"},"content":{"rendered":"\n<p><strong>Welcome to Year 5 Computing \u2014 Lessons 7 &#038; 8! \ud83d\udcc8\ud83d\udcb0<\/strong><\/p>\n<p>Over the next two lessons, we are going to learn about the risks and rewards of investing in digital assets. You will partner up and run your own <strong>Crypto Investment Firm<\/strong> to see who can make the most profit!<\/p>\n\n<p><strong>Step 1: Keyboard Warm-up \u2328\ufe0f (10 Mins)<\/strong><\/p>\n<ul>\n  <li>Click here to warm up your fingers on our typing studio: <a href=\"https:\/\/ndovu.org.uk\/type\/\" target=\"_blank\" rel=\"noopener\">Start Typing Practice on Ndovu<\/a>.<\/li>\n  <li>Today&#8217;s keywords: <em>investment, risk, stablecoin, cryptocurrency, NFT, volatile, market.<\/em><\/li>\n<\/ul>\n\n<p><strong>Step 2: The Multiplayer Market Simulator \ud83d\udcca (30 Mins)<\/strong><\/p>\n\n<!-- SCOPED INTERACTIVE LESSON WIDGET MODULE -->\n<div id=\"y5-market-widget\" style=\"max-width: 850px; margin: 20px auto; font-family: Arial, sans-serif; border: 2px solid #ddd; border-radius: 10px; padding: 20px; background-color: #fcfcfc; box-shadow: 0 4px 8px rgba(0,0,0,0.05);\">\n\n  <div style=\"background: #e6f2f8; border: 2px solid #0073aa; border-radius: 8px; padding: 15px; margin-bottom: 20px;\">\n    <h3 style=\"margin-top: 0; color: #0073aa;\">Crypto Investment Firm: Multiplayer Challenge<\/h3>\n    <p style=\"font-size: 14px; line-height: 1.5; margin-bottom: 10px;\"><strong>Goal:<\/strong> Analyze the fake news, buy low, sell high, and end the game with more money than your partner!<br>\n    <strong>How to Play Together:<\/strong> Player 1 types a secret &#8220;Market Code&#8221; and tells Player 2. If both players use the same code, you will both get the exact same news and price changes!<\/p>\n    \n    <!-- SETUP SCREEN -->\n    <div id=\"screen-setup\" style=\"display: block; background: #fff; padding: 15px; border-radius: 5px; border: 1px dashed #ccc;\">\n      <label style=\"font-weight: bold; font-size: 14px;\">Enter a Shared Market Code (e.g., ROOM-123):<\/label>\n      <input type=\"text\" id=\"market-code-input\" value=\"ROOM-1\" style=\"width: 100%; padding: 10px; margin-top: 5px; margin-bottom: 15px; font-size: 16px; text-transform: uppercase; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box;\">\n      <button type=\"button\" id=\"btn-start-game\" style=\"background: #0073aa; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-size: 16px; font-weight: bold; width: 100%;\">\ud83d\ude80 Start Simulation<\/button>\n    <\/div>\n\n    <!-- GAME SCREEN -->\n    <div id=\"screen-game\" style=\"display: none;\">\n      \n      <!-- Top Dashboard -->\n      <div style=\"display: flex; justify-content: space-between; background: #222; color: #00ffcc; padding: 15px; border-radius: 8px; margin-bottom: 15px; font-family: monospace; font-size: 16px;\">\n        <div><strong>Month:<\/strong> <span id=\"ui-month\">1<\/span> \/ 5<\/div>\n        <div><strong>Cash:<\/strong> $<span id=\"ui-cash\">1500<\/span><\/div>\n        <div><strong>Net Worth:<\/strong> $<span id=\"ui-networth\">1500<\/span><\/div>\n      <\/div>\n\n      <!-- News Panel -->\n      <div style=\"background: #fff3e0; border-left: 5px solid #ff9800; padding: 15px; margin-bottom: 15px; border-radius: 5px;\">\n        <strong style=\"color: #e65100;\">\ud83d\udcf0 Market News Flash:<\/strong>\n        <p id=\"ui-news\" style=\"margin: 5px 0 0 0; font-size: 14px; font-weight: bold;\">Game started! Read the prices and buy your first assets.<\/p>\n      <\/div>\n\n      <!-- Trading Desks -->\n      <div style=\"display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px;\">\n        \n        <!-- Asset: Crypto -->\n        <div style=\"flex: 1; min-width: 200px; background: #fff; border: 2px solid #ccc; border-radius: 5px; padding: 10px; text-align: center;\">\n          <h4 style=\"margin: 0 0 5px 0; color: #0073aa;\">\ud83e\ude99 BitCoin (High Risk)<\/h4>\n          <p style=\"margin: 0 0 10px 0; font-size: 18px; font-weight: bold;\">Price: $<span id=\"price-c\">100<\/span><\/p>\n          <p style=\"margin: 0 0 10px 0; font-size: 12px; color: #555;\">You Own: <span id=\"own-c\" style=\"font-weight:bold; color:#000;\">0<\/span><\/p>\n          <div style=\"display: flex; gap: 5px;\">\n            <button type=\"button\" id=\"btn-buy-c\" style=\"flex: 1; background: #4CAF50; color: white; border: none; padding: 5px; cursor: pointer; border-radius: 3px;\">Buy 1<\/button>\n            <button type=\"button\" id=\"btn-sell-c\" style=\"flex: 1; background: #e53935; color: white; border: none; padding: 5px; cursor: pointer; border-radius: 3px;\">Sell 1<\/button>\n          <\/div>\n        <\/div>\n\n        <!-- Asset: Stablecoin -->\n        <div style=\"flex: 1; min-width: 200px; background: #fff; border: 2px solid #ccc; border-radius: 5px; padding: 10px; text-align: center;\">\n          <h4 style=\"margin: 0 0 5px 0; color: #0073aa;\">\ud83d\udcb5 StableCoin (Low Risk)<\/h4>\n          <p style=\"margin: 0 0 10px 0; font-size: 18px; font-weight: bold;\">Price: $<span id=\"price-s\">10<\/span><\/p>\n          <p style=\"margin: 0 0 10px 0; font-size: 12px; color: #555;\">You Own: <span id=\"own-s\" style=\"font-weight:bold; color:#000;\">0<\/span><\/p>\n          <div style=\"display: flex; gap: 5px;\">\n            <button type=\"button\" id=\"btn-buy-s\" style=\"flex: 1; background: #4CAF50; color: white; border: none; padding: 5px; cursor: pointer; border-radius: 3px;\">Buy 1<\/button>\n            <button type=\"button\" id=\"btn-sell-s\" style=\"flex: 1; background: #e53935; color: white; border: none; padding: 5px; cursor: pointer; border-radius: 3px;\">Sell 1<\/button>\n          <\/div>\n        <\/div>\n\n        <!-- Asset: NFT -->\n        <div style=\"flex: 1; min-width: 200px; background: #fff; border: 2px solid #ccc; border-radius: 5px; padding: 10px; text-align: center;\">\n          <h4 style=\"margin: 0 0 5px 0; color: #0073aa;\">\ud83d\uddbc\ufe0f Ape NFT (Wild Risk)<\/h4>\n          <p style=\"margin: 0 0 10px 0; font-size: 18px; font-weight: bold;\">Price: $<span id=\"price-n\">500<\/span><\/p>\n          <p style=\"margin: 0 0 10px 0; font-size: 12px; color: #555;\">You Own: <span id=\"own-n\" style=\"font-weight:bold; color:#000;\">0<\/span><\/p>\n          <div style=\"display: flex; gap: 5px;\">\n            <button type=\"button\" id=\"btn-buy-n\" style=\"flex: 1; background: #4CAF50; color: white; border: none; padding: 5px; cursor: pointer; border-radius: 3px;\">Buy 1<\/button>\n            <button type=\"button\" id=\"btn-sell-n\" style=\"flex: 1; background: #e53935; color: white; border: none; padding: 5px; cursor: pointer; border-radius: 3px;\">Sell 1<\/button>\n          <\/div>\n        <\/div>\n\n      <\/div>\n\n      <button type=\"button\" id=\"btn-next-month\" style=\"background: #ff9800; color: white; border: none; padding: 12px 20px; border-radius: 5px; cursor: pointer; font-size: 18px; font-weight: bold; width: 100%;\">\u23f3 Advance to Next Month<\/button>\n    <\/div>\n\n    <!-- GAME OVER SCREEN -->\n    <div id=\"screen-gameover\" style=\"display: none; text-align: center; background: #fff; padding: 20px; border-radius: 5px; border: 2px solid #4CAF50;\">\n      <h2 style=\"color: #4CAF50; margin-top: 0;\">Simulation Complete! \ud83c\udfc6<\/h2>\n      <p style=\"font-size: 18px;\">Your Final Net Worth is:<\/p>\n      <h1 style=\"font-family: monospace; font-size: 40px; margin: 10px 0; color: #222;\">$<span id=\"ui-final-score\">0<\/span><\/h1>\n      <p style=\"font-size: 14px; font-weight: bold;\">Compare your screen with your partner. Who made the best choices?<\/p>\n      <button type=\"button\" id=\"btn-restart\" style=\"background: #0073aa; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-size: 16px; margin-top: 10px;\">\ud83d\udd04 Play Again<\/button>\n    <\/div>\n\n  <\/div>\n<\/div>\n\n<p><strong>Step 3: Evaluating Risk Reflection \ud83e\udd14 (10 Mins)<\/strong><\/p>\n<p>Talk with your partner about what happened during your simulation. Then, answer the questions below and download your report!<\/p>\n\n<div style=\"max-width: 850px; margin: 20px auto; font-family: Arial, sans-serif; border: 2px solid #ddd; border-radius: 10px; padding: 20px; background-color: #fcfcfc; box-shadow: 0 4px 8px rgba(0,0,0,0.05);\">\n  \n  <div style=\"background: #fff; border: 1px solid #ccc; border-radius: 8px; padding: 15px; margin-bottom: 15px;\">\n    <label style=\"font-weight: bold; display: block; margin-bottom: 5px; font-size: 14px;\">1. How does fake news or public perception change the value of digital assets like cryptocurrency or NFTs?<\/label>\n    <textarea id=\"q1-risk\" rows=\"3\" style=\"width: 100%; font-family: Arial, sans-serif; font-size: 13px; padding: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box;\" placeholder=\"When bad news happens, what do people do?\"><\/textarea>\n  <\/div>\n\n  <div style=\"background: #fff; border: 1px solid #ccc; border-radius: 8px; padding: 15px; margin-bottom: 15px;\">\n    <label style=\"font-weight: bold; display: block; margin-bottom: 5px; font-size: 14px;\">2. Beyond purely financial investments, what are some practical or ethical reasons why blockchain technology might be useful for society in the future?<\/label>\n    <textarea id=\"q2-ethics\" rows=\"3\" style=\"width: 100%; font-family: Arial, sans-serif; font-size: 13px; padding: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box;\" placeholder=\"Think back to Lesson 6... tracking energy, contracts, etc.\"><\/textarea>\n  <\/div>\n\n  <div style=\"text-align: right;\">\n    <button type=\"button\" id=\"btn-download-risk\" style=\"background-color: #4CAF50; color: white; border: none; padding: 12px 25px; border-radius: 5px; cursor: pointer; font-size: 16px; font-weight: bold;\">\ud83d\udcbe Download Lesson 7 &#038; 8 Report<\/button>\n  <\/div>\n<\/div>\n\n<p><strong>Step 4: Code.org Extension \ud83d\ude80 (10 Mins)<\/strong><\/p>\n<p>If you finished your market simulation and reflections early, click the button below to continue your blockchain journey on Code.org!<\/p>\n<div style=\"background-color: #ffebee; border-left: 5px solid #e53935; padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; text-align: center;\">\n  <a href=\"https:\/\/studio.code.org\/courses\/blockchain-2023\/units\/1\/lessons\/2\/levels\/1?section_id=6733809\" target=\"_blank\" rel=\"noopener\" style=\"display: inline-block; background-color: #e53935; color: white; padding: 12px 25px; border-radius: 5px; text-decoration: none; font-weight: bold; font-size: 16px;\">Launch Code.org Blockchain \u2794<\/a>\n<\/div>\n\n<script>\ndocument.addEventListener('DOMContentLoaded', function() {\n  \n  \/\/ --- STATE ---\n  var cash = 1500;\n  var month = 1;\n  var seed = 12345;\n  \n  var assets = {\n    c: { price: 100, own: 0, elPrice: document.getElementById('price-c'), elOwn: document.getElementById('own-c') },\n    s: { price: 10,  own: 0, elPrice: document.getElementById('price-s'), elOwn: document.getElementById('own-s') },\n    n: { price: 500, own: 0, elPrice: document.getElementById('price-n'), elOwn: document.getElementById('own-n') }\n  };\n\n  \/\/ Safe PRNG without angle brackets\n  function seededRandom() {\n    seed = (seed * 9301 + 49297) % 233280;\n    return seed \/ 233280;\n  }\n\n  \/\/ Generate Seed from text\n  function generateSeed(str) {\n    var h = 0;\n    for (var i = 0; i != str.length; i++) {\n      h = (h * 31 + str.charCodeAt(i)) | 0;\n    }\n    return Math.abs(h);\n  }\n\n  \/\/ UI Elements\n  var uiCash = document.getElementById('ui-cash');\n  var uiNet = document.getElementById('ui-networth');\n  var uiMonth = document.getElementById('ui-month');\n  var uiNews = document.getElementById('ui-news');\n\n  function getNetWorth() {\n    var total = cash;\n    total += (assets.c.own * assets.c.price);\n    total += (assets.s.own * assets.s.price);\n    total += (assets.n.own * assets.n.price);\n    return Math.floor(total);\n  }\n\n  function updateUI() {\n    uiCash.innerText = Math.floor(cash);\n    uiNet.innerText = getNetWorth();\n    uiMonth.innerText = month;\n    assets.c.elPrice.innerText = Math.floor(assets.c.price);\n    assets.c.elOwn.innerText = assets.c.own;\n    assets.s.elPrice.innerText = Math.floor(assets.s.price);\n    assets.s.elOwn.innerText = assets.s.own;\n    assets.n.elPrice.innerText = Math.floor(assets.n.price);\n    assets.n.elOwn.innerText = assets.n.own;\n  }\n\n  \/\/ --- ACTIONS ---\n  function buyAsset(key) {\n    var cost = assets[key].price;\n    if (cash >= cost) {\n      cash -= cost;\n      assets[key].own += 1;\n      updateUI();\n    } else {\n      alert('Not enough cash!');\n    }\n  }\n\n  function sellAsset(key) {\n    if (assets[key].own !== 0) {\n      cash += assets[key].price;\n      assets[key].own -= 1;\n      updateUI();\n    }\n  }\n\n  var newsEvents = [\n    { t: 'Celebrity tweets about CryptoCoin! Demand skyrockets.', c: 1.8, s: 1.0, n: 1.1 },\n    { t: 'Government bans NFT trading. Panic selling begins!', c: 0.9, s: 1.0, n: 0.4 },\n    { t: 'Stock market crashes! Investors hide money in StableCoins.', c: 0.6, s: 1.1, n: 0.7 },\n    { t: 'New video game requires Ape NFTs to play. Kids go crazy!', c: 1.1, s: 1.0, n: 2.2 },\n    { t: 'Hackers steal millions from an exchange! Trust falls.', c: 0.5, s: 0.95, n: 0.8 },\n    { t: 'Quiet month in the markets. Slow, steady growth.', c: 1.1, s: 1.01, n: 1.05 },\n    { t: 'Major bank adopts CryptoCoin for transfers.', c: 2.0, s: 1.0, n: 1.2 }\n  ];\n\n  function advanceMonth() {\n    if (month === 5) {\n      document.getElementById('screen-game').style.display = 'none';\n      document.getElementById('screen-gameover').style.display = 'block';\n      document.getElementById('ui-final-score').innerText = getNetWorth();\n      return;\n    }\n    \n    \/\/ Pick random news using the shared seed\n    var roll = Math.floor(seededRandom() * 7); \/\/ 7 events\n    if (roll === 7) roll = 6; \/\/ Safety bounds\n    var event = newsEvents[roll];\n\n    uiNews.innerText = event.t;\n    \n    \/\/ Apply multipliers\n    assets.c.price = Math.max(1, assets.c.price * event.c);\n    assets.s.price = Math.max(1, assets.s.price * event.s);\n    assets.n.price = Math.max(1, assets.n.price * event.n);\n\n    month += 1;\n    updateUI();\n  }\n\n  \/\/ --- EVENT LISTENERS ---\n  var btnStart = document.getElementById('btn-start-game');\n  if (btnStart) {\n    btnStart.addEventListener('click', function() {\n      var code = document.getElementById('market-code-input').value.trim();\n      if (code === '') code = 'DEFAULT';\n      seed = generateSeed(code);\n      \n      document.getElementById('screen-setup').style.display = 'none';\n      document.getElementById('screen-game').style.display = 'block';\n      updateUI();\n    });\n  }\n\n  var btnRestart = document.getElementById('btn-restart');\n  if (btnRestart) {\n    btnRestart.addEventListener('click', function() {\n      cash = 1500; month = 1;\n      assets.c.own = 0; assets.c.price = 100;\n      assets.s.own = 0; assets.s.price = 10;\n      assets.n.own = 0; assets.n.price = 500;\n      uiNews.innerText = 'Game started! Read the prices and buy your first assets.';\n      document.getElementById('screen-gameover').style.display = 'none';\n      document.getElementById('screen-setup').style.display = 'block';\n    });\n  }\n\n  var btnNext = document.getElementById('btn-next-month');\n  if (btnNext) btnNext.addEventListener('click', advanceMonth);\n\n  \/\/ Buy\/Sell Binds\n  var bc = document.getElementById('btn-buy-c'); if(bc) bc.addEventListener('click', function(){ buyAsset('c'); });\n  var sc = document.getElementById('btn-sell-c'); if(sc) sc.addEventListener('click', function(){ sellAsset('c'); });\n  \n  var bs = document.getElementById('btn-buy-s'); if(bs) bs.addEventListener('click', function(){ buyAsset('s'); });\n  var ss = document.getElementById('btn-sell-s'); if(ss) ss.addEventListener('click', function(){ sellAsset('s'); });\n  \n  var bn = document.getElementById('btn-buy-n'); if(bn) bn.addEventListener('click', function(){ buyAsset('n'); });\n  var sn = document.getElementById('btn-sell-n'); if(sn) sn.addEventListener('click', function(){ sellAsset('n'); });\n\n  \/\/ Download Report\n  var btnDl = document.getElementById('btn-download-risk');\n  if (btnDl) {\n    btnDl.addEventListener('click', function() {\n      var a1 = document.getElementById('q1-risk').value.trim() || 'No answer provided.';\n      var a2 = document.getElementById('q2-ethics').value.trim() || 'No answer provided.';\n      var net = document.getElementById('ui-final-score').innerText || '0';\n      \n      var txt = 'Lesson 7 & 8: Crypto Investment Report\\n--------------------------------------------\\n\\n' +\n                '1. How fake news affects digital value:\\n' + a1 + '\\n\\n' +\n                '2. Ethical\/Practical uses of Blockchain:\\n' + a2 + '\\n\\n' +\n                '--------------------------------------------\\n' +\n                'Simulation Result: I finished the market challenge with a net worth of $' + net + '!\\n';\n      \n      var b = new Blob([txt], { type: 'text\/plain' });\n      var u = URL.createObjectURL(b);\n      var a = document.createElement('a');\n      a.href = u;\n      a.download = 'Lesson7_8_Investment_Report.txt';\n      document.body.appendChild(a);\n      a.click();\n      document.body.removeChild(a);\n      URL.revokeObjectURL(u);\n      alert('Report downloaded! Paste this into your Word Document.');\n    });\n  }\n\n});\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to Year 5 Computing \u2014 Lessons 7 &#038; 8! \ud83d\udcc8\ud83d\udcb0 Over the next two lessons, we are going to learn about the risks and&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/ndovu.org.uk\/cs\/yr-5-term-1-1-7-stock-market-game\/\">Continue Reading<span class=\"screen-reader-text\">Yr 5 Term 1.1.7 Stock Market Game<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-480","post","type-post","status-publish","format-standard","hentry","category-year5","entry"],"_links":{"self":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts\/480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/comments?post=480"}],"version-history":[{"count":2,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts\/480\/revisions"}],"predecessor-version":[{"id":483,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts\/480\/revisions\/483"}],"wp:attachment":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/media?parent=480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/categories?post=480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/tags?post=480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}