1 00:00:00,790 --> 00:00:03,190 The following content is provided under a Creative 2 00:00:03,190 --> 00:00:04,730 Commons license. 3 00:00:04,730 --> 00:00:07,030 Your support will help MIT OpenCourseWare 4 00:00:07,030 --> 00:00:11,390 continue to offer high quality educational resources for free. 5 00:00:11,390 --> 00:00:13,990 To make a donation or view additional materials 6 00:00:13,990 --> 00:00:17,520 from hundreds of MIT courses, visit MIT OpenCourseWare 7 00:00:17,520 --> 00:00:18,590 at ocw.mit.edu. 8 00:00:24,220 --> 00:00:26,320 PROFESSOR: So for this last class 9 00:00:26,320 --> 00:00:30,920 exercise we have this following code. 10 00:00:30,920 --> 00:00:35,750 So we have 46 for USA gold, 27 for UK gold, 11 00:00:35,750 --> 00:00:38,140 1 for Romanian gold. 12 00:00:38,140 --> 00:00:41,830 We make this variable, here, Total Gold, 13 00:00:41,830 --> 00:00:46,060 to be the sum of those three which I believe is 74. 14 00:00:46,060 --> 00:00:48,240 Then we're going to print total gold. 15 00:00:48,240 --> 00:00:49,007 OK? 16 00:00:49,007 --> 00:00:51,340 Then we're going to increase the value for Romanian gold 17 00:00:51,340 --> 00:00:53,200 and we're going to print it again. 18 00:00:53,200 --> 00:00:58,330 So as always, you can just copy this, pop it into Python, 19 00:00:58,330 --> 00:01:02,080 and run it to test yourself, but you should do it just 20 00:01:02,080 --> 00:01:03,650 in your mind first. 21 00:01:03,650 --> 00:01:06,670 So notice it print 74 in 74, and that's 22 00:01:06,670 --> 00:01:08,470 because we never told the program 23 00:01:08,470 --> 00:01:12,400 to calculate the new total. 24 00:01:12,400 --> 00:01:18,020 So we only calculated the total, way up here on line 5. 25 00:01:18,020 --> 00:01:22,790 If we calculated the total again down here, 26 00:01:22,790 --> 00:01:28,340 then it would be 74.75 So let's look at the answers, 27 00:01:28,340 --> 00:01:31,340 hopefully you guys got that. 28 00:01:31,340 --> 00:01:34,200 Perfect, majority are good to go. 29 00:01:34,200 --> 00:01:37,340 If you didn't get that please try to review it, 30 00:01:37,340 --> 00:01:39,620 review why it didn't work.