Question: Task 3 : Level requirements ( 4 0 % of grade ) Modify your best _ damage function from Task 2 to add a second
Task : Level requirements of grade
Modify your bestdamage function from Task to add a second optional parameter named
levels tuple of three int
o To make the parameter optional, provide a default value of None immediately after the
parameter name in the first line of the function definition.
o In the body of your function definition, you can test whether the parameter was provided
or not by testing if it is not None.
o The parameter represents the current Attack, Strength, and Magic levels of the player.
o Your function should now skip any weapons for which any of the players current Attack,
Strength, and Magic levels are strictly less than the weapons required levels.
Some example executions are provided below. The autograder may perform additional tests with
other data.
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
