Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#1 #2 oding Problem 3.4.7 (Eteae30u PhilJackson.py 1 #8asketball coach Phil Jackson says that in order for an NBA 2'#team to be a contender for

image text in transcribed#1
image text in transcribed#2
oding Problem 3.4.7 (Eteae30u PhilJackson.py 1 #8asketball coach Phil Jackson says that in order for an NBA 2'#team to be a contender for a championship, they need to win 31 #40 games before they lose 20 games. 5 Write a function called is_a contender that will take three - 6#parameters : a team name (astring), anumber of wins (an , 7#integer), and a number of losses (an integer). 8# 9 #8ased on these parameters, the function should return one 10 #0f three strings: 12If the team is a contender (at least 40 wins and fewer 13 # than 20 losses), return "The [team name] are a contender!" 14 #-If the team is not a contender (less than 40 wins and at least 15 # 20 losses), return. "The [team name, are not acontender 1" 16 #-If it cannot be determined (both values are higher or both 17 # values are lower), return "The [team name] might be a contender!" 18 19 20 #Add your code here! 21 23 24 #8elow are some lines of code that will test your function 25 You can change the value of the variable (s) to test your 26 unction with different inputs. 27 # 28 #1fyour function works correctly, thiswill originally 29 #print: "The Hawks are not a contender". 30 31 test team name "Hawks" 32 test_wins 18 33 test losses 40 34 , - 35 print(is_a contender(test team name, test_wins, test losses)) 36 37 38 39

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

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions