MRU-COMP1701-dev / fopp-functions-first

Foundations of Python Programming: Functions First
GNU Free Documentation License v1.3
0 stars 3 forks source link

Recommended Grammar Corrections for Section 4.5 (Returning a value from a function) #44

Open CodeIsBrokeYo opened 2 months ago

CodeIsBrokeYo commented 2 months ago

The following paragraphs could be made clearer with the accompanying bolded and/or bracketed corrections:

Paragraph https://runestone.academy/ns/books/published/gvsu_cis500_w24/functions_returning-a-value-from-a-function.html#functions_returning-a-value-from-a-function-6: "More usefully, a function can also be used to produce a value from [removed extra "from"] one or more parameters."

Paragraph https://runestone.academy/ns/books/published/gvsu_cis500_w24/functions_returning-a-value-from-a-function.html#functions_returning-a-value-from-a-function-16: "Return to [inserted] the previous CodeLens example and step through the code once again."

Paragraph https://runestone.academy/ns/books/published/gvsu_cis500_w24/functions_returning-a-value-from-a-function.html#functions_returning-a-value-from-a-function-24: "Much more usefully one would code a fruitful function that returns [added "s"] a value and assigns that value to a variable [removed "s") for later processing or display."

Paragraph https://runestone.academy/ns/books/published/gvsu_cis500_w24/functions_returning-a-value-from-a-function.html#functions_returning-a-value-from-a-function-30: "Instead, it suggests programmers get into the habit of always having a single return statement as the [inserted] very last line of their function’s body, to avoid ’forgetting’ to include all the returns."

Paragraph https://runestone.academy/ns/books/published/gvsu_cis500_w24/functions_returning-a-value-from-a-function.html#functions_returning-a-value-from-a-function-34: -Bullet 2: "Looks up the values of the variables "square" and "the_integer" [surrounded variable names with quotes to reduce confusion]: "square" is a function object and "the_integer" is 10" -Bullet 4: "Passes [corrected from "Pasess"] 11 as a parameter value to the square function (where an_integer is assigned 11 as a value), get back the return value 121"

Checkpoint 4.5.6 Solution Comment: "It squares 2, yielding the value 4. 4 is then passed as a value to square again, yielding [corrected from "yeilding"] 16."

Checkpoint 4.5.7 Solution Comment: "g has to be executed and return a value in order to know what parameter [corrected from "paramater" value to provide to "square()" [changed from "x"; I am assuming the comment meant to state that function since "g()" was used as an expression for the call to "square()", and "x" makes no sense in this context]."