Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,480 --> 00:00:01,840
All right, welcome back.
2
00:00:02,000 --> 00:00:02,730
At practice.
3
00:00:03,390 --> 00:00:09,900
And in this challenge, what we are going to do is we are going to develop a function that will be capable
4
00:00:09,900 --> 00:00:13,050
of calculating the aerial for a given rectangle.
5
00:00:13,290 --> 00:00:19,860
So these function will receive two parameters, two values, the height and the width of any rectangle
6
00:00:19,860 --> 00:00:22,590
that you want to calculate its area.
7
00:00:22,710 --> 00:00:23,190
All right.
8
00:00:23,700 --> 00:00:27,270
And then the function, of course, is going to calculate and return.
9
00:00:27,750 --> 00:00:30,940
Please note that the function will not print the area.
10
00:00:30,960 --> 00:00:34,300
It will just return the calculated area.
11
00:00:34,470 --> 00:00:40,620
And also, what I want you to notice is that the values may be of a floating point-I, but because we
12
00:00:40,620 --> 00:00:45,300
want to make precise calculations for our rectangles area.
13
00:00:45,450 --> 00:00:45,760
OK.
14
00:00:46,020 --> 00:00:52,230
So the function should calculate and find out the area of this rectangle and then return it.
15
00:00:52,740 --> 00:00:55,920
So that's actually what you have to do with the function itself.
16
00:00:56,460 --> 00:01:03,900
And also, I want you to write the relevant main path where you are going to test how the function works.
17
00:01:04,080 --> 00:01:10,530
So simply saying you are going to read two values from the user, you are going to ask the user to insert
18
00:01:10,530 --> 00:01:14,040
two values in your main part of the height and the width.
19
00:01:14,760 --> 00:01:19,740
And then you are going to call the function that is responsible for finding Ulvaeus area.
20
00:01:20,370 --> 00:01:28,020
And once you find out the area, you are going to print the returned result outside the function right
21
00:01:28,020 --> 00:01:29,010
inside of the main.
22
00:01:29,160 --> 00:01:30,240
That's very important.
23
00:01:30,300 --> 00:01:34,860
No, because the printing itself is going to happen outside of these function.
24
00:01:34,920 --> 00:01:39,810
These function that you are going to create is simply responsible for finding out.
25
00:01:39,960 --> 00:01:43,280
For calculating the area and then returning it.
26
00:01:43,340 --> 00:01:45,720
It does not print anything to the screen.
27
00:01:45,900 --> 00:01:48,180
So good luck with this exercise, guys.
28
00:01:48,270 --> 00:01:50,650
I hope all these three actions are clear.
29
00:01:50,670 --> 00:01:53,990
That's not a very long function.
30
00:01:54,030 --> 00:01:55,290
Just a couple of lines of code.
31
00:01:55,320 --> 00:02:00,900
Just make sure that you understand the type of the function, its name, what it receives, how with
32
00:02:00,900 --> 00:02:02,790
calculates and what it returns.
33
00:02:03,240 --> 00:02:04,920
And I'll see in the solutions video.
34
00:02:05,010 --> 00:02:05,390
Good luck.
3186
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.