Programming
Programming
Processing
Today we learned about Processing. Processing is in the C-family and it is used to make graphics.
We used Processing to create a face. We learned how to create shapes, like triangles, arcs, and eclipses.
Here is the picture of the face:
Then after that we learned how to make variables, loops, and conditionals. To learn this we made a ball
bounce around the screen.
Here is the code I made and a screenshot of the ball
On Wednesday, we made a house in processing. After we created the house we turned the house into a function. After
we made a function for the house we were able to change the location and size of the house easily. We also were able
to create more than one house at at time.
On Wednesday, I learned how to use Sine and Cosine to make a ball go in a circular path. Below
is the code and the circle it made:
Java script
Today we learned about JavaScript. The first thing we did was learn how to make it print out
something. Then we learned how to create variables and conditionals. We also made a text adventure game.
It would ask a question then depending on your answer ask another question. In my game you were stuck
on an island and it would ask you questions about what you would do. Then at the end it would tell you
if you were rescued or if you died. When I was finished making it, there were still problems
with it. An example of when is after it tells you if you survived or not
it is supposed to end, but sometimes after it tells you another window would open.
↓ Click run to begin the Text Adventure. ↓
JS Bin
Turing Machine / Halting Problem
Today we also learned more about the Turing Machine and the Halting problem. I learned that
the Turing machine is a really simple machine that is able to simulate any computer
algorithm. It is also a hypothetical machine. The Halting problem is deciding if you give an
input and a program, would it run forever or halt. Computers are not able to solve the halting problem
because people believe it is unsolvable.