SUCCEED

   

parallelUniverse 2016
Shodor > SUCCEED > Workshops > Archive > parallelUniverse 2016

Aaron was teaching the workshop students a new language, C. C is a language that is quite different than JavaScript or PHP. In order to check out if code works in C, one needs to input it in BCCD rather than a web browser. To type out a command in terminal, you type ./ and the name of your document. In C, when using variables, one must not simply define one using “var”. Instead, they must define which type of variable the variable is: char, void, integer, or float. If a number is a decimal then you cast it and make it a float. Sometimes, functions will not work because they are part of a library. A library is a group of functions. The class today wrote code in an attempt to model Pi. In order to create a Pi model, they used mini rectangles to draw it. They did that by creating a for loop. A loop is useful because it can do things quickly and without loops people would have to rewrite code many times over and over again. They also used a print function to print out a rectangle. They created different variables such as a sum, height, and base.