Hello and welcome to all of my students today we will discuss if statements practice well, we'll go
over the assignments and see what's going on over here.
All right.
So in the first assignment, you are asked to create a dictionary.
And as you seek, as you see here, that as long as we go further in the course, we have several topics
mixed together in the assignments because this is the whole point.
The whole point is to learn a lot of topics and then know how to use them, integrate it all together.
So in here in the first assignment, please create a dictionary of employees.
All right.
And the key will state the name of the employee, for example, Jack, and the value would stand for
the valuable working hours that this employee can work.
So Jack, for example, can work six hours.
All right.
Straight ahead in the six in the second assignment, you will apply this dictionary and do some tests
on it.
Right.
So the office is looking for an employee who can walk between five to eight hours, use an if statement
that would check each cell to find that employee.
I want to find which employee can work between five to eight hours.
This is the requirement.
And I also want to cover the options here, which is six hours, seven hours and eight hours.
All right.
I'm just going to give you a hint.
For example, this is the working hours.
Of course, you're not going to use Excel or something like that.
You have to extract the values here.
Yeah, that's pretty obvious.
So once you do, don't do like X equals six, five or X equals six and so on, because this is kind
of not smart.
It's not efficient.
What what you want to do is to use, for example, the bigger and equal size.
So we also cover this way the fifth hour and also what's bigger than five.
But we don't want to get also nine, 10 and 11 hours right here.
I want it to be limited to eight.
So we have the logical operator or.
Right.
And then you also cover you also need to cover the eight hours in the same method right here.
Also, I recommend to use our IFES because you want to cover each of these employees from here.
Let's go straight ahead to the third assignment, which is a bit challenging compared to the second
assignment.
It also have two parts here.
And B, so the office is looking for an employee to work the weekend.
Also, the manager wants someone who will work two or four hours and just want to build here.
And I'll just underscore underline the order, because it's not between, as you can see here and here,
we have between, but here we have or so take it into consideration.
And and so it's pretty similar, pretty similar to the second assignment with a small change.
So in the second part in B here, the manager thinks that a name girl Karen, it's pretty obvious Karen
works two hours and we're looking to work someone two or four hours.
So he thinks that a girl named Karen fees for the job.
In addition, use a nested if to find.
What is the exact time she can spend at work?
All right, so please cover the options and find the exact time that she can spend at work.
And once you find it, don't do anything inside the nest if.
All right.
Meaning in the if under the nested, if under the nested, if don't do any action, don't do a print,
don't do anything.
And also make sure that you don't have an error.
We already covered this information in the previous lecture and also at a different point in the nested
if which is else.
All right.
So all of this material is covered in the statements theory lectures.
Please go over them before you begin.
Wish you good luck.
And in the next lecture, you will see the resolutions.
You will see the answers for these assignments.
Also, don't forget that each lecturer has an attachment, a file that with all the information that
we are going over in the lecture, each lecturer has this, that attachment file.
So we use them will help you.
We'll see you in the next lecture.
And thank you.
Bye bye.