1 00:00:00,570 --> 00:00:06,090 In this section, you will learn about the different kinds of data you can work with in your Python 2 00:00:06,090 --> 00:00:06,770 programs. 3 00:00:06,780 --> 00:00:11,100 You will also learn how to use variables to represent data in your programs. 4 00:00:11,100 --> 00:00:13,410 So here we will. 5 00:00:15,320 --> 00:00:18,150 Write a simple code here, which is Hello world. 6 00:00:18,310 --> 00:00:19,010 Print. 7 00:00:19,900 --> 00:00:23,140 Hello, Oxley World. 8 00:00:23,620 --> 00:00:31,570 And here, let's take a closer look at what Python does when you run this script. 9 00:00:31,810 --> 00:00:37,990 As it turns out, Python does a fair amount of work even within the runs a simple program. 10 00:00:37,990 --> 00:00:41,770 So when you run this code, you should see this output. 11 00:00:41,770 --> 00:00:51,100 So when you run the our main.py file, the ending page here indicates that the file is a python program 12 00:00:51,100 --> 00:00:57,880 and your editor runs the file through the python interpreter which reads through the program and determines 13 00:00:57,880 --> 00:01:01,570 that what each word in the program means. 14 00:01:01,570 --> 00:01:10,180 For example, when the interpreter sees the word print here, when the interpreter sees the word print, 15 00:01:10,360 --> 00:01:12,280 followed by parentheses here. 16 00:01:13,250 --> 00:01:18,470 It prints to the screen whatever is inside the parentheses here. 17 00:01:19,980 --> 00:01:25,770 As you write your programs, your editor highlights different parts of your program in different ways. 18 00:01:25,800 --> 00:01:33,990 For example, it recognizes the print is the name of a function like this here and displays the word 19 00:01:33,990 --> 00:01:36,150 in one color. 20 00:01:36,180 --> 00:01:42,660 It recognizes that Hello world is not a python code here. 21 00:01:45,080 --> 00:01:49,370 And this place that fairs in different color. 22 00:01:49,820 --> 00:01:52,370 As you can see, it's green, it's purple here. 23 00:01:52,370 --> 00:01:59,510 So the feature is called syntax highlighting, and it's quite useful as you start to write your own 24 00:01:59,510 --> 00:02:00,500 programs. 25 00:02:03,410 --> 00:02:04,970 So let's get started with variables. 26 00:02:04,970 --> 00:02:10,790 So let's try using a variable in our main file and let's add a new line here. 27 00:02:10,790 --> 00:02:13,790 So we will message and here. 28 00:02:14,120 --> 00:02:17,630 Hello world. 29 00:02:19,090 --> 00:02:19,570 Here. 30 00:02:19,810 --> 00:02:23,500 And after that we will use print again. 31 00:02:23,530 --> 00:02:24,280 Print? 32 00:02:24,310 --> 00:02:25,750 Maybe if I raise them. 33 00:02:29,140 --> 00:02:30,010 Font size a little bit. 34 00:02:30,010 --> 00:02:32,350 So you can see better here. 35 00:02:32,830 --> 00:02:33,760 25. 36 00:02:35,050 --> 00:02:36,250 Okay, Nice. 37 00:02:36,580 --> 00:02:39,490 So now we're going to use print message. 38 00:02:40,470 --> 00:02:44,810 So now let's run this program again and see what's happening here. 39 00:02:44,820 --> 00:02:47,310 As you can see here, Hello world again. 40 00:02:47,700 --> 00:02:51,270 So we have added a variable name. 41 00:02:52,860 --> 00:02:58,140 And name the message, and every variable is connected to a value. 42 00:02:59,710 --> 00:03:03,580 Which is the information associated with that variable. 43 00:03:04,410 --> 00:03:07,860 In this case, the value is Hello World. 44 00:03:08,540 --> 00:03:09,500 This is the text. 45 00:03:10,210 --> 00:03:17,650 And adding a variable makes it a little more work for Python interpreter and when it processes the first 46 00:03:17,650 --> 00:03:25,420 line, it associates the variable message with the Hello World text. 47 00:03:25,420 --> 00:03:32,140 And when it reaches the second line, it prints the value associated with the message to the screen. 48 00:03:33,870 --> 00:03:39,910 Now let's expand on this program by modifying this file to print a second message. 49 00:03:39,930 --> 00:03:47,790 Here we will add a blank line to here and then we will add two new lines to the code. 50 00:03:48,210 --> 00:03:51,990 Now, message and here, Oxley. 51 00:03:53,180 --> 00:03:54,080 Python. 52 00:03:54,900 --> 00:03:55,710 Training. 53 00:03:56,440 --> 00:03:58,360 And or course. 54 00:03:58,360 --> 00:03:58,990 Right. 55 00:03:59,770 --> 00:04:03,250 And here after that, we will also print this message. 56 00:04:03,250 --> 00:04:06,280 So remember, these are the same variable names here. 57 00:04:06,670 --> 00:04:12,700 So now when you run this code, you will see this message. 58 00:04:13,660 --> 00:04:20,920 But you can change the value of variable in your program at any time, and Python will always keep track 59 00:04:20,920 --> 00:04:23,260 of its current value.