[Script Info]
Title:
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.41,0:00:03.89,Default,,0000,0000,0000,,Okay, how did you do? Spectacularly well, I hope. Lets
Dialogue: 0,0:00:03.89,0:00:06.74,Default,,0000,0000,0000,,go over the solution. Okay, so my solution looks something
Dialogue: 0,0:00:06.74,0:00:09.95,Default,,0000,0000,0000,,like this. First we have an ordered list at the
Dialogue: 0,0:00:09.95,0:00:12.56,Default,,0000,0000,0000,,top and bottom. You know? Opening and closing. And then
Dialogue: 0,0:00:12.56,0:00:18.49,Default,,0000,0000,0000,,we have a for loop for going over the range from 1 to n plus 1 and then we say,
Dialogue: 0,0:00:18.49,0:00:21.63,Default,,0000,0000,0000,,basically, if x is divisible, and we can use the
Dialogue: 0,0:00:21.63,0:00:25.44,Default,,0000,0000,0000,,mod operator to determine if something is divisible. Mod basically
Dialogue: 0,0:00:25.44,0:00:28.12,Default,,0000,0000,0000,,says, it gives you, it gives you the remember. So, x
Dialogue: 0,0:00:28.12,0:00:30.76,Default,,0000,0000,0000,,is divided by 15, what is the remainder. If that, If
Dialogue: 0,0:00:30.76,0:00:33.67,Default,,0000,0000,0000,,that's zero that means x is divisible by both 3 and
Dialogue: 0,0:00:33.67,0:00:37.91,Default,,0000,0000,0000,,5 we print FizzBuzz. If it's divisible by 3 we print Fizz,
Dialogue: 0,0:00:37.91,0:00:41.74,Default,,0000,0000,0000,,if it's divisible by 5 we print Buzz, else we just
Dialogue: 0,0:00:41.74,0:00:44.92,Default,,0000,0000,0000,,print x. And we have our end if and our end for.
Dialogue: 0,0:00:44.92,0:00:47.93,Default,,0000,0000,0000,,Okay, not too bad huh? Now there's lots of ways of,
Dialogue: 0,0:00:47.93,0:00:50.56,Default,,0000,0000,0000,,you know, if you want to minimize the logic done here but
Dialogue: 0,0:00:50.56,0:00:52.34,Default,,0000,0000,0000,,that's not really what I'm trying to look for right here. I
Dialogue: 0,0:00:52.34,0:00:54.76,Default,,0000,0000,0000,,just want to see if you can actually use your for statements
Dialogue: 0,0:00:54.76,0:00:55.73,Default,,0000,0000,0000,,and your if statements and your
Dialogue: 0,0:00:55.73,0:00:58.51,Default,,0000,0000,0000,,variable substitution. And your variable substitution
Dialogue: 0,0:00:58.51,0:01:02.69,Default,,0000,0000,0000,,to make a quick little template. So if you got that, nicely done.