nfl project day 4 and football game day 1


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’s some code form both

nfl project

import random

win_count = 0
total_games = 0
win_count += 1
total_games += 1
print(f"{win_count}-{total_games}") 
wins = 0
losses = 0

def record_loss():
    global losses
    losses += 1
record_loss()
print(f"Current record: {wins}W - {losses}L")

this adds wins losses

football game:

import pygame
import random

def simulate_play(offense_team, defense_team, down, yards_to_go):
    # Simplified play logic
    play_type = random.choice(["run", "pass"])
    if play_type == "run":
        yards_gained = random.randint(1, 10)
        print(f"{offense_team} runs for {yards_gained} yards.")
    else: # pass
        yards_gained = random.randint(0, 20)
        print(f"{offense_team} passes for {yards_gained} yards.")
    return yards_gained
    class time:
     print(15 minutes)
     countdown-=1

sorry its gray it adds time


Leave a Reply

Your email address will not be published. Required fields are marked *