All right, everyone, now it's time to do our third list of exercises, so now this is starting to
get real to do this exercise.
I already created this file and in the exercise, I already made the link.
So you should do the same thing before you get started.
So let me read the questions to you.
Number one, reuse the function to convert Celsius to Fahrenheit made on exercise, too.
But this time the Celsius temperature should be in form in the input field below and the calculation
done after pressing the button.
So in the second list of exercises, we were just getting a fixed value from an e-mail element.
But this time we will be able to type in any temperature in Celsius.
So like thirty five degrees Celsius and then when we click calculate, we should see the conversion
done here.
So we haven't talked about farms yet, we're going to talk about in the next section, but I'm just
leaving this tip here to get the input value, you should just use that value instead of that in HTML.
So this is very simple to do.
No, to print in the list below the years when the World Cup of soccer will happen from twenty twenty
two to twenty fifty, so there will be a World Cup of soccer on twenty twenty two.
And then I want you to print all the other years until 2050.
Just remember that the World Cup happens every four years with just one or two lines of code.
How are you going to print all those years here?
Number three, use the input fuds below to inform to grades and the number of absences of a student,
then follow the rules below to inform the result.
So here we have three fields we have to grade and we have the number of absences and then the rules
are minimum, 70 percent presence is required to be approved.
So we have a total number of classes of 20.
So if the student is not present and at least 70 percent, this student is going to fail automatically.
Second rule is minimum average of six point five is required to be approved.
So the average of these two grades must be six point five or higher.
Then if the student fails, we need to inform what was the reason.
So if the student has failed because of the absences or because of insufficient grade or both.
So let's say I type two for the first grade and six for the second grade and 18 absences when we calculate
and we need to inform that the student has failed for both absences and insufficient grade number four
C below the list of sales of an online course.
So here we have an array.
Which element of this array is an object representing a sale?
So here we have the name of the student that bought the course, the date, the amount paid.
And if the student requested a refund or not, when there's no refund, we can just see nil here.
And when the student requests a refund, then we have a date.
So now here's what we have to do.
So each of these sales we will need to print inside this table by using a loop and then we should just
calculate the total amount of sales and printed in the last line.
So right here, don't include the sales that had a refund requested.
So in this case, we shouldn't show this sale in our table and it should not be used to calculate the
total.
So that's all I didn't want to include many exercises because now the complexity is increasing a little
bit.
So just take your time and when you're finished, go back here to see the solution.
So good luck.