a Chinese writer

Episode 10 Keep working on code

Assignment 10 continues on zyBooks. This time, there are a total of 10 questions, all of which require writing code independently to complete specific tasks. The focus is on using if, for, and while statements, as well as combinations of these structures (i.e., nesting). It’s not extremely difficult, but it’s not exactly easy either.

(The tasks include:

Remove grey from RGB(red, green, blue);

Given a highway number, indicate whether it is a primary or auxiliary highway. If auxiliary, indicate what primary highway it serves. Also indicate if the (primary) highway runs north/south or east/west.

Write a program that takes in a line of text as input, and outputs that line of text in reverse.

…)

The hard part is understanding the problem requirements—deciding which method(s) to use, how to set up variables, what variables to include, and in what order to write the code. Every step requires careful thought because it’s easy to make mistakes. For someone with programming experience or a natural talent for it, this might be no big deal. But for someone like me, coming from a humanities background, this is a brand new field. While it may not feel like hell-level difficulty, I do feel that I’m not particularly gifted in this area. The logical thinking involved doesn’t come naturally to someone used to a liberal arts mindset.

The easy part is that once the code passes and you go back to review the complete and correct version, it actually doesn’t seem that hard to understand. The logic is clear and smooth. I can tell what each line means and why it was written that way—and sometimes, I even realize there’s an alternative way to write it, like using either for or while in certain cases.

Throughout this process, my understanding of the relevant concepts has definitely deepened, though I also know there’s still a long way to go.

Even in the Module 5 Quiz, which seems slightly easier than the assignments, logical precision is still crucial. One small oversight can lead to mistakes, and I’ve had to spend extra time on certain questions. It makes me a bit concerned about whether there will be enough time for the final exam.

Of course, I will try my best.


留下评论