{"id":37,"date":"2025-10-03T15:35:06","date_gmt":"2025-10-03T15:35:06","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/l_smith\/?p=37"},"modified":"2025-10-03T15:35:06","modified_gmt":"2025-10-03T15:35:06","slug":"nfl-project-day-4-and-football-game-day-1","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/l_smith\/2025\/10\/03\/nfl-project-day-4-and-football-game-day-1\/","title":{"rendered":"nfl project day 4 and  football game day 1"},"content":{"rendered":"\n<p>so today i spilt time between 2 things since it was 2 class today  i know it might seem like im takeing on a lot but i was not going to bore you guys with about 24 weeks of just repeating the samething over and over so from here on out im going to alternate between the 2 untill finshed so 1 week might be nfl project the next would be football game anyway here&#8217;s some code form both  <\/p>\n\n\n\n<p>nfl project<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import random\n\nwin_count = 0\ntotal_games = 0\nwin_count += 1\ntotal_games += 1\nprint(f\"{win_count}-{total_games}\") \nwins = 0\nlosses = 0\n\ndef record_loss():\n    global losses\n    losses += 1\nrecord_loss()\nprint(f\"Current record: {wins}W - {losses}L\")<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"699\" height=\"520\" src=\"https:\/\/theroyalscode.com\/students\/l_smith\/wp-content\/uploads\/2025\/10\/image.png\" alt=\"\" class=\"wp-image-38\" srcset=\"https:\/\/theroyalscode.com\/students\/l_smith\/wp-content\/uploads\/2025\/10\/image.png 699w, https:\/\/theroyalscode.com\/students\/l_smith\/wp-content\/uploads\/2025\/10\/image-300x223.png 300w\" sizes=\"auto, (max-width: 699px) 100vw, 699px\" \/><\/figure>\n\n\n\n<p>this adds wins losses <\/p>\n\n\n\n<p>football game:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pygame\nimport random\n\ndef simulate_play(offense_team, defense_team, down, yards_to_go):\n    # Simplified play logic\n    play_type = random.choice(&#91;\"run\", \"pass\"])\n    if play_type == \"run\":\n        yards_gained = random.randint(1, 10)\n        print(f\"{offense_team} runs for {yards_gained} yards.\")\n    else: # pass\n        yards_gained = random.randint(0, 20)\n        print(f\"{offense_team} passes for {yards_gained} yards.\")\n    return yards_gained\n    class time:\n     print(15 minutes)\n     countdown-=1<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"746\" height=\"488\" src=\"https:\/\/theroyalscode.com\/students\/l_smith\/wp-content\/uploads\/2025\/10\/image-1.png\" alt=\"\" class=\"wp-image-39\" srcset=\"https:\/\/theroyalscode.com\/students\/l_smith\/wp-content\/uploads\/2025\/10\/image-1.png 746w, https:\/\/theroyalscode.com\/students\/l_smith\/wp-content\/uploads\/2025\/10\/image-1-300x196.png 300w\" sizes=\"auto, (max-width: 746px) 100vw, 746px\" \/><\/figure>\n\n\n\n<p>sorry its gray it adds time <\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>so today i spilt time between 2 things since it was 2 class today i know it might seem like im takeing on a lot but i was not going to bore you guys with about 24 weeks of just repeating the samething over and over so from here on out im going to alternate [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-37","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/posts\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":40,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/posts\/37\/revisions\/40"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}