1 00:00:00,000 --> 00:00:00,500 2 00:00:00,500 --> 00:00:02,740 >> DAVID MALAN: Let's now start to tie together some of these fundamentals 3 00:00:02,740 --> 00:00:05,600 and implement a sheep who counts himself. 4 00:00:05,600 --> 00:00:10,780 To do this, when green flag clicked, let's first initialize a counter to 0. 5 00:00:10,780 --> 00:00:12,390 So for that, we need a variable. 6 00:00:12,390 --> 00:00:14,700 We'll call it, literally, Counter. 7 00:00:14,700 --> 00:00:17,430 >> I'll drag in this statement to my program, initializing 8 00:00:17,430 --> 00:00:19,520 that counter to 0. 9 00:00:19,520 --> 00:00:20,990 Now I'm going to do the following forever. 10 00:00:20,990 --> 00:00:24,070 11 00:00:24,070 --> 00:00:32,980 Every one second, I am going to say the value of that variable. 12 00:00:32,980 --> 00:00:35,250 Then I'm going to go ahead and wait for a couple of seconds. 13 00:00:35,250 --> 00:00:39,830 14 00:00:39,830 --> 00:00:42,505 Then I'm going to go ahead and update the value of that variable. 15 00:00:42,505 --> 00:00:45,410 16 00:00:45,410 --> 00:00:47,190 Let's click the green flag. 17 00:00:47,190 --> 00:00:58,932