1 00:00:09,770 --> 00:00:15,830 All right, everyone, now it's time to do our third list of exercises, so now this is starting to 2 00:00:15,830 --> 00:00:18,660 get real to do this exercise. 3 00:00:18,680 --> 00:00:24,470 I already created this file and in the exercise, I already made the link. 4 00:00:24,620 --> 00:00:27,830 So you should do the same thing before you get started. 5 00:00:28,460 --> 00:00:30,660 So let me read the questions to you. 6 00:00:31,280 --> 00:00:37,700 Number one, reuse the function to convert Celsius to Fahrenheit made on exercise, too. 7 00:00:37,970 --> 00:00:44,810 But this time the Celsius temperature should be in form in the input field below and the calculation 8 00:00:44,810 --> 00:00:47,160 done after pressing the button. 9 00:00:47,570 --> 00:00:54,680 So in the second list of exercises, we were just getting a fixed value from an e-mail element. 10 00:00:54,890 --> 00:00:59,690 But this time we will be able to type in any temperature in Celsius. 11 00:00:59,810 --> 00:01:06,800 So like thirty five degrees Celsius and then when we click calculate, we should see the conversion 12 00:01:06,800 --> 00:01:07,790 done here. 13 00:01:09,510 --> 00:01:16,050 So we haven't talked about farms yet, we're going to talk about in the next section, but I'm just 14 00:01:16,050 --> 00:01:24,660 leaving this tip here to get the input value, you should just use that value instead of that in HTML. 15 00:01:24,690 --> 00:01:27,020 So this is very simple to do. 16 00:01:28,280 --> 00:01:36,350 No, to print in the list below the years when the World Cup of soccer will happen from twenty twenty 17 00:01:36,350 --> 00:01:43,040 two to twenty fifty, so there will be a World Cup of soccer on twenty twenty two. 18 00:01:43,250 --> 00:01:48,430 And then I want you to print all the other years until 2050. 19 00:01:49,070 --> 00:01:56,440 Just remember that the World Cup happens every four years with just one or two lines of code. 20 00:01:56,450 --> 00:01:59,630 How are you going to print all those years here? 21 00:02:00,110 --> 00:02:07,280 Number three, use the input fuds below to inform to grades and the number of absences of a student, 22 00:02:07,790 --> 00:02:11,580 then follow the rules below to inform the result. 23 00:02:11,780 --> 00:02:20,300 So here we have three fields we have to grade and we have the number of absences and then the rules 24 00:02:20,300 --> 00:02:26,060 are minimum, 70 percent presence is required to be approved. 25 00:02:26,270 --> 00:02:29,460 So we have a total number of classes of 20. 26 00:02:29,660 --> 00:02:37,940 So if the student is not present and at least 70 percent, this student is going to fail automatically. 27 00:02:38,540 --> 00:02:46,220 Second rule is minimum average of six point five is required to be approved. 28 00:02:46,550 --> 00:02:54,050 So the average of these two grades must be six point five or higher. 29 00:02:54,620 --> 00:02:59,090 Then if the student fails, we need to inform what was the reason. 30 00:02:59,120 --> 00:03:06,800 So if the student has failed because of the absences or because of insufficient grade or both. 31 00:03:07,070 --> 00:03:16,340 So let's say I type two for the first grade and six for the second grade and 18 absences when we calculate 32 00:03:16,490 --> 00:03:25,490 and we need to inform that the student has failed for both absences and insufficient grade number four 33 00:03:25,490 --> 00:03:29,120 C below the list of sales of an online course. 34 00:03:29,150 --> 00:03:30,770 So here we have an array. 35 00:03:31,070 --> 00:03:36,290 Which element of this array is an object representing a sale? 36 00:03:36,470 --> 00:03:41,780 So here we have the name of the student that bought the course, the date, the amount paid. 37 00:03:42,110 --> 00:03:50,150 And if the student requested a refund or not, when there's no refund, we can just see nil here. 38 00:03:50,390 --> 00:03:54,800 And when the student requests a refund, then we have a date. 39 00:03:55,490 --> 00:03:57,350 So now here's what we have to do. 40 00:03:57,480 --> 00:04:05,630 So each of these sales we will need to print inside this table by using a loop and then we should just 41 00:04:05,630 --> 00:04:10,350 calculate the total amount of sales and printed in the last line. 42 00:04:10,370 --> 00:04:15,390 So right here, don't include the sales that had a refund requested. 43 00:04:15,590 --> 00:04:23,270 So in this case, we shouldn't show this sale in our table and it should not be used to calculate the 44 00:04:23,270 --> 00:04:23,810 total. 45 00:04:24,760 --> 00:04:31,210 So that's all I didn't want to include many exercises because now the complexity is increasing a little 46 00:04:31,210 --> 00:04:31,450 bit. 47 00:04:31,480 --> 00:04:36,430 So just take your time and when you're finished, go back here to see the solution. 48 00:04:36,880 --> 00:04:37,690 So good luck.