My Computer Programming Work
The most important programming we did was learn to code in HTML. This whole website is based on what we learned from HTML. Every time we did something new in class we had to post it on our website.
We learned how to make repetitions. We also learned how to make loops.
This is the code used to make the spiral thing above. We first taught the program how to make a circle then we used taught it how to repeat the circle to create the spiral.
This is an example of a code that was written in order to check if it was even or not and to check if it was prime or not. To check if it was even or not we had the computer check if it was divisible by 2. To check if a number was prime, we had the computer check if it was divisible by any other number until it got to itself. If it got to itself and didn't find another number that it was divisible by it meant it was prime.
This is the code for the flower. I first wrote a code for a quarter circle then I wrote a code to make a petal. After that I wrote a code that would put 12 petals together. I finally put all the things together to make the flower.
We also worked on Python and we made a couple of games that would allow the user to interact with the computer. The red are comments made for you to understand the code, but are not part of it. (The code and the result are shown below.)
This is the code and an example of me playing the game to test it.
This a code used to play rock, paper, scissors with the computer.
Something else we learned how to do on python was how to make a star with a bunch of little stars on the tips and we learned how to make a snowflake. For both of these we had the computer take in two inputs: the length of the shape and how many levels to make(n). We told the computer how to make the basic shapes and created a loop until the shape was finished.
Back to Home Server Project Circuit Project Gaming Project Robotics Artificial Intelligence