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

[Building a Cipher] Introduction to code comment seems to be out of sequence #54869

Closed
huyenltnguyen opened this issue May 20, 2024 · 2 comments · Fixed by #54874
Closed

[Building a Cipher] Introduction to code comment seems to be out of sequence #54869

huyenltnguyen opened this issue May 20, 2024 · 2 comments · Fixed by #54874
Labels
new python course scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix.

Comments

@huyenltnguyen
Copy link
Member

Description

In the Building a Cipher project, comment is first mentioned in step 51:

After that, you'll see an error appear in the terminal. As a temporary fix, comment out the caesar() call.

But in step 59, we actually introduce comment and its syntax:

When coding, readability is key. Comments serve as effective notes, explaining the logic behind your code. [...]

In Python, you can write a comment using a #. Anything that comes after the # won't be executed.

Links

Suggestion

In step 51, we introduce function parameters, so I think mentioning comment here would be a little overwhelming. I think the comment introduction should either be moved to an earlier challenge or kept in step 59.

If we move the comment introduction to an earlier challenge, step 51 can be kept as-is.

But if we keep comment introduction in step 59, we should update step 51. Instead of asking the users to comment out the code, I wonder if we could ask them to remove the line entirely (though the code is added in step 50, so it's probably a little odd to immediately remove it in the next step).

@huyenltnguyen huyenltnguyen added scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. new python course labels May 20, 2024
@zairahira
Copy link
Member

This does seems to be out of sequence.
I would suggest to not comment out caesar() in step 51 and let the exception be(the resolution is there in the coming steps).

This part of the instruction can be updated from:

After that, you'll see an error appear in the terminal. As a temporary fix, comment out the caesar() call.

to:

After that, you'll see an error appear in the terminal. You'll work on the resolution in the coming steps.

@Dario-DC
Copy link
Contributor

If we don't ask to comment out the function call in step 51 and tell the campers they will work on fixing the error in the next steps, it would be logic to address the error in the console (TypeError: caesar() missing 2 required positional arguments: 'message' and 'offset') and require to pass the two positional arguments to the function call in step 52.

But then the function will seem to work fine, although it's still using the text and shift variable inside its body instead of the function parameters.

The alternative is to ignore the TypeError in the console for step 52, and address it directly in step 53. For that we should simply keep the function call instead of commenting it out and there is no need to swap the step order.

Honestly, I don't like particularly any of these options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new python course scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix.
Projects
None yet
3 participants