1 00:00:08,480 --> 00:00:13,730 Hello and welcome to all of my students today we will discuss if statements practice well, we'll go 2 00:00:13,730 --> 00:00:17,000 over the assignments and see what's going on over here. 3 00:00:17,060 --> 00:00:17,350 All right. 4 00:00:18,050 --> 00:00:21,830 So in the first assignment, you are asked to create a dictionary. 5 00:00:21,830 --> 00:00:27,710 And as you seek, as you see here, that as long as we go further in the course, we have several topics 6 00:00:27,710 --> 00:00:31,250 mixed together in the assignments because this is the whole point. 7 00:00:31,730 --> 00:00:37,370 The whole point is to learn a lot of topics and then know how to use them, integrate it all together. 8 00:00:37,820 --> 00:00:42,220 So in here in the first assignment, please create a dictionary of employees. 9 00:00:42,230 --> 00:00:42,610 All right. 10 00:00:42,860 --> 00:00:48,620 And the key will state the name of the employee, for example, Jack, and the value would stand for 11 00:00:48,620 --> 00:00:52,230 the valuable working hours that this employee can work. 12 00:00:52,630 --> 00:00:55,100 So Jack, for example, can work six hours. 13 00:00:55,510 --> 00:00:55,880 All right. 14 00:00:56,630 --> 00:01:02,810 Straight ahead in the six in the second assignment, you will apply this dictionary and do some tests 15 00:01:02,810 --> 00:01:03,170 on it. 16 00:01:03,180 --> 00:01:03,590 Right. 17 00:01:03,620 --> 00:01:11,900 So the office is looking for an employee who can walk between five to eight hours, use an if statement 18 00:01:11,900 --> 00:01:15,190 that would check each cell to find that employee. 19 00:01:15,200 --> 00:01:18,960 I want to find which employee can work between five to eight hours. 20 00:01:19,010 --> 00:01:20,270 This is the requirement. 21 00:01:21,410 --> 00:01:28,730 And I also want to cover the options here, which is six hours, seven hours and eight hours. 22 00:01:28,880 --> 00:01:29,330 All right. 23 00:01:29,660 --> 00:01:31,490 I'm just going to give you a hint. 24 00:01:31,820 --> 00:01:33,620 For example, this is the working hours. 25 00:01:33,630 --> 00:01:36,080 Of course, you're not going to use Excel or something like that. 26 00:01:36,080 --> 00:01:38,360 You have to extract the values here. 27 00:01:38,390 --> 00:01:40,020 Yeah, that's pretty obvious. 28 00:01:40,520 --> 00:01:51,440 So once you do, don't do like X equals six, five or X equals six and so on, because this is kind 29 00:01:51,440 --> 00:01:52,220 of not smart. 30 00:01:52,220 --> 00:01:53,120 It's not efficient. 31 00:01:53,540 --> 00:01:58,050 What what you want to do is to use, for example, the bigger and equal size. 32 00:01:58,080 --> 00:02:02,710 So we also cover this way the fifth hour and also what's bigger than five. 33 00:02:02,960 --> 00:02:06,960 But we don't want to get also nine, 10 and 11 hours right here. 34 00:02:07,040 --> 00:02:10,100 I want it to be limited to eight. 35 00:02:10,100 --> 00:02:12,440 So we have the logical operator or. 36 00:02:12,980 --> 00:02:13,370 Right. 37 00:02:13,610 --> 00:02:20,240 And then you also cover you also need to cover the eight hours in the same method right here. 38 00:02:21,470 --> 00:02:27,890 Also, I recommend to use our IFES because you want to cover each of these employees from here. 39 00:02:27,920 --> 00:02:33,200 Let's go straight ahead to the third assignment, which is a bit challenging compared to the second 40 00:02:33,200 --> 00:02:33,720 assignment. 41 00:02:33,980 --> 00:02:35,600 It also have two parts here. 42 00:02:35,600 --> 00:02:39,910 And B, so the office is looking for an employee to work the weekend. 43 00:02:40,250 --> 00:02:47,960 Also, the manager wants someone who will work two or four hours and just want to build here. 44 00:02:47,960 --> 00:02:56,090 And I'll just underscore underline the order, because it's not between, as you can see here and here, 45 00:02:56,090 --> 00:03:00,350 we have between, but here we have or so take it into consideration. 46 00:03:01,310 --> 00:03:06,800 And and so it's pretty similar, pretty similar to the second assignment with a small change. 47 00:03:07,370 --> 00:03:13,280 So in the second part in B here, the manager thinks that a name girl Karen, it's pretty obvious Karen 48 00:03:13,280 --> 00:03:16,780 works two hours and we're looking to work someone two or four hours. 49 00:03:17,210 --> 00:03:20,870 So he thinks that a girl named Karen fees for the job. 50 00:03:21,110 --> 00:03:24,260 In addition, use a nested if to find. 51 00:03:25,590 --> 00:03:28,080 What is the exact time she can spend at work? 52 00:03:29,130 --> 00:03:36,060 All right, so please cover the options and find the exact time that she can spend at work. 53 00:03:36,330 --> 00:03:40,530 And once you find it, don't do anything inside the nest if. 54 00:03:40,830 --> 00:03:41,340 All right. 55 00:03:42,060 --> 00:03:49,750 Meaning in the if under the nested, if under the nested, if don't do any action, don't do a print, 56 00:03:49,950 --> 00:03:50,900 don't do anything. 57 00:03:51,090 --> 00:03:53,410 And also make sure that you don't have an error. 58 00:03:53,610 --> 00:04:01,560 We already covered this information in the previous lecture and also at a different point in the nested 59 00:04:01,560 --> 00:04:02,400 if which is else. 60 00:04:02,870 --> 00:04:03,260 All right. 61 00:04:03,270 --> 00:04:08,580 So all of this material is covered in the statements theory lectures. 62 00:04:08,760 --> 00:04:10,410 Please go over them before you begin. 63 00:04:10,710 --> 00:04:11,660 Wish you good luck. 64 00:04:11,670 --> 00:04:14,980 And in the next lecture, you will see the resolutions. 65 00:04:14,990 --> 00:04:16,920 You will see the answers for these assignments. 66 00:04:17,220 --> 00:04:22,830 Also, don't forget that each lecturer has an attachment, a file that with all the information that 67 00:04:22,830 --> 00:04:27,040 we are going over in the lecture, each lecturer has this, that attachment file. 68 00:04:27,240 --> 00:04:29,150 So we use them will help you. 69 00:04:29,610 --> 00:04:30,750 We'll see you in the next lecture. 70 00:04:30,850 --> 00:04:31,350 And thank you. 71 00:04:31,500 --> 00:04:31,940 Bye bye.