WEBVTT

0
00:00.510 --> 00:05.490
Hey guys, welcome to Day 27 of 100 Days of Code. Today

1
00:05.520 --> 00:10.520
we're going to be diving into a Graphical User Interfaces using TKinter,

2
00:11.310 --> 00:15.090
and we're also going to be learning more about function arguments.

3
00:15.840 --> 00:20.310
So we've already seen a little bit of graphical user interfaces when we use our

4
00:20.310 --> 00:24.270
turtle module, but I wanna go a little bit more in depth,

5
00:24.780 --> 00:29.010
and I want to show you one of the most popular ways of creating a graphical user

6
00:29.010 --> 00:33.420
interface. For example, a program like this in a separate window,

7
00:33.990 --> 00:37.620
and we're going to be using the inbuilt TKinter module to do this.

8
00:37.980 --> 00:41.280
So we're going to learn how to create labels, how to create buttons,

9
00:41.520 --> 00:46.520
how to respond to those button clicks as well as things like text inputs and how

10
00:47.280 --> 00:50.580
to lay out and design your programs.

11
00:51.120 --> 00:52.740
And while we're doing all of this,

12
00:52.770 --> 00:56.760
we're going to be looking at more advanced features of Python functions,

13
00:57.120 --> 01:02.040
including things such as how to set default arguments and what these Args and

14
01:02.040 --> 01:03.000
Kwargs are.

15
01:03.450 --> 01:08.450
So a way of being able to pass an undefined amount of inputs into a function,

16
01:09.120 --> 01:14.120
and we'll apply these advanced concepts to build a unit converter program using

17
01:15.120 --> 01:20.120
TKinter. This program is going to help us convert miles to kilometers or liters

18
01:21.060 --> 01:25.860
to gallons, or whatever little conversion that you might often use. For example,

19
01:25.860 --> 01:30.720
let's say that I ran 10 miles and I want to know how many kilometers that is.

20
01:31.080 --> 01:32.700
If I go ahead and click calculate,

21
01:32.880 --> 01:36.180
you can see it generates the equivalent value in kilometers,

22
01:36.450 --> 01:39.960
and you can see that our whole program is nicely laid out.

23
01:39.960 --> 01:42.840
So it says 10 miles is equal to 16 in kilometers,

24
01:43.350 --> 01:46.560
and it's fully responsive to our inputs.

25
01:47.190 --> 01:49.770
This is what we're going to be making as our project,

26
01:49.860 --> 01:54.860
a fully-fledged Python graphical user interface program that uses our Python

27
01:56.670 --> 02:01.380
code. So once you are ready, head over to the next lesson and let's get started by

28
02:01.380 --> 02:03.390
learning a bit more about TKinter.