SUCCEED

   

programmingMS 2016
Shodor > SUCCEED > Workshops > Archive > programmingMS 2016

The beginning of the workshop started with a basic review of the main concepts that the students learned yesterday such as Data Types and Variables. The next topic that the students were taught was the concept of arrays. To learn more about arrays, the students were told to download a script made by Shodor. First, the students were taught why arrays are important when programming long lists of information. They were taught how to declare an array by using the key word var. Then they were taught to place an equal sign after the variable name as well as two brackets to contain all of the information inside of it. After learning the basics of how arrays work, the students then went onto the JavaScript file given to them. They started creating their own arrays in the file. While using the JavaScript file, the students were then introduced to different attributes of arrays such as the length function, which tells you the length of the array. They were also introduced to the pop function, which takes off the last element of an array. The next big topic covered today was conditional statements. First, the students were taught differences between code running linearly and non-linearly. This basically means that instead of a program running smoothly all the way through, it will do only parts of the code in various parts of the program instead of all of it. After this they were taught about conditional statements such as the if, then statement. They were first taught how the computer reads if else statements such as if a computer does not have an else statement it will continue to read if statements in order. Following this they then learned about nesting if statements, which basically means after it goes through the first conditional statement then it checks the next one and so on and so forth. After going through the basics of conditional statements the students were then given a mini-project where the students had to create conditional statements to determine the quadrant location of different points inputted. The final concept that the students were taught today was loops. Initially, the lesson started by teaching the three different types of loops. The first kind of loop that was taught was the while loop. With the while loop, the students were taught how to create the while loop, how it is implemented, what infinite loops are, and how to create timers. Also with loops, they were taught how to manipulate arrays using loops. The second kind of loop that was taught was the for loop. With the for loop, the students were taught the basic syntax for it and how it is different from other loops. The last loop that the students went over was the do while loop. This loop was then explained to the students. The basic function of the do while loop is that it runs the initial code in the do section of the code then does the while section following it. After learning about the functionality of loops the students were then given another mini project where they have to flip a coin a different number of times depending on the type of loop that they create.