Monday, Aug 9: I went for a hike on Whistler mountain, which is a 90 minute drive from where I live. It was really difficult, especially one path that was pretty much all uphill. Therefore, I couldn’t learn anything on this day (I’m writing this on Wednesday) so when we went home (at about 4:00 pm, and we left at 10:15 am) I coded the rest of the day 🙂
Tuesday, Aug 10: I coded a little thing that checks the frequency of letters in a phrase (so for example, the phrase “hello, world” has 2 o’s, 1 h, and so on) and the use is explained down below. Other than that, I just did math and science (also explained down below).
Wednesday, Aug 11: I coded a machine that checks if a number is prime or not. The special thing is that I made it in Javascript, which I’m not as familiar with as Scratch. It turns out that there are more efficient ways to check if a number is prime or not. It’s all explained down below. Other than that, I learned about the sampling distribution, which is a way to see how likely the chance of you getting those results in statistics. For example, if you got 7 heads and 3 tails while flipping a coin, what is the probability of getting 7 heads, 3 tails? (Spoiler alert: 17% chance.)
Thursday, Friday: Um i forgot to write a blog today 🙁

Here is my machine for computing the frequency of letters in a phrase. For example, the phrase “hello, world” has 2 o’s, 1 h, and so on. This is useful for cracking a very simple code called a Caesar Cypher. Basically, you shift the letters in a phrase by a specific number. So if that number was 3, and your coded message was “Meet me after school,” you add three to the position of each letter in the alphabet. So M + 3 = P, E + 3 = H and so on, so that the message becomes “Phhw ph diwhu vfkrro.” 
Now, it turns out that whenever you write, you leave a fingerprint and it looks like this. So when you try shifting it with the Caesar Cypher, it shifts the entire fingerprint, allowing you to figure out what the shift was! 
I also learned about sampling distributions, which is a way to see how likely the chance of you getting those results in statistics. ###for example, if you got 7 heads and 3 tails while flipping a coin, what is the probability of getting 7 heads, 3 tails? (Spoiler alert: 17% chance.) 
Here is a machine that checks if a number is prime. 
The way I’ve been doing it before is checking every single integer before it and seeing if it’s divisible, starting at two. ###for example, checking 19 would be: 19/2 = 9.5 X
19/3 = 6.3333… X
19/4 = 4.75 X
.
.
.
19/18 = 1.05555… X
so 19 is prime.
It turns out that you only need to check up the square root of a number to see if it’s prime or not. So checking 19 is like:
sqrt(19) = 4.3588989435…
###then you take the ceiling of that number, meaning that you raise the number to the nearest whole integer…
ceil(4.3588989435) = 5
so you need to check until 5.
19/2 = 9.5 X
19/3 = 6.3333… X
19/4 = 4.75 X
19/5 = 3.8 X
So 19 is prime.
In the examples shown (42683713, 42683718, 42683717), the last one took 1 ms, while the other two took 0.12 ms. Extremely fast! I tried larger numbers, like 54754950277109 (prime), and that took 0.873 seconds to find the primality of a 14 digit number! Eight seconds to check if 3631093754809709 was prime, which is 16 digits. Still very impressive!
If you want the source code, here is the link: https://bit.ly/3lXf3vR
Also, it prints out how many numbers it needed to check to see if a number is prime or not. This one took 6,532 steps, which is one less that the square root of 42683717. 
This is a Khan Academy page dedicated to cryptography and prime numbers are very valuable in the study of cryptography. It’s sort of complex to explain, but in a nutshell, it’s a way to send secret messages across the internet without anybody eavesdropping.

I learned how you can connect a function to its derivative, and how you can tell which is which based on the graph. This was fun, because you’re supposed to look at graphs and figure out which is the first derivative, which is the second derivative, and which is the actual function. 
I learned about Big O Notation, and how computers run. Basically, the Big O of a computer program is a calculation of how long the calculation will take if you add more items. For example, a sorting algorithm called bubble sort has a big O of n^2, meaning that if you double the number of items, it quadruples the processing time, meaning that bubble sort is pretty inefficient.

I worked on my tile based scrolling platformer game, and it’s finally coming along! There is a level editor, parallaxing background, Goombas (the mushrooms) to jump on, mystery blocks, self-arranging tiles, particle effects and so much more! 
Sorry Goomba. 
I was following a tutorial, but I added my own stuff along the way, such as clouds that you can jump on. 
Here is the scrolling part! 
And this is the level editor. See the semi-transparent block?
Recent Comments