1
00:00:00,350 --> 00:00:05,970
Hi and welcome to this new section of
the course! And in this section starts the

2
00:00:05,970 --> 00:00:10,230
real deal, so in this section we're going
to develop the first application of

3
00:00:10,230 --> 00:00:14,700
the course. Until now you went through the
basics of Python. You learnt functions,

4
00:00:14,700 --> 00:00:20,460
loops, conditionals, and handling files etc.
Now we're going to practice all those

5
00:00:20,460 --> 00:00:25,050
concepts but actually building real
programs that can be used by users

6
00:00:25,050 --> 00:00:31,439
instead of just looping through trivial
strings and numbers and so . And so

7
00:00:31,439 --> 00:00:35,730
what are we going to build in this
section? Well are you going to build a

8
00:00:35,730 --> 00:00:41,550
program which you can give a word, an
English word and the program will return

9
00:00:41,550 --> 00:00:47,070
the definition of that word in English.
So let me go ahead and demonstrate the

10
00:00:47,070 --> 00:00:57,210
program. I'm using Python 3. App1.py is
the script. So the program asks you to enter

11
00:00:57,210 --> 00:01:07,080
a world which you want a definition for.
For instance let's say mountain. And so

12
00:01:07,080 --> 00:01:10,530
you get the definition for mountain and
in this case it happens to have two

13
00:01:10,530 --> 00:01:15,150
definitions. So mountain and mountain is
a feature of the earth�s surface that rises

14
00:01:15,150 --> 00:01:20,460
high above the base. And also mountain
has another meaning which is a great

15
00:01:20,460 --> 00:01:26,549
number of large amount of things not
placed in a pile. Anyway there are words who

16
00:01:26,549 --> 00:01:34,229
have only one meaning like mathematics I
hope. Yeah, so you get only one definition

17
00:01:34,229 --> 00:01:42,960
for mathematics, but also the program has
other features as well such as you know

18
00:01:42,960 --> 00:01:51,720
if you put rain with double n, so with an
extra n and press Enter the program

19
00:01:51,720 --> 00:01:56,820
instead of crashing, it displays a
message, it tells you: �Did you mean rain

20
00:01:56,820 --> 00:02:03,119
instead?� So it's quite an intelligent program
that guesses the world that the user may

21
00:01:59,430 --> 00:02:05,670
that guesses the world that the user may
had in mind, may have had in mind

22
00:02:05,670 --> 00:02:13,800
when typing the word. So enter Y if
yes if you meant rain, or N if no.

23
00:02:13,800 --> 00:02:20,100
Yeah, I meant rain. And you get the
definition for rain which happens to

24
00:02:20,100 --> 00:02:25,440
have two definitions. This is the first
one. This is the second one. The program

25
00:02:25,440 --> 00:02:31,470
also if you enter a very random word
that doesn't have any meaning like that

26
00:02:31,470 --> 00:02:35,760
you get the message �The word doesn't
exist. Please double check it.� Because you

27
00:02:35,760 --> 00:02:41,880
know the program cannot find a similar
word to this. It cannot find a word first

28
00:02:41,880 --> 00:02:47,730
and also it tries to find a similar word to
this one, but it doesn't because I don't

29
00:02:47,730 --> 00:02:55,080
think there's a match for this and so it
prints out this message and there's also

30
00:02:55,080 --> 00:03:00,900
other things like you know if you have
mix of letter cases there like

31
00:03:00,900 --> 00:03:07,800
uppercase R and A you still get the correct
input there. So that's a program. It has a

32
00:03:07,800 --> 00:03:11,730
command line interface which means you
are inputting, you're passing the input

33
00:03:11,730 --> 00:03:15,000
through the command line and you're
getting the input again from the command

34
00:03:15,000 --> 00:03:20,580
line, however later in next sections I'm
going to explain you web applications.

35
00:03:20,580 --> 00:03:27,000
How to create verifications with Python so
you then may get back here and actually

36
00:03:27,000 --> 00:03:32,600
create a web application using the code
that you'll be learning in this section

37
00:03:32,600 --> 00:03:38,310
so you can extend this program to make
it more user friendly with a

38
00:03:38,310 --> 00:03:44,010
web interface where the users can enter
the input through a web form, so from a web

39
00:03:44,010 --> 00:03:49,110
page and then press a button and then get
the output on the web page. However

40
00:03:49,110 --> 00:03:53,370
the code that you'll be learning in this
section is very important. It's core

41
00:03:53,370 --> 00:03:58,560
Python so it's, you're going to learn about
conditionals and loops so you're going

42
00:03:58,560 --> 00:04:04,170
to implement all those that you learned
in a previous section by developing this

43
00:04:04,170 --> 00:04:08,550
program. So I hope you like this and I
wish you success!

44
00:04:08,550 --> 00:04:10,000
See you in the next lecture!

