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

Improve instruction Step-12 of the Python case converter project. #54232

Open
zairahira opened this issue Mar 27, 2024 · 2 comments · May be fixed by #54051
Open

Improve instruction Step-12 of the Python case converter project. #54232

zairahira opened this issue Mar 27, 2024 · 2 comments · May be fixed by #54051
Labels
new python course scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: PR in works Work in Progress (WIP) Issues. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.

Comments

@zairahira
Copy link
Member

Describe the Issue

Some campers are confused whether the solution is a single line print statement or two separate statements.
Some forum queries can be viewed here

Affected Page

https://www.freecodecamp.org/learn/scientific-computing-with-python/learn-list-comprehension-by-building-a-case-converter-program/step-12

Your code

Some campers found the solution to be:

def main():
    convert_to_snake_case('aLongAndComplexString')
    print(convert_to_snake_case)

instead of:

def main():
    print(convert_to_snake_case('aLongAndComplexString'))

Expected behavior

The updated instruction can be something like this:

Within the `main()` function, remove the `pass` statement and substitute it with a `print()` call. Pass `convert_to_snake_case(`'aLongAndComplexString'`)` as an argument to the `print` call in order to display the function's return value.

Screenshots

No response

System

  • Device: [e.g. iPhone 6, Laptop]
  • OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
  • Browser: [e.g. Chrome, Safari]
  • Version: [e.g. 22]

Additional context

No response

@zairahira zairahira added type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc. 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 Mar 27, 2024
@zairahira
Copy link
Member Author

Team, need your suggestions if the description can be further improved.
We can then open the issue to first timers only.

@lasjorg
Copy link
Contributor

lasjorg commented Mar 27, 2024

The instruction says to call the function, give it an input, and print the function output.

I'm fine with clarifying instructions if needed, but we should be mindful about not feeding them the answer. That diminishes the learning experience.

To me, the incorrect answer example points to a camper not understanding what a function return is more than unclear instructions.

We can be more explicit about wrapping the function call inside the print to avoid campers creating variables for the return.

Inside the `main()` function, replace `pass` with a `convert_to_snake_case()` call. Pass the string `'aLongAndComplexString'` as input to the function. Put the function call inside a `print()` function to print its output.

I would prefer "argument" and "return value" but input and output are the same, so if that follows the style used throughout we should keep it.

@Sembauke Sembauke added first timers only Open for anyone doing contributions for first time. You do not need permission to work on these. and removed status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. labels Mar 28, 2024
@zairahira zairahira added status: PR in works Work in Progress (WIP) Issues. and removed first timers only Open for anyone doing contributions for first time. You do not need permission to work on these. labels Mar 28, 2024
@larymak larymak linked a pull request Mar 28, 2024 that will close this issue
4 tasks
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: PR in works Work in Progress (WIP) Issues. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants