lc-python-intro
lc-python-intro copied to clipboard
Change swap variable name in challenge in episode 2
Taught this today. In episode https://librarycarpentry.org/lc-python-intro/02-variables/index.html the challenge titled "Swapping Values", the variable named swap confused learners who thought it might be a function or special keyword. I suggest we change it to something else that's doesn't express what we're doing in that step, like z.
I agree with you that swap may be confusing. But z may also be confusing, because actually z (or swap) is only used temporarily for swapping. So I would suggest using "s" for s(wap). Then the variable delimits far enough from the other two but is still just a letter and is not read directly as a function by the learners.
Closing since a major update to the lesson will soon be merged, deprecating most standing issues. Thanks for your contribution!