You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by jdonwells March 1, 2022
Lab 3.04 has sections Problem 1, Problem 2, Problem 3. Students are asked to decide if there is a problem in the code. But we never tell them what the code is supposed to do.
The example itself seems a bit contrived. I can't imagine anyone writing something like that. This is a bad example to have students study. Let's not do that.
For anyone trying to figure out what we are trying to show them:
We are creating local variables in the function named the same as the global variables, but they are assigned after reference.
We are creating local variables named the same as global variables, but they seem to be assigned the wrong values.
We are using the global variables in the function such that your favorite pet is always cat.
The text was updated successfully, but these errors were encountered:
Discussed in #363
Originally posted by jdonwells March 1, 2022
Lab 3.04 has sections Problem 1, Problem 2, Problem 3. Students are asked to decide if there is a problem in the code. But we never tell them what the code is supposed to do.
The example itself seems a bit contrived. I can't imagine anyone writing something like that. This is a bad example to have students study. Let's not do that.
For anyone trying to figure out what we are trying to show them:
The text was updated successfully, but these errors were encountered: