1 00:00:07,580 --> 00:00:14,090 Now, it is a time for your first assignment here, so having all the knowledge that they just gave 2 00:00:14,090 --> 00:00:16,230 you, I want you to complete one assignment. 3 00:00:16,640 --> 00:00:21,040 So what I want to create I want to create two numbers, actually. 4 00:00:21,050 --> 00:00:24,200 I want the system plus the user to us. 5 00:00:24,200 --> 00:00:25,730 Two numbers, a number A. 6 00:00:28,370 --> 00:00:35,420 And no, baby, so you need to create two inputs and one of the inputs to be assigned to Number A in 7 00:00:35,420 --> 00:00:42,590 their input, to be assigned to number B, then what they want to do is to obstruct these numbers. 8 00:00:43,100 --> 00:00:44,720 So I want to subtract. 9 00:00:44,720 --> 00:00:46,520 So so subtract. 10 00:00:49,100 --> 00:00:53,300 No B from Numberi. 11 00:00:54,310 --> 00:00:57,850 And what they want to do is to print. 12 00:00:59,700 --> 00:01:00,450 The result? 13 00:01:01,130 --> 00:01:07,050 OK, so try two minutes to do this yourself, and if you cannot do it, simply continue the video, 14 00:01:07,050 --> 00:01:09,090 because I will show you how this is done right now. 15 00:01:09,210 --> 00:01:10,490 Now, let's create number eight. 16 00:01:12,000 --> 00:01:14,640 So number will be equal to float. 17 00:01:16,630 --> 00:01:17,440 Input's. 18 00:01:18,270 --> 00:01:18,870 First. 19 00:01:20,060 --> 00:01:26,840 OK, so here we ask the user for input and actually you can see that here I wrote Float because I want 20 00:01:26,840 --> 00:01:29,830 to specify that this is a float. 21 00:01:29,960 --> 00:01:32,630 So this is some number with the decimal point. 22 00:01:32,630 --> 00:01:32,960 Right. 23 00:01:33,230 --> 00:01:37,870 As you remember in the last exercise, we wrote it in front of the jury. 24 00:01:38,000 --> 00:01:38,270 Right. 25 00:01:38,630 --> 00:01:44,950 And we did it because we want to specify that this is not a string, but but this is actually an integer. 26 00:01:45,260 --> 00:01:48,140 So in that case, we want our first number to be float. 27 00:01:48,440 --> 00:01:51,140 So we have the ability to do this point. 28 00:01:51,530 --> 00:01:53,670 And also the second number will be the same. 29 00:01:54,030 --> 00:01:56,270 So no course float. 30 00:01:58,930 --> 00:01:59,710 Input's. 31 00:02:03,640 --> 00:02:04,450 Second. 32 00:02:06,300 --> 00:02:07,120 And that's it. 33 00:02:07,590 --> 00:02:13,090 Now we're getting to numbers from the user then since we have the numbers, we can simply subtract them. 34 00:02:13,440 --> 00:02:20,100 So this right so equals number eight minus number. 35 00:02:20,640 --> 00:02:23,390 And finally, let's print the results. 36 00:02:24,090 --> 00:02:27,400 So here are right, Resul estar. 37 00:02:28,380 --> 00:02:33,630 So, OK, so the results, I'm going to print it as a shrink. 38 00:02:33,630 --> 00:02:33,930 Right. 39 00:02:34,290 --> 00:02:40,080 And it is very important to specify this here because if you don't specify that the subtraction here 40 00:02:40,080 --> 00:02:47,240 is a is a string, then it will not work because you cannot combine integer with the result here. 41 00:02:47,250 --> 00:02:47,550 Right. 42 00:02:48,600 --> 00:02:49,530 So that's it. 43 00:02:49,860 --> 00:02:52,130 Let's from our code and this adult. 44 00:02:52,320 --> 00:02:58,170 So here you can see, whereas for the first number is the first number would be 10 and let the second 45 00:02:58,170 --> 00:03:00,090 number be seven. 46 00:03:00,330 --> 00:03:05,280 And here you can see that our resort district, so we can see the results statement and we can see the 47 00:03:05,280 --> 00:03:10,950 actual result, which is three with the decimal point, because we specified the number eight and the 48 00:03:10,950 --> 00:03:12,070 number B as flow. 49 00:03:12,120 --> 00:03:16,530 You can also go further by doing Kronish statement and simply check. 50 00:03:16,710 --> 00:03:23,430 If the subtraction is more than zero, then you can print the negative number. 51 00:03:24,440 --> 00:03:29,090 And in any other case, you can print the positive number. 52 00:03:30,440 --> 00:03:36,470 OK, so in that case, if I run the cold, let's make the first number equal to. 53 00:03:37,790 --> 00:03:38,570 Six. 54 00:03:40,450 --> 00:03:46,630 And the second equal to 12, and here we're getting minus six, which is a negative number both for 55 00:03:46,660 --> 00:03:50,530 defense statements, I will concentrate later on in this video.