This repository was archived by the owner on Sep 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
Lab 3.04 what is it supposed to do? #410
Copy link
Copy link
Open
Labels
BugIntroCS.2Medium SeverityMakes the lesson hard to use but has a workaroundMakes the lesson hard to use but has a workaround
Description
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:
- 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.
Metadata
Metadata
Assignees
Labels
BugIntroCS.2Medium SeverityMakes the lesson hard to use but has a workaroundMakes the lesson hard to use but has a workaround