Demo entry 6783345

team_dict={}winningList=[]winningTeam=[]definputNumber(userInput):whileTrue:try:_value_=int(input(userInput))except:print("Please enter integer value(s)")continueelse:return_value_breaknumofTeams=inputNumber("Insert Number of Teams: ")forxinrange(numofTeams):teamName=input('Team Name: ')winLossList=[]#wins=int(input('Wins: '))wins=inputNumber('Wins: ')winningList.append(wins)#losses=int(input('Losses: '))losses=inputNumber('Losses: ')if(wins>losses):winningTeam.append(teamName)winLossList.append(wins)winLossList.append(losses)team_dict[teamName]=winLossListprint("\nEntered dictionary: ",team_dict)print('List of wins of all teams: ',winningList)print("List of all teams that have winning records: ",winningTeam)whileTrue:team=input("\nEnter a team name to know the winning percentage: ")ifteaminteam_dict:total_number_of_matches=sum(team_dict[team])print('Total Number of Matches played by ',team,' : ',total_number_of_matches)winsVsLoss=team_dict[team]winning_percentage=(float(winsVsLoss[0])/float(total_number_of_matches))*100#winsVsLoss[0]=1stelementofthelistwhichisthewinsoftheteamprint("Winning percentage of ",team," : ",winning_percentage,"%")else:print("the key doesnt exist")