Programming
HTML
On the first day of computer science class, we learned how to use HTML. HTML stands for Hyper Text Markup Language.
Example of the code;
Example of how it turned out to be;
Logo
As a class, we used logo in Net Logo.
With logo we give commands to the turtles to do something.
Using logo we can make the turtles draw many things.
One thing we did with Net Logo was making spirals.
The code;
The code turned out to be this;
Recursion
We created a function to draw a y;
After that we created a code to create a tree.
Here is the code;
Here is the tree;
Another thing we did with Net Logo was making spirals.
Here is the code;
The code turned out to be this;
Major Tools for Programming
Variables
Variables are words or letters that represent other values.
Loops
We wanted the computer to repeat a block of code so we used loop.
Comments
Having comments during programming allows the programmer to explain what their code is.
Without comments programmers wouldn't know what their code means.
Functions
Functions help to organize the code to let you execute the same code, even inside another function.
Spacing
Spacing allows the computer to understand each number or equation sign putten in a bracket or outside the bracket.
Turtle Colony
On Wednesday, as a class we created our own turtle colony.
We wanted to see if given these turtles a tiny advantage they would be able to dominate the environment after a number of generations.
This included giving them the ability to walk, eat, and move.
Examples of some codes;
Here's a picture of the whole turtle colony;
Here's the turtle colony's plot line;
Python
On Wednesday of week two, we learned about Python.
We also learned where Python came from and learned to program it.
We used loops, variables, functions, conditionals, and user input.
Here's an example of the code we used;
Algebra Solving with Python
On Wednesday, we had also solved equations using python.
We solved the equation ax + b = cx + d.
We solved for x and the equation became x = d - b / a - c
Here's the code;
Here's how it turned out;
Prime Number Solving
Also on Thursday, we used python to see whether one number was divisible by another.
Next, we used python to write a program to check whether the number is prime or not.
Here's an example of the code.
Here's the outcome of it.
Thursday of Week 4
On Thursday of week 4, we went back to programming a little.
We had to use sorting algorithm.
Later on we did sorting with our own hands with Mr.Miller.
A sort on Python can look like this;
This is a sort that Python already programmed into the computer.