Learning Blog
Arrays/Lists - December 4
Station 1: Completion Station
I may not be familiar with how to access elements in a list by index, and I may not be familiar with the definition of a list and how to access elements.
Through this type of exercise, I learned how to define a list containing multiple elements and understood how lists store elements in order. In addition, I mastered the concept of list indexes and knew that list indexes start from 0, which means that nums[2] will return the third element in the list (i.e. 6). I also learned how to access and print specific elements in a list by index, and understood how to use this basic data structure in a program.
These basic knowledge laid the foundation for my subsequent more complex programming tasks and enabled me to process and manipulate data more efficiently.
Station 2 Construct Code
Before learning the exercises combining Arrays and while loops, I may not understand how to use while loops to iterate over the elements in an array, nor how to dynamically process and manipulate array data through loops. I may not be familiar enough with how to control the termination conditions of the loop and how to access array elements step by step through the loop.
After this type of exercise, I learned how to use while loops to iterate over an array and access each element in the array through a counter or index. Specifically, I learned how to use conditional judgments in the loop to control the execution of the loop, ensuring that it will continue to iterate over the array until all elements are accessed. By combining while loops and arrays, I can process data more flexibly and perform various operations, such as finding elements and modifying elements. This provides a foundation for my subsequent processing of more complex data tasks.
Station 3: Prediction Station
Practicing code matching can improve my programming skills, enhance my ability to read and understand code, and cultivate my analytical and problem-solving skills. By matching the code logic with the expected results, I learned how to debug the program and correct errors. Before learning, I might have difficulty understanding the code execution flow or troubleshooting errors. After learning, I can better grasp basic structures such as loops and conditions, and improve my debugging skills.
Reflection
I understand that you think sorting code blocks is the most challenging activity, and it is indeed a challenging task for beginners. The reasons are:
1. Logical thinking requirements: Sorting code blocks is not just about putting the code in order, it also requires a deep understanding of the execution order and logic of the code. Beginners may not be familiar with the execution flow of the code block and may not know which part of the code should be executed first and which part of the code should be executed later.
2. Understanding code structure: Sorting involves the mastery of the structure and syntax of the code, such as variable declarations, function calls, and the use of loops. Beginners may not have formed an intuitive understanding of the code structure and may not be able to quickly determine which code should be first and which code should be later.
3. Complexity of control flow: For complex code blocks containing conditional statements, loops, functions, etc., it may be very difficult to understand how the code blocks interact and execute. Beginners need to learn how to analyze the control flow of the code (such as `if` conditional statements, `while` loops, etc.) to arrange the execution order correctly.
Therefore, this task requires students to not only understand syntax and functions, but also to have certain debugging skills and a way of thinking about program execution order, which is a big challenge for novice programmers.
During my study, I feel like I have a good understanding of the Retrieve and change elements of an array by position number objective. I am able to use array indexes to access and modify elements. I know that array indexes start at 0, and I can access specific elements in an array by using the correct index, and even modify them. For example, I can use code to modify the value of a specific position in an array, or get an element in an array by index. I feel confident that I can do these operations correctly.
However, I feel that I need to improve on the How to use a while loop to loop through each element of an array objective. Although I know how to use a while loop, I am not completely familiar with how to ensure that the loop correctly loops through the entire array. Sometimes, I may encounter situations where the loop does not end correctly or I cannot ensure that every element is accessed. I realize that understanding how to set the appropriate loop condition and how to ensure that the loop loops through all elements is something I need to improve on.
I know that I need more practice to master how to loop through an array in a while loop. I can improve by writing more practice code, especially some exercises that include different array lengths and data types. Through continuous practice, I believe I can master the combination of while loop and array more proficiently and improve my problem-solving ability.