SUCCEED

   

programmingMS 2012
Shodor > SUCCEED > Workshops > Archive > programmingMS 2012

Today the Programming Concepts workshop was taught by Kyle Garner. Initially Kyle had the class revisit their previous work with calendars and formatting to ensure each student had the chance to finish their project. Once the students had created a working calendar that generated individually numbered days in a proper format, Kyle verified that each calendar contained the appropriate loops, ended at 31 days, and contained any necessary additional formatting.

After taking a short break, Kyle began teaching the students how to put code on the internet by creating a public_html folder, allowing each student to access a personal website by going to http://www.shodor.org/~yourusername. The brief introduction to web programming created a lot of excitement as each student took a minute to daydream about what all is possible with code. Then, Kyle brought the group back to working with code by introducing Math.random(). This piece of code randomly generates a decimal between 0 and 1. The class briefly talked about ways to use Math.random(), as well as Math.round, Math.ceil, and Math.floor, which were discussed previously in the workshop. Armed with their newfound knowledge of mathematical manipulations, the students worked in small groups to create code that uses Math.random to generate numbers between 1 and 6. After ensuring everyone was on the right track with their random number generators, the students left for the day.