Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Describe the disciplinary action process.

Answered: 1 week ago