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

Typo in 6.2. Functions that Return Values? #258

Open
bmontana-edu opened this issue Jun 12, 2023 · 1 comment
Open

Typo in 6.2. Functions that Return Values? #258

bmontana-edu opened this issue Jun 12, 2023 · 1 comment

Comments

@bmontana-edu
Copy link

Course: PES-COOP-S2023 (thinkcspy)
Page: 6.2. Functions that Return Values
Link: https://runestone.academy/ns/books/published/thinkcspy/Functions/Functionsthatreturnvalues.html?mode=browsing
Username: bmontana-edu

Describe the bug
Immediately after the 6.4.2 ActiveCode activity, the text is: The return statement is followed by an expression which is evaluated. Its result is returned to the caller as the “fruit” of calling this function.

I think it should instead read: The function definition is followed by an expression which is evaluated. Its result is returned to the caller as the "fruit" of calling this function.

@bmontana-edu
Copy link
Author

Upon re-reading the text, it does make sense the way it is. However, to beginning programmers, the intended meaning may not be clear, especially with the example code given.

Perhaps changing the original wording would make it more clear: The return statement is followed by an expression (in this case y is the expression) which is evaluated. Its result is returned to the caller as the “fruit” of calling this function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant