0:00:19.680,0:00:24.960 This lesson is called For Loop Fun. In this[br]lesson, we'll use a number line to play a dice game. 0:00:26.660,0:00:30.400 Each player will roll three times[br]to assign a starting value, 0:00:30.400,0:00:32.400 a stopping value, and our interval. 0:00:33.880,0:00:37.720 During each turn, we circle[br]our starting value, and every value that is 0:00:37.720,0:00:40.500 the same number of steps forward as our interval[br]value. 0:00:41.500,0:00:43.500 We stop circling when we get to our stopping value. 0:00:45.000,0:00:46.900 The person with the highest[br]score wins! 0:00:47.820,0:00:50.140 For loops can come in handy in a lot of places. 0:00:51.440,0:00:54.400 If you were a[br]meteorologist, you would use for loops all the time. 0:01:03.420,0:01:10.680 Hi, I'm Becky. I work at Able Driller[br]Renewables as a wind meteorologist. 0:01:12.220,0:01:18.620 I forecast wind speeds for the Columbia River Gorge area, where the company owns wind farms. 0:01:19.960,0:01:23.240 We're trying to understand how much wind is going to be there, 0:01:23.900,0:01:26.580 so that we know how much power is going to be outputted. 0:01:27.000,0:01:31.380 We give that information to real time energy traders. They buy and sell power, 0:01:32.280,0:01:36.420 based on how much power we tell[br]them is going to be there, in order to make sure 0:01:36.640,0:01:39.400 the power grid is balanced, your lights stay on, 0:01:39.400,0:01:44.360 and that we maximize energy we get out of our wind farms. 0:01:47.920,0:01:50.660 We're at the national control center for Eber Troller Renewables here in Portland, 0:01:50.660,0:01:56.000 and this is where we have information coming in from all our farms across the country. 0:01:57.980,0:02:03.420 Even the highest power computers[br]today can't simulate the atmosphere everywhere. 0:02:04.060,0:02:10.840 In computer forecasting models, we have what[br]we call a grid. Each grid point is a latitude, 0:02:10.840,0:02:15.600 and a longitude. We have to calculate the physics, 0:02:15.600,0:02:20.440 and try to figure out wind speeds, temperature, pressure, that sort of thing. 0:02:21.180,0:02:23.840 Since these are fairly big grids and we're doing this in a lot of points, 0:02:23.940,0:02:28.500 we're looping over these[br]things millions and millions of times. 0:02:29.400,0:02:35.820 Everything I do, I'll use for loops. Here for example[br]is a for loop right there. 0:02:38.220,0:02:44.220 When you're forecasting wind, there's so many different parameters that go into it, 0:02:44.240,0:02:48.920 that go into it it would be impossible for a human to sit down and do all those calculations. 0:02:51.780,0:02:55.660 There's so many different aspects to what's going to be affecting the wind 0:02:55.660,0:02:59.680 that we need a computer model in order to forecast it.