Question: Answer to Coding Problem 3.4.9 that references 2.4.4 on Pokemon: def calculate_modifier(STAB, Type, Critical, Other, Random): mod = STAB * Type * Critical * Other
Answer to Coding Problem 3.4.9 that references 2.4.4 on Pokemon:
def calculate_modifier(STAB, Type, Critical, Other, Random):
mod = STAB * Type * Critical * Other * Random * 1
return mod
def calculate_damage(STAB, Type, Critical, Other, Random, Level, Attack, Defense, Base):
A = (2 * Level + 10)/250
B = Attack/Defense
C = Base
Total_Damage = ((A * B * C + 2) * calculate_modifier(STAB, Type, Critical, Other, Random))
return Total_Damage
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
