>>>teams ["team1", "team2", "team3", "team4"] >>> rankings = [3, 2, 4, 1] >>> eliminate(teams, rankings, 1) ('team1', 'team2', 'team4')

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter4: More Object Concepts
Section: Chapter Questions
Problem 2RQ
icon
Related questions
Question

I'm still lost on how it works. From what I understand the code should do team 1 = 3rd place, team 2 = 2nd place, team 3 = 4th place, team 4 = 1st place. Then you filter out team 4 because you don't want anyone who ranked in that position. The output would then be: ('team1', 'team2', 'team3') but the test wants ('team1', 'team2', 'team4')? 

>>>teams ["team1", "team2", "team3", "team4"]
>>> rankings = [3, 2, 4, 1]
>>> eliminate(teams, rankings, 1)
('team1', 'team2', 'team4')
Transcribed Image Text:>>>teams ["team1", "team2", "team3", "team4"] >>> rankings = [3, 2, 4, 1] >>> eliminate(teams, rankings, 1) ('team1', 'team2', 'team4')
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr