""" Felix Muzny DS 2000 Lecture 9 October 8, 2024 Data file (first 12 Boston Fleet games of the PWHL regular season): Opponent names (comma separated) Boston scores (comma separated) Opponent scores (comma separated) Goals for today’s code: - use some already implemented functions - write some function documentation - plot some lists """ FILENAME = "boston_fleet.csv" def celebrate(points1, points2): # TODO: write a function comment together if points1 > points2: print("WOOOOOHOOOOOO!") elif points2 > points1: print("sadness :(") else: print("tied!") def make_int_list(original_list): # TODO: write a function comment together new_ls = [] for value in original_list: new_ls.append(int(value)) return new_ls def main(): print("lec 9 - pwhl") with open(FILENAME, "r") as file: # my file will always just have three lines teams = file.readline().strip().split(",") boston = file.readline().split(",") opponent = file.readline().split(",") # check to make sure they are the same length print("teams:", len(teams)) print("boston:", len(boston)) print("opponent:", len(opponent)) # TODO: use make_int_list to update our lists # print out the info for each game # and celebrate if boston won for i in range(len(boston)): print(teams[i], boston[i], opponent[i]) # TODO: celebrate using the celebrate function # if time: # make a function that will plot boston goals vs. opponent goals main()