diff --git a/ch_1_lesson_adam_hutchings.py b/ch_1_lesson_adam_hutchings.py new file mode 100644 index 0000000..a318e54 --- /dev/null +++ b/ch_1_lesson_adam_hutchings.py @@ -0,0 +1,52 @@ +list_1111 = [ + 'Edgewater, Maryland',2003,True,['CHS District Bethesda MS Event sponsored by Bechtel', #Just tons of lists until line 23 + 'CHS District Owings Mills MD Event sponsored by Leidos','FIRST Chesapeake District Championship'], + ['Bethesda, Maryland','Owings Mills, Maryland','Fairfax, Virginia'], + ['Autonomous Award sponsored by Ford',"District Chairman's Award",'Team Spirit Award sponsored by FCA Foundation']] + +list_1678 = [ + 'Davis, California',2005,True, + ['Central Valley Regional','Sacramento Regional','Aerospace Valley Regional','Carver Division','Einstein Field', + 'RCC Qianjiang International Robotics Invitational'],['Fresno, California','Davis, California','Lancaster, California', + 'Houston, Texas','Hangzhou, China'],["Regional Chairman's Award",'Regional Winners',"FIRST Dean's List Finalist Award", + 'Industrial Design Award sponsored by General Motors','Excellence in Engineering Award sponsored by Delphi', + 'Championship Subdivision Winner','Entrepeneurship Award sponsored by Kleiner Perkins Caufield and Byers']] + +list_2222 = [ + 'Tacoma, Washington',2007,False,"Pacific Northwest Regional",'Portland, Oregon','No awards. Boo-hoo...'] + +list_3333 = [ + 'Julesburg, Colorado',2010,False,"Colorado Regional",'Denver, Colorado','Judges Award'] + +list_5555 = [ + 'Warren, Michigan',2015,True,['FIM District Center Line Event','FIM District Marysville Event'], + ['Center Line, Michigan','Marysville, Michigan'],"District Event Winner"] + +valid_input_1 = False #Whether a valid input has been submitted for a team +valid_input_2 = False #Whether a valid input has been submitted for a statistic + +statistics_dictionary = {'location':0, 'rookie_year':1, 'competed':2, 'competition_names':3, +'competition_locations':4, 'season_awards':5} + + +while valid_input_1 == False: #Until a valid input has been submitted for a team + team_selection = str(input("What team would you like to view statistics about? ")) #Which team do you want? + if team_selection == '1111' or '1678' or '2222' or '3333' or '5555': #Breaking the loop for a valid input + valid_input_1 = True +if team_selection == '1111': + team_selection = list_1111 +if team_selection == '1678': + team_selection = list_1678 +if team_selection == '2222': + team_selection = list_2222 +if team_selection == '3333': + team_selection = list_3333 +if team_selection == '5555': + team_selection = list_5555 + +while valid_input_2 == False: #Until a valid input has been submitted for a statistic + statistic_wanted = input("Which statistic would you like to find out? ") #Which statistic do you want? + if statistic_wanted == 'location' or 'rookie_year' or 'competed' or 'competition_names' or 'competition_locations' or 'season_awards': #Breaking the loop for a valid input + valid_input_2 = True #Breako el infinito el loopo + +print(team_selection[statistics_dictionary[statistic_wanted]]) #Print the list selected, and the element of said list diff --git a/ch_1_lesson_adam_hutchings_1.py b/ch_1_lesson_adam_hutchings_1.py new file mode 100644 index 0000000..a318e54 --- /dev/null +++ b/ch_1_lesson_adam_hutchings_1.py @@ -0,0 +1,52 @@ +list_1111 = [ + 'Edgewater, Maryland',2003,True,['CHS District Bethesda MS Event sponsored by Bechtel', #Just tons of lists until line 23 + 'CHS District Owings Mills MD Event sponsored by Leidos','FIRST Chesapeake District Championship'], + ['Bethesda, Maryland','Owings Mills, Maryland','Fairfax, Virginia'], + ['Autonomous Award sponsored by Ford',"District Chairman's Award",'Team Spirit Award sponsored by FCA Foundation']] + +list_1678 = [ + 'Davis, California',2005,True, + ['Central Valley Regional','Sacramento Regional','Aerospace Valley Regional','Carver Division','Einstein Field', + 'RCC Qianjiang International Robotics Invitational'],['Fresno, California','Davis, California','Lancaster, California', + 'Houston, Texas','Hangzhou, China'],["Regional Chairman's Award",'Regional Winners',"FIRST Dean's List Finalist Award", + 'Industrial Design Award sponsored by General Motors','Excellence in Engineering Award sponsored by Delphi', + 'Championship Subdivision Winner','Entrepeneurship Award sponsored by Kleiner Perkins Caufield and Byers']] + +list_2222 = [ + 'Tacoma, Washington',2007,False,"Pacific Northwest Regional",'Portland, Oregon','No awards. Boo-hoo...'] + +list_3333 = [ + 'Julesburg, Colorado',2010,False,"Colorado Regional",'Denver, Colorado','Judges Award'] + +list_5555 = [ + 'Warren, Michigan',2015,True,['FIM District Center Line Event','FIM District Marysville Event'], + ['Center Line, Michigan','Marysville, Michigan'],"District Event Winner"] + +valid_input_1 = False #Whether a valid input has been submitted for a team +valid_input_2 = False #Whether a valid input has been submitted for a statistic + +statistics_dictionary = {'location':0, 'rookie_year':1, 'competed':2, 'competition_names':3, +'competition_locations':4, 'season_awards':5} + + +while valid_input_1 == False: #Until a valid input has been submitted for a team + team_selection = str(input("What team would you like to view statistics about? ")) #Which team do you want? + if team_selection == '1111' or '1678' or '2222' or '3333' or '5555': #Breaking the loop for a valid input + valid_input_1 = True +if team_selection == '1111': + team_selection = list_1111 +if team_selection == '1678': + team_selection = list_1678 +if team_selection == '2222': + team_selection = list_2222 +if team_selection == '3333': + team_selection = list_3333 +if team_selection == '5555': + team_selection = list_5555 + +while valid_input_2 == False: #Until a valid input has been submitted for a statistic + statistic_wanted = input("Which statistic would you like to find out? ") #Which statistic do you want? + if statistic_wanted == 'location' or 'rookie_year' or 'competed' or 'competition_names' or 'competition_locations' or 'season_awards': #Breaking the loop for a valid input + valid_input_2 = True #Breako el infinito el loopo + +print(team_selection[statistics_dictionary[statistic_wanted]]) #Print the list selected, and the element of said list diff --git a/ch_2_assign_adam_hutchings.py b/ch_2_assign_adam_hutchings.py new file mode 100644 index 0000000..e27235a --- /dev/null +++ b/ch_2_assign_adam_hutchings.py @@ -0,0 +1,232 @@ +master_dictionary = {} #Setting up the master el dictionario +input_list = ['menu', 'view', 'remove', 'search', 'modify'] +statistic_list = ['tm', 'n', 'pl', 'w', 'l', 'cv', 'dt'] +#Translating user inputs into functions + +def remove_function(): + while True: #Idiotproofing code + removal = input("Which team would you like to remove? This action cannot be undone!") + if ("statistics" + removal) in master_dictionary: + master_dictionary[removal] = {} + break + valid_input_5 = False + while valid_input_5 == False: + menu_selection = input("""Type 'menu' to go back to the main menu, 'view' to view more, + 'remove' to remove more, 'search' to search the teams, or 'modify' to modify the information.""") + if menu_selection in input_list: + if menu_selection == 'menu': + valid_input_5 = True + menu_function() + if menu_selection == 'view': + valid_input_5 = True + view_function() + if menu_selection == 'remove': + valid_input_5 = True + remove_function() + if menu_selection == 'search': + valid_input_5 = True + search_teams() + if menu_selection == 'modify': + valid_input_5 = True + modification_function() + +def view_function(): + valid_input_6 = False #This, and all other such "shells", is safeproofing so the code doesn't die if the user enters an invalid input. + while valid_input_6 == False: + viewing_selection = input("Which team's statistics would you like to view? ") + if "statistics" + str(viewing_selection) in master_dictionary: + valid_input_6 = True + valid_input_7 = False + while valid_input_7 == False: + statistic_selection = input("""Which statistic would you like to view? Please type one of + tm (team number), n (name), pl (programming language), w or l (width or a length for your robot), + cv (whether or not your robot has a camera vision system),or dt (the number of drivetrain motors on your robot). """) + if statistic_selection in statistic_list and master_dictionary["statistics" + viewing_selection][statistic_selection] != '': + print (master_dictionary["statistics" + viewing_selection][statistic_selection]) + valid_input_7 = True + elif master_dictionary["statistics" + viewing_selection][statistic_selection] == '': + print("That hasn't been added yet. Try something else.") + valid_input_7 = True + else: + valid_input_5 = False + while valid_input_5 == False: + menu_selection = input("""Type 'menu' to go back to the main menu, 'view' to view more, + 'remove' to remove data, 'search' to search the teams, or 'modify' to modify the information.""") + if menu_selection == 'menu': + valid_input_5 = True + menu_function() + if menu_selection == 'view': + valid_input_5 = True + view_function() + if menu_selection == 'remove': + valid_input_5 = True + remove_function() + if menu_selection == 'search': + valid_input_5 = True + search_teams() + if menu_selection == 'modify': + valid_input_5 = True + modification_function() + +def search_teams(): #Searching teams + valid_input_4 = False + while valid_input_4 == False: + team_search = input("What team would you like to search for?") + if team_search.isdigit() == True: #If the search is all digits + valid_input_4 = True + for search in master_dictionary: #Checking every master_dict key to see if it's equal to the search + if search == ("statistics" + team_search): + print("A match has been found!") + valid_input_5 = False + while valid_input_5 == False: + menu_selection = input("""Type 'menu' to go back to the main menu, 'view' to view more, + 'remove' to remove data, 'search' to search the teams again, or 'modify' to modify the information.""") + if menu_selection in input_list: + if menu_selection == 'menu': + valid_input_5 = True + menu_function() + if menu_selection == 'view': + valid_input_5 = True + view_function() + if menu_selection == 'remove': + valid_input_5 = True + remove_function() + if menu_selection == 'search': + valid_input_5 = True + search_teams() + if menu_selection == 'modify': + valid_input_5 = True + modification_function() + else: + print("A match has not been found.") + valid_input_5 = False + while valid_input_5 == False: + menu_selection = input("""Type 'menu' to go back to the main menu, 'view' to view more, + 'remove' to remove data, 'search' to search the teams again, or 'modify' to modify the information.""") + if menu_selection in input_list: + if menu_selection == 'menu': + valid_input_5 = True + menu_function() + if menu_selection == 'view': + valid_input_5 = True + view_function() + if menu_selection == 'remove': + valid_input_5 = True + remove_function() + if menu_selection == 'search': + valid_input_5 = True + search_teams() + if menu_selection == 'modify': + valid_input_5 = True + modification_function() + +def add_team(): #How to add a new team + print("You are adding a new file. The first step is to name your team.") + valid_team_name = False + while valid_team_name == False: + team_name = input("What would you like your team to be named? Make sure it's all numbers! ") #Getting a name for the team + if team_name.isdigit() == True: #Checking if a team name is all digits + valid_team_name = True #Breaking the infinite loop + master_dictionary["statistics" + str(team_name)] = {} #Making a dictionary entry for the team + for yeet in statistic_list: + master_dictionary["statistics" + str(team_name)][yeet] = '' + valid_input_5 = False + while valid_input_5 == False: + menu_selection = input("""Type 'menu' to go back to the main menu, 'view' to view more, + 'remove' to remove data, 'search' to search the teams, or 'modify' to modify the information again.""") + if menu_selection in input_list: + if menu_selection == 'menu': + valid_input_5 = True + menu_function() + if menu_selection == 'view': + valid_input_5 = True + view_function() + if menu_selection == 'remove': + valid_input_5 = True + remove_function() + if menu_selection == 'search': + valid_input_5 = True + search_teams() + if menu_selection == 'modify': + valid_input_5 = True + modification_function() + +def add_statistic(): #How to add a statistic for a team + team_name = '' #Setting variables empty + datapoint = '' + team_name_validity = False + while team_name_validity == False: + team_name = input("Please select a team whose information you would like to modify.") #Finding the team + if ("statistics" + str(team_name)) in master_dictionary: + team_name_validity = True + statistic_validity = False + while statistic_validity == False: + statistic_added = input("""You may add a team number (tm), a name (n), a programming language (pl), + a width or a length for your robot (w or l), whether or not your robot has a camera vision system (cv), + and the number of drivetrain motors on your robot (dt). Which one of these options would you like + to edit? Enter your options as the parenthetical after the option you have selected. """) #Note the shorthands like 'pl' here. + if statistic_added in statistic_list: + statistic_validity = True + for statistic_name in statistic_list: #For all possible statistic names + if statistic_added == statistic_name: #If the statistic selected has been found: + datapoint = (input("What would you like to set this team's " + statistic_added + "?")) #What data the user wants to add. + master_dictionary["statistics" + str(team_name)][statistic_added] = datapoint + valid_input_5 = False + while valid_input_5 == False: + menu_selection = input("""Type 'menu' to go back to the main menu, 'view' to view more, + 'remove' to remove data, 'search' to search the teams, or 'modify' to modify the information again.""") + if menu_selection in input_list: + if menu_selection == 'menu': + valid_input_5 = True + menu_function() + if menu_selection == 'view': + valid_input_5 = True + view_function() + if menu_selection == 'remove': + valid_input_5 = True + remove_function() + if menu_selection == 'search': + valid_input_5 = True + search_teams() + if menu_selection == 'modify': + valid_input_5 = True + modification_function() + +def modification_function(): #Modifying data in this program. + valid_input_3 = False + while valid_input_3 == False: + adding_teams = input("Would you like to add a new team or a new statistic? Please type 'team' or 'statistic'. ") #Whether new team files are still being created + if adding_teams == 'team': #Getting other functions to run + add_team() + valid_input_3 = True + if adding_teams == 'statistic' and master_dictionary != {}: #Checking if there are any teams for statistics to be added to + add_statistic() + valid_input_3 = True + +def menu_function(): + if master_dictionary == {}: + valid_input = False + while valid_input == False: + first_input = input("You don't seem to have any data. Enter 'yes' to add some. ") + if first_input == 'yes': + modification_function() + valid_input = True + else: #If information has already been saved. + valid_input_5 = False + while valid_input_5 == False: + menu_selection = input("""Type 'view' to view more, + 'remove' to remove, 'search' to search the teams, or 'modify' to modify the information.""") + if menu_selection == 'view': + valid_input_5 = True + view_function() + if menu_selection == 'remove': + valid_input_5 = True + remove_function() + if menu_selection == 'search': + valid_input_5 = True + search_teams() + if menu_selection == 'modify': + valid_input_5 = True + modification_function() + +menu_function() \ No newline at end of file diff --git a/ch_3_lesson_adam_hutchings.py b/ch_3_lesson_adam_hutchings.py new file mode 100644 index 0000000..050f577 --- /dev/null +++ b/ch_3_lesson_adam_hutchings.py @@ -0,0 +1,150 @@ +master_dictionary = {} #Setting up the master el dictionario +input_list = ['menu', 'view', 'remove', 'search', 'modify'] +statistic_list = ['nm', 'tm', 'pl', 'w', 'l', 'cv', 'dt'] +#Translating user inputs into functions + +def remove_function(): + while True: #Idiotproofing code + removal = input("Which team would you like to remove? This action cannot be undone! You may also quit at any time by pressing q. ") + if removal == 'q': + break + elif ("statistics" + removal) in master_dictionary: + master_dictionary[removal] = {} + break + else: + print("Enter a valid input!") + +def view_function(): + if master_dictionary == {}: + print("You don't have any stored data.") + return None + else: + x = True + while x == True: + viewing_selection = input("""Which team's statistics would you like to view? + You may also quit at any time by pressing q. """) + for team in master_dictionary: + if viewing_selection.isalpha() == False: + if team == ("statistics" + str(viewing_selection)): + x = False + elif viewing_selection == (master_dictionary[team])['nm']: + x = False + elif viewing_selection == 'q': + print("Returning to main menu.") + return None + while True: + statistic_selection = input("""Which statistic would you like to view? Please type one of +tm (team number), nm (name), pl (programming language), w or l (width or a length for your robot), +cv (whether or not your robot has a camera vision system),or dt (the number of drivetrain motors on your robot). +Again, you can quit with 'q'. """) + if statistic_selection == 'q': + print("Returning to main menu.") + break + elif statistic_selection in statistic_list and master_dictionary["statistics" + viewing_selection][statistic_selection] != '': + print (master_dictionary["statistics" + viewing_selection][statistic_selection]) + break + elif master_dictionary["statistics" + viewing_selection][statistic_selection] == '': + print("That hasn't been added yet. Try something else.") + break + +def search_teams(): #Searching teams + while True: + team_search = input("What team would you like to search for? You may also quit at any time by pressing q. ") + if team_search == 'q': + print("Returning to main menu.") + return None + continue + else: + break + for search in master_dictionary: #Checking every master_dict key to see if it's equal to the search + if search == ("statistics" + team_search) or search == ("statistics" + team_search)['nm']: + return ("A match has been found! Team " + search + '.') + return ("No matches were found.") + +def add_team(): #How to add a new team + print("You are adding a new file. The first step is to name your team. You may also quit at any time by pressing q. ") + while True: + team_number = input("What would you like your team to be named? Make sure it's all numbers! ") #Getting a name for the team + team_name = input("How about your team's name? ") + if team_number == 'q' or team_name == 'q': + print("Returning to the main menu. ") + break + elif team_number.isdigit() == False: #Checking if a team name is all digits + print("Valid input, please!") + continue + else: + master_dictionary["statistics" + str(team_number)] = {} #Making a dictionary entry for the team + for yeet in statistic_list: + master_dictionary["statistics" + str(team_number)][yeet] = '' + master_dictionary["statistics" + str(team_number)]['nm'] = team_name + break + +def add_statistic(): #How to add a statistic for a team + team_name = '' #Setting variables empty + datapoint = '' + while True: + team_name = input("""Please select a team whose information you would like to modify. +You may also quit at any time by pressing q. """) #Finding the team + if ("statistics" + str(team_name)) in master_dictionary: + break + while True: + statistic_added = input("""You may add a team number (tm), change the name (nm), add a programming language (pl), + a width or a length for your robot (w or l), whether or not your robot has a camera vision system (cv), + and the number of drivetrain motors on your robot (dt). Which one of these options would you like + to edit? Enter your options as the parenthetical after the option you have selected. """) #Note the shorthands like 'pl' here. + if statistic_added == 'q': + return None + elif statistic_added in statistic_list: + datapoint = (input("What would you like to set this team's " + statistic_added + " to?")) + if statistic_added == 'w' or 'l': + if not datapoint.isdigit(): + print("Invalid input.") + continue + elif statistic_added == 'cv': + if datapoint not in ['yes', 'no', 'True', 'False']: + print("Invalid input.") + continue + elif statistic_added == 'dt': + print("Invalid input.") + if datapoint.isalpha(): + continue + else: + continue + if statistic_added == 'w' or 'l' or 'dt': + statistic_added = int(statistic_added) + elif statistic_added == 'cv': + statistic_added = True if statistic_added == 'yes' or 'True' else False + master_dictionary["statistics" + str(team_name)][statistic_added] = datapoint + return None + else: + continue + +while True: #Mainloop + menu_selection = input("""Type 'view' to view, + 'remove' to remove, 'search' to search the teams, 'add' to add a team, or + 'statistic' to add a statistic to a team's file. + Or type 'stop' to end this program. """) + if menu_selection == 'view': + valid_input_5 = True + view_function() + elif menu_selection == 'remove': + valid_input_5 = True + remove_function() + elif menu_selection == 'search': + valid_input_5 = True + print(search_teams()) + elif menu_selection == 'add': + valid_input_5 = True + add_team() + elif menu_selection == 'statistic': + if master_dictionary != {}: + valid_input_5 = True + add_statistic() + else: + print("You don't have any teams! Darn it!") + continue + elif menu_selection == 'stop': + break + else: + print('Enter a valid input! ') + continue \ No newline at end of file diff --git a/ch_4_assign_Adam_hutchings.py b/ch_4_assign_Adam_hutchings.py new file mode 100644 index 0000000..ffae3b7 --- /dev/null +++ b/ch_4_assign_Adam_hutchings.py @@ -0,0 +1,52 @@ +import math #For mathy stuff +class Point(): + def __init__(self, x_coord, y_coord): + self.x_coord = x_coord + self.y_coord = y_coord + + def distance(self): #Distance + return math.sqrt((float(self.x_coord) ** 2) + (float(self.y_coord) ** 2)) #Pythagorean calculation + +class Point_3D(Point): #Defining it for 3D + def __init__(self, x_coord, y_coord ,z_coord): + super().__init__(x_coord,y_coord) + self.z_coord = z_coord + + def distance(self): #For 3D distance + return math.sqrt((super().distance()**2) + (float(self.z_coord)**2)) + +def distance_counter(user_x_1,user_y_1,user_x_2,user_y_2,user_z): + hypotenuse_2D = Point(user_x_1,user_y_1).distance() #So I can use it more efficiently later. + hypotenuse_3D = Point_3D(user_x_2,user_y_2,user_z).distance() #So I can use it more efficiently later. + print("Your first point is " + str(hypotenuse_2D) + '.') + print("Your second point is " + str(hypotenuse_3D)+'.') + + if hypotenuse_3D > hypotenuse_2D: + print("Your second point was further away. ") + elif hypotenuse_3D == hypotenuse_2D: + print("Your points tied. ") + else: + print("Your first point was further away. ") + +def is_float(user_input): #Idiotproofing! + for character in user_input: + if character not in '0123456789.': + return False + if user_input is '': + return False + elif user_input.split().count(".") > 1: + return False + return True + +while True: + user_x_1 = input("What would you like your first 2D variable to be? ") + user_x_2 = input("What would you like your second 2D variable to be? ") + user_y_1 = input("What would you like your first 3D variable to be? ") + user_y_2 = input("What would you like your second 3D variable to be? ") + user_z = input("What would you like your third 3D variable to be? ") + + if is_float(str(user_x_1)) and is_float(str(user_x_2)) and is_float(str(user_y_1)) and is_float(str(user_y_2)) and is_float(str(user_z)) == True: + break; + else: + print("Uh-oh, you messed up! ") +distance_counter(user_x_1, user_x_2, user_y_1, user_y_2, user_z) \ No newline at end of file diff --git a/new_chapter_1_adam_hutchings.py b/new_chapter_1_adam_hutchings.py new file mode 100644 index 0000000..d3206d5 --- /dev/null +++ b/new_chapter_1_adam_hutchings.py @@ -0,0 +1,50 @@ +master_dict = { +'dict_1111':{ + 'place':'Edgewater, Maryland', + 'year':2003, + 'active':True, + 'competitions':{'CHS District Bethesda MS Event sponsored by Bechtel', + 'CHS District Owings Mills MD Event sponsored by Leidos','FIRST Chesapeake District Championship'}, + 'locations':{'Bethesda, Maryland','Owings Mills, Maryland','Fairfax, Virginia'}, + 'awards':{'Autonomous Award sponsored by Ford',"District Chairman's Award",'Team Spirit Award sponsored by FCA Foundation'} + }, +'dict_1678':{ + 'place':'Davis, California', + 'year':2005, + 'active':True, + 'competitions':{'Central Valley Regional','Sacramento Regional','Aerospace Valley Regional','Carver Division','Einstein Field', + 'RCC Qianjiang International Robotics Invitational'}, + 'locations':{'Fresno, California','Davis, California','Lancaster, California', + 'Houston, Texas','Hangzhou, China'}, + 'awards':{"Regional Chairman's Award",'Regional Winners',"FIRST Dean's List Finalist Award", + 'Industrial Design Award sponsored by General Motors','Excellence in Engineering Award sponsored by Delphi', + 'Championship Subdivision Winner','Entrepeneurship Award sponsored by Kleiner Perkins Caufield and Byers'} +}, +'dict_2222':{ + 'place':'Tacoma, Washington', + 'year':2007, + 'active':False, + 'competitions':"Pacific Northwest Regional", + 'locations':'Portland, Oregon', + 'awards':'No awards. Boo-hoo...' +}, +'dict_3333':{ + 'place':'Julesburg, Colorado', + 'year':2010, + 'active':False, + 'competitions':"Colorado Regional", + 'locations':'Denver, Colorado', + 'awards':'Judges Award' +}, +'dict_5555':{ + 'place':'Warren, Michigan', + 'year':2015, + 'active':True, + 'competitions':{'FIM District Center Line Event','FIM District Marysville Event'}, + 'locations':{'Center Line, Michigan','Marysville, Michigan'}, + 'awards':"District Event Winner" +} +} +team = 'dict_' + input("Which team? ") +statistic = input("Which statistic? ") +print((master_dict[team])[statistic]) \ No newline at end of file