Skip to content

Lesson 18 - For Loop lack of clarity regarding the temporary variable #593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Jul 12, 2022 · 0 comments · Fixed by #641
Closed

Lesson 18 - For Loop lack of clarity regarding the temporary variable #593

ghost opened this issue Jul 12, 2022 · 0 comments · Fixed by #641
Labels
content Issues with the lessons, practices, including their code examples
Milestone

Comments

@ghost
Copy link

ghost commented Jul 12, 2022

At the start of the lesson, an example is shown where a variable called "number" is created (the name of which I think has the potential to be confusing, but that's a different issue). Then, when showing the for loop, the temporary variable it uses is also called "number". Using the same name in both instances may cause confusion for some people, as they may misunderstand and think that the variables are the same (meaning that the "number" in the for loop is a variable that was previously declared in the code).

I would recommend changing this so that the examples showing the for loop use a different variable name than the first example that declares a variable. Also, for added clarity, in the part that says "In a for loop, the computer takes each value inside a list, stores it in a temporary variable, and executes the code in the loop once per value" it should be clarified in parentheses after "stores it in a temporary variable" what exactly that temporary variable is. If I'm understanding how this works correctly, it could maybe say something like "stores it in a temporary variable (which we name between the words "for" and "in" - note that this must follow normal variable naming rules, including the need for a unique name)".

@ghost ghost added the content Issues with the lessons, practices, including their code examples label Jul 12, 2022
@NathanLovato NathanLovato added this to the 1.3 milestone Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Issues with the lessons, practices, including their code examples
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant