Hint for code getting too complex
- "Write" down the four different output statements you would need to make.
- Add a comment to each statement that explains when that should be outputted (in English)
- These conditions can be mutually exclusive. That will make your code simpler.
- Be extremely careful if you try to use arithmetic to help. It can make the code much more complex than it needs to be. I highly recommend that you DON'T do it. It does not make your code better.
This topic: CenterForComputing
> WebHome >
Syllabi >
CSC121SylS2023 >
CSC121S2023Lab02 > CSC121S2023Lab2H2
Topic revision: r1 - 2022-12-29 - cathybareiss