Question: Not sure where i went wrong on this defintion. Need help We are now ready to write the definition of the type _ bonus function,
Not sure where i went wrong on this defintion. Need help
We are now ready to write the definition of the typebonus function, which will calculate the type bonus of an attacktype against a defender. We have provided a code snippet for you to work with. You may rewrite the entire function from scratch if you want to
: def typebonusattacktype, defender:
# TODO: store the 'type and 'type of the 'defender' in variables
# 'defendertype and 'defendertype
# TODO: replace the with your code
defendertype defender.type
defendertype defender.type
if defendertype:
bonus project.gettypeeffectivenessattacktype, defendertype
return bonus
else:
bonus project.gettypeeffectivenessattacktype, defendertype
return bonus
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
