Question: I need help understanding and fixing my output. why i keep getting ' No team conference matches found for the star players. ' output? print

I need help understanding and fixing my output. why i keep getting 'No team conference matches found for the star players.' output?
print('This is a 2024 NBA playoffs preference simulator')
teams = input('Please enter your preferred finals matchup: ')
conference =['Eastern', 'Western']
teams =[['Boston Celtics', 'New York Knicks', 'Indiana Pacers'],
['Dallas Mavericks', 'Minnesota Timberwolves', 'Denver Nuggets']]
star_player =[['Jason Tatum', 'Jalen Brunson', 'Tyrese Haliburton'],
['Luka Doncic', 'Anthony Edwards', 'Nikola Jokic']]
def get_team_conference(teams, conference):
flag = set()
for index in range(len(conference)):
for word in teams[index]:
if word in star_player[index]:
flag.add(index)
break
return flag
observe_team_type = get_team_conference(teams, conference)
if observe_team_type:
for index in observe_team_type:
print(f'Your preferred finals matchup will have {star_player[index]} facing off against {star_player[index]}. This should be fun to matchup!')
else:
print('No team conference matches found for the star players.')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!