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