You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The solution to the "Cumulative Sum" challenge in Episode 12 uses the augmented assignment operator += without comment or explanation. In the rest of the episode, the more verbose total = total + whatever syntax is used. The only other occurrence of += is in Episode 18.
My feeling is that += is a useful shorthand but – given how similar it looks to comparisons like !=, >=, <= – deserves a little explanation for anyone who hasn't seen it before. How about having a callout just before "Cumulative Sum" that explains it, then converting "Identifying Variable Name Errors" to use it as well? That would help with retaining it for Episode 18.
Another solution would be to replace the instances in both episodes with the explicit, longer version, which would be less cognitive load but perhaps a bit of a shame.
The text was updated successfully, but these errors were encountered:
Thanks for catching this! I'm inclined to change it to total = total + number and skip the additional explanation as this lesson often receives feedback that it runs long...
The solution to the "Cumulative Sum" challenge in Episode 12 uses the augmented assignment operator
+=
without comment or explanation. In the rest of the episode, the more verbosetotal = total + whatever
syntax is used. The only other occurrence of+=
is in Episode 18.My feeling is that
+=
is a useful shorthand but – given how similar it looks to comparisons like!=
,>=
,<=
– deserves a little explanation for anyone who hasn't seen it before. How about having a callout just before "Cumulative Sum" that explains it, then converting "Identifying Variable Name Errors" to use it as well? That would help with retaining it for Episode 18.Another solution would be to replace the instances in both episodes with the explicit, longer version, which would be less cognitive load but perhaps a bit of a shame.
The text was updated successfully, but these errors were encountered: