lesson
Variables and reassignment
objective: Assignment rebinds a name — computing a new value does nothing unless you assign it back.
Task type: write new code
Write final_score(score): take a starting score, add a 3-point bonus, then double the result for the event multiplier.
write this code
Write the function body yourself: assign the 3-point bonus back to score, double the updated score, and return it.
- ○Adds the 3-point bonus
- ○Then doubles the total
- ○final_score(5) is 16
- ○Works for 0 and negatives
final_score.pyattempt 0
1
2
3
4