1 00:00:25,590 --> 00:00:31,910 Hi, everybody, and welcome in this lecture, we will focus on practicing integer and flawed variables. 2 00:00:32,370 --> 00:00:38,910 And before we begin, I must say, guys, feel free to be creative, meaning that the following assignments 3 00:00:38,910 --> 00:00:41,640 can be done in different ways. 4 00:00:41,640 --> 00:00:45,460 And some ways, multiple ways can be correct. 5 00:00:45,480 --> 00:00:47,310 There is not only one way to solve it. 6 00:00:48,420 --> 00:00:48,710 All right. 7 00:00:48,740 --> 00:00:50,430 I saw before beginning. 8 00:00:50,430 --> 00:00:56,220 I just want to say that I recommend you to resolve the following assignments by yourself at first take 9 00:00:56,220 --> 00:00:59,100 about 30 to 45 minutes to resolve it by yourself. 10 00:00:59,940 --> 00:01:06,240 And if you do that, if you see that you get into trouble, just follow the next lecture and see the 11 00:01:06,240 --> 00:01:07,350 resolution there. 12 00:01:07,800 --> 00:01:08,130 All right. 13 00:01:08,550 --> 00:01:09,780 So let's begin. 14 00:01:10,260 --> 00:01:15,540 First of all, let us create six variables, by the way, and this practice. 15 00:01:15,540 --> 00:01:21,330 We're going to calculate our expense account expenses during the month. 16 00:01:23,070 --> 00:01:23,640 All right. 17 00:01:23,640 --> 00:01:29,670 And also, we have a calculation of a very important thing, donation to the poor. 18 00:01:30,210 --> 00:01:35,380 Try to do a once in a while when I have some extra money, and that's about it. 19 00:01:35,760 --> 00:01:36,540 So let's begin. 20 00:01:36,900 --> 00:01:40,500 So, first of all, create six variables. 21 00:01:40,920 --> 00:01:48,390 Gross salary, health insurance, rent, food, salary tax. 22 00:01:48,390 --> 00:01:55,770 By the way, by the way, very important or very important to mention here, this is percent. 23 00:01:57,160 --> 00:01:57,600 All right. 24 00:01:58,410 --> 00:02:05,460 Just when you calculate calculate just it's not like a value toplane value like this is, for example, 25 00:02:05,460 --> 00:02:08,940 ten thousand dollars or this is twelve hundred dollars. 26 00:02:09,000 --> 00:02:11,610 It's not zero point two dollars. 27 00:02:11,730 --> 00:02:12,910 It's a percent. 28 00:02:12,930 --> 00:02:13,460 All right. 29 00:02:13,680 --> 00:02:15,420 So this is very important. 30 00:02:15,690 --> 00:02:24,030 We need to use I mean, meaning here that we have zero two percent, but we can't, like, create a 31 00:02:24,030 --> 00:02:31,050 variable called S like salary tax zero two percent. 32 00:02:31,050 --> 00:02:33,980 We can't do that because Python would not know. 33 00:02:33,990 --> 00:02:35,000 What do we mean. 34 00:02:35,340 --> 00:02:44,040 So I'm just mentioning that you need to create a variable that you should use later on as a tax. 35 00:02:44,130 --> 00:02:44,640 All right. 36 00:02:44,790 --> 00:02:48,810 But just keep in mind that it's a percent right. 37 00:02:49,270 --> 00:02:51,270 If you ask me, I can give you a hint. 38 00:02:51,460 --> 00:02:51,990 All right. 39 00:02:52,210 --> 00:02:53,250 You can leave it. 40 00:02:55,370 --> 00:03:06,020 You can leave it as zero point two and afterwards do some mathematical action of multiplying your salary. 41 00:03:07,120 --> 00:03:11,770 And on this no, combined with another no. 42 00:03:12,100 --> 00:03:20,380 All right, just try to think it through by yourself, but it's important to know that this one is percent 43 00:03:20,630 --> 00:03:27,630 right and as well, this F variable is also a percent. 44 00:03:27,760 --> 00:03:30,310 We want to give zero point one. 45 00:03:33,850 --> 00:03:34,940 Let's do it like that. 46 00:03:34,960 --> 00:03:35,290 All right. 47 00:03:35,290 --> 00:03:38,050 Let's call it 20 percent. 48 00:03:38,620 --> 00:03:39,130 Right. 49 00:03:40,450 --> 00:03:42,810 It's much easier to understand that way. 50 00:03:43,570 --> 00:03:49,180 And we want to donate the poor out of our net salary, 10 percent. 51 00:03:50,230 --> 00:03:57,100 All right, guys, after we created these variables, let's try to calculate our net salary and print 52 00:03:57,100 --> 00:04:04,720 it, meaning we have the gross salary, which is ten thousand, and we need to reduce all of these. 53 00:04:04,990 --> 00:04:05,470 All right. 54 00:04:05,470 --> 00:04:13,690 We need to reduce all of these variables out of the 10000 and please do not use less. 55 00:04:13,810 --> 00:04:19,330 I'm just going to mention here, not for two, not for a task to. 56 00:04:21,660 --> 00:04:25,780 Or maybe even use in the mosque three. 57 00:04:26,010 --> 00:04:26,400 All right. 58 00:04:26,520 --> 00:04:27,520 It's easier that way. 59 00:04:28,140 --> 00:04:34,980 So these these donation to the poor do not use it in the calculation in this section, because you can 60 00:04:34,980 --> 00:04:38,850 see here the donation to the poor is out of the net salary. 61 00:04:39,390 --> 00:04:39,860 All right. 62 00:04:40,050 --> 00:04:43,280 So first of all, you need to calculate the net salary. 63 00:04:43,560 --> 00:04:44,070 All right. 64 00:04:44,400 --> 00:04:46,620 And only afterwards. 65 00:04:46,960 --> 00:04:47,620 Uh. 66 00:04:48,690 --> 00:04:58,590 Only afterwards, in the third section, you should calculate the donation to the poor, so only here 67 00:04:58,600 --> 00:05:01,310 you calculate, calculate the donation to the poor. 68 00:05:01,620 --> 00:05:09,060 So do not use this variable in this section right in the second section. 69 00:05:09,090 --> 00:05:11,400 Just use these variables only. 70 00:05:12,910 --> 00:05:22,000 So after we calculated the net salary and printed it us out of this net salary, try to calculate the 71 00:05:22,000 --> 00:05:24,310 amount of the donation we give to the poor. 72 00:05:25,630 --> 00:05:26,110 All right. 73 00:05:26,110 --> 00:05:31,420 So after we had the net salary, let's calculate the donation to the poor, which is 10 percent. 74 00:05:31,630 --> 00:05:32,140 All right. 75 00:05:32,890 --> 00:05:40,750 And when we are finished with this, we will get a result, which is something like this. 76 00:05:44,430 --> 00:05:51,180 All right, something like this, meaning we will have whole numbers on this side, but we will have 77 00:05:51,180 --> 00:05:54,600 a lot of numbers on the decimal side of the number. 78 00:05:54,990 --> 00:06:01,050 And so this is a very large amount of numbers and we don't need it because if we have, for example, 79 00:06:01,290 --> 00:06:08,100 one dollar, if we have one dollar and we have zero zero zero zero zero four. 80 00:06:08,350 --> 00:06:14,430 So we don't care about the all these because they are they're pointless for us. 81 00:06:14,430 --> 00:06:15,550 It's very small numbers. 82 00:06:16,200 --> 00:06:23,700 So in the fourth fourth section, what I want you to do is to round the limit of the result from three. 83 00:06:30,070 --> 00:06:32,870 Into two numbers after the decimal. 84 00:06:33,520 --> 00:06:38,970 So watch what I want you to do as you're going to get a number with lots of numbers after a decimal, 85 00:06:39,490 --> 00:06:43,900 and I want you to round them into only seeing two numbers after the decimal. 86 00:06:43,930 --> 00:06:44,340 All right. 87 00:06:44,890 --> 00:06:49,980 And we haven't studied it, but I'm not going to go easy on you guys. 88 00:06:49,990 --> 00:06:51,080 I already said it. 89 00:06:51,340 --> 00:06:55,420 So this one is a challenging, challenging section. 90 00:06:55,570 --> 00:06:58,510 And what I want you to do is to go into Google. 91 00:06:59,200 --> 00:06:59,650 All right. 92 00:07:00,040 --> 00:07:02,650 And type this phrase in Google. 93 00:07:03,400 --> 00:07:07,540 Once you type this phrase in Google, you get results. 94 00:07:08,590 --> 00:07:10,120 Just going to give you a hint. 95 00:07:10,960 --> 00:07:11,470 All right. 96 00:07:11,620 --> 00:07:19,060 Navigate into the first result that you see that belongs to the stack overflow dot com website. 97 00:07:19,790 --> 00:07:22,480 And why am I doing this, guys? 98 00:07:22,480 --> 00:07:25,990 Why am I being hard on you with this section? 99 00:07:26,110 --> 00:07:27,670 For one reason only. 100 00:07:28,030 --> 00:07:30,100 This is not a theoretical course. 101 00:07:30,220 --> 00:07:34,480 In this course, I'm going to prepare you to be a class developers. 102 00:07:35,320 --> 00:07:44,260 And of course, the developers do not have all the information from their friends or from their colleagues. 103 00:07:44,620 --> 00:07:48,710 A class developers go into Google and find answers over there. 104 00:07:49,030 --> 00:07:49,540 All right. 105 00:07:49,660 --> 00:07:55,420 I'm doing it on a daily basis for years now, because when I'm not knowing something, just going to 106 00:07:55,420 --> 00:08:00,390 Google and typing the phrases that I want and looking for answers. 107 00:08:00,610 --> 00:08:04,510 So here I'm not just throwing you into the sea, as you might say. 108 00:08:04,720 --> 00:08:10,030 I'm giving you the exact phrase and I'm telling you guys, click on the first results that you see of 109 00:08:10,030 --> 00:08:12,880 stack overflow and try to find your answer over there. 110 00:08:13,330 --> 00:08:19,240 And don't worry if you get into trouble, because am going to show you the resolution anyway and then 111 00:08:19,240 --> 00:08:20,160 following next year. 112 00:08:20,230 --> 00:08:20,640 All right. 113 00:08:21,340 --> 00:08:22,570 So don't worry about it. 114 00:08:22,570 --> 00:08:23,620 We'll go through this. 115 00:08:23,890 --> 00:08:26,020 But this is a challenging section. 116 00:08:26,800 --> 00:08:27,530 All right, guys. 117 00:08:27,670 --> 00:08:34,090 So we're basically done here wishing you good luck in the homework. 118 00:08:34,090 --> 00:08:35,800 And I will see you in the next lecture.