![subject](/tpl/images/cats/User.png)
Engineering, 22.03.2021 19:10 naterjax
PYTHON
Complete the Team class implementation. For the instance method get_win_percentage(), the formula is:
team_wins / (team_wins + team_losses)
Note: Use floating-point division.
Ex: If the input is:
Ravens
13
3
where Ravens is the team's name, 13 is the number of team wins, and 3 is the number of team losses, the output is:
Congratulations, Team Ravens has a winning average!
If the input is Angels 80 82, the output is:
Team Angels has a losing average.
THIS IS THE BASE GIVEN:
class Team:
def __init__(self):
self. team_name = 'none'
self. team_wins = 0
self. team_losses = 0
# TODO: Define get_win_percentage()
if __name__ == "__main__":
team = Team()
team_name = input()
team_wins = int(input())
team_losses = int(input())
team. team_name = team_name
team. team_wins = team_wins
team. team_losses = team_losses
if team. get_win_percentage() >= 0.5:
print('Congratulations, Team', team. team_name,'has a winning average!')
else:
print('Team', team. team_name, 'has a losing average.')
![ansver](/tpl/images/cats/User.png)
Answers: 1
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Other questions on the subject: Engineering
![image](/tpl/images/cats/User.png)
Engineering, 04.07.2019 18:10, qwertylol12345
Different types of steels contain different elements that alter the characteristics of the steel. for each of the following elements, explain what the element does when alloyed with steel.
Answers: 2
![image](/tpl/images/cats/User.png)
![image](/tpl/images/cats/User.png)
Engineering, 04.07.2019 18:10, xboxdude06
Slip occurs via two partial dislocations because of (a) the shorter path of the partial dislocation lines; (b) the lower energy state through partial dislocations; (c) the charge balance.
Answers: 1
You know the right answer?
PYTHON
Complete the Team class implementation. For the instance method get_win_percentage(), the fo...
Questions in other subjects:
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 18.12.2020 02:20
![Konu](/tpl/images/cats/mat.png)
Mathematics, 18.12.2020 02:20
![Konu](/tpl/images/cats/en.png)
English, 18.12.2020 02:20
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/fizika.png)
Physics, 18.12.2020 02:20
![Konu](/tpl/images/cats/ap.png)
Advanced Placement (AP), 18.12.2020 02:20
![Konu](/tpl/images/cats/mat.png)
Mathematics, 18.12.2020 02:20