Skip to content
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

Lesson 19 Practice 2: "size" is not identified as the necessary variable in the lesson's instructions #1037

Open
CodeWithCODFY opened this issue Jan 1, 2025 · 1 comment
Labels
content Issues with the lessons, practices, including their code examples

Comments

@CodeWithCODFY
Copy link

The solution for Practice 19.2 requires the use of the "size" variable, but nowhere in the lesson, practice instructions, or hints is the "size" variable mentioned. This means that the user has to guess the variable to search for in the "rectangle_sizes" array.

I had the formula (almost) correct from the start, but because I had no idea what the appropriate variable's identifier was, I thought I got the syntax completely wrong and tried everything under the sun to fix it. Instead, I was supposed to guess that "size" was the appropriate identifier instead of "rectangle" or (as had been used in previous lessons) "number."

For example, I would type:

func run()
for rectangle in rectangle_sizes:
draw_rectangle(rectangle.x, rectangle.y)
jump (300, 0)

or:

func run()
for number in rectangle_sizes:
draw_rectangle(number.x, number.y)
jump (300, 0)

and because neither of those worked, and I had no idea what the correct variable to use was, I messed with the syntax until I just gave up and checked the solution.

@CodeWithCODFY CodeWithCODFY added the content Issues with the lessons, practices, including their code examples label Jan 1, 2025
@NathanLovato
Copy link
Contributor

It's not required to name the for loop variable size or something specific. Perhaps your code had another difference, like different indentation causing the logic to be different? Using both the code listings you provided with the two function calls as part of the for loop solves the practice. Here's a screenshot of the first case:

Screenshot 2025-01-01 at 17 41 23

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

No branches or pull requests

2 participants