1
00:00:00,510 --> 00:00:05,490
Hey guys, welcome to Day 27 of 100 Days of Code. Today

2
00:00:05,520 --> 00:00:10,520
we're going to be diving into a Graphical User Interfaces using TKinter,

3
00:00:11,310 --> 00:00:15,090
and we're also going to be learning more about function arguments.

4
00:00:15,840 --> 00:00:20,310
So we've already seen a little bit of graphical user interfaces when we use our

5
00:00:20,310 --> 00:00:24,270
turtle module, but I wanna go a little bit more in depth,

6
00:00:24,780 --> 00:00:29,010
and I want to show you one of the most popular ways of creating a graphical user

7
00:00:29,010 --> 00:00:33,420
interface. For example, a program like this in a separate window,

8
00:00:33,990 --> 00:00:37,620
and we're going to be using the inbuilt TKinter module to do this.

9
00:00:37,980 --> 00:00:41,280
So we're going to learn how to create labels, how to create buttons,

10
00:00:41,520 --> 00:00:46,520
how to respond to those button clicks as well as things like text inputs and how

11
00:00:47,280 --> 00:00:50,580
to lay out and design your programs.

12
00:00:51,120 --> 00:00:52,740
And while we're doing all of this,

13
00:00:52,770 --> 00:00:56,760
we're going to be looking at more advanced features of Python functions,

14
00:00:57,120 --> 00:01:02,040
including things such as how to set default arguments and what these Args and

15
00:01:02,040 --> 00:01:03,000
Kwargs are.

16
00:01:03,450 --> 00:01:08,450
So a way of being able to pass an undefined amount of inputs into a function,

17
00:01:09,120 --> 00:01:14,120
and we'll apply these advanced concepts to build a unit converter program using

18
00:01:15,120 --> 00:01:20,120
TKinter. This program is going to help us convert miles to kilometers or liters

19
00:01:21,060 --> 00:01:25,860
to gallons, or whatever little conversion that you might often use. For example,

20
00:01:25,860 --> 00:01:30,720
let's say that I ran 10 miles and I want to know how many kilometers that is.

21
00:01:31,080 --> 00:01:32,700
If I go ahead and click calculate,

22
00:01:32,880 --> 00:01:36,180
you can see it generates the equivalent value in kilometers,

23
00:01:36,450 --> 00:01:39,960
and you can see that our whole program is nicely laid out.

24
00:01:39,960 --> 00:01:42,840
So it says 10 miles is equal to 16 in kilometers,

25
00:01:43,350 --> 00:01:46,560
and it's fully responsive to our inputs.

26
00:01:47,190 --> 00:01:49,770
This is what we're going to be making as our project,

27
00:01:49,860 --> 00:01:54,860
a fully-fledged Python graphical user interface program that uses our Python

28
00:01:56,670 --> 00:02:01,380
code. So once you are ready, head over to the next lesson and let's get started by

29
00:02:01,380 --> 00:02:03,390
learning a bit more about TKinter.

