1 00:00:07,590 --> 00:00:08,210 Hi, everyone. 2 00:00:08,550 --> 00:00:14,670 If you're new to Python, you might have the desire to learn the basics of Python as fast as possible. 3 00:00:14,850 --> 00:00:21,300 Python is one of the most valuable languages to know, and this is because he has wide use is an open 4 00:00:21,300 --> 00:00:27,540 source programming language that is used for game development, graphical user interface applications, 5 00:00:27,690 --> 00:00:29,340 education and many more. 6 00:00:29,350 --> 00:00:34,310 So having the skill to write code in Python will boost your career in this? 7 00:00:34,320 --> 00:00:38,880 Exactly what we are going to do in this video in the next one hour, I will simply teach you how to 8 00:00:38,880 --> 00:00:44,730 declare variables in Python, how to write control statements, if statements and large corporations 9 00:00:44,910 --> 00:00:50,790 to the video, you'll be able even to complete the exercises on your own and take the results. 10 00:00:50,970 --> 00:00:53,620 Of course, I'll provide solutions for this exercise. 11 00:00:53,640 --> 00:00:54,480 So don't you worry. 12 00:00:54,620 --> 00:00:55,470 And this is it. 13 00:00:55,710 --> 00:01:00,920 For the next one hour, take a cup of coffee or tea and let's go together for the next one hour. 14 00:01:00,930 --> 00:01:06,510 So here we are in the cliffside and the first thing we need to do to start a project is to select a 15 00:01:06,510 --> 00:01:13,920 new project and then here simply select Python project, then proceed next. 16 00:01:14,250 --> 00:01:17,820 And let's name our project as the intro. 17 00:01:19,050 --> 00:01:19,440 To. 18 00:01:21,430 --> 00:01:23,940 Bite them, and that's it. 19 00:01:25,180 --> 00:01:30,700 So now here you already created the project, and the first thing I will do in sight is to simply create 20 00:01:30,700 --> 00:01:33,960 a Python class or python package first. 21 00:01:34,300 --> 00:01:36,190 So the Python package will be called. 22 00:01:37,960 --> 00:01:46,810 Python intro, and now inside this package, you can finally create your first Python file, so let's 23 00:01:47,410 --> 00:01:49,330 select Python Dev module. 24 00:01:50,750 --> 00:01:59,770 InterOil select OK here and that to the guys, so you see something like this here in Eclipse and now 25 00:01:59,770 --> 00:02:08,290 we can start typing some functions and statements with Python and here we will run our code and simply 26 00:02:08,290 --> 00:02:09,070 get the results. 27 00:02:09,280 --> 00:02:13,540 Now, obviously, the first thing we want to do is simply to print Hello World. 28 00:02:13,780 --> 00:02:16,360 And with Python, actually this is quite easy. 29 00:02:16,480 --> 00:02:20,170 So let's right here print and in the brackets. 30 00:02:20,170 --> 00:02:21,050 Simple, right? 31 00:02:22,030 --> 00:02:22,600 Hello. 32 00:02:25,460 --> 00:02:26,060 World. 33 00:02:27,720 --> 00:02:30,510 That's it, and now we can run our program here. 34 00:02:32,330 --> 00:02:35,820 Run hospital and then you get Hello, world. 35 00:02:36,620 --> 00:02:42,680 So this was the first step of writing Python code, so since now you know how to print stuff. 36 00:02:43,170 --> 00:02:50,990 Let's actually have a look at what variables we can declare in Python and basically how we declare variables 37 00:02:51,140 --> 00:02:53,760 in this programming language before doing that. 38 00:02:53,960 --> 00:02:59,170 You must know that Python doesn't separate each language semicolon. 39 00:02:59,690 --> 00:03:03,320 Instead, it is called indentation level language. 40 00:03:03,650 --> 00:03:10,010 And this means that here will take care of the spacing between the different lines of code in order 41 00:03:10,010 --> 00:03:15,110 for our program to know what operation to do first and what to do next. 42 00:03:15,140 --> 00:03:20,980 So saying this, we can write some variables here and let's write the date. 43 00:03:21,110 --> 00:03:28,940 So let's write here variables and let's write date equals. 44 00:03:29,960 --> 00:03:30,800 Twenty one. 45 00:03:32,540 --> 00:03:35,900 By no equals three point one four. 46 00:03:37,910 --> 00:03:41,600 Then let's write a string email. 47 00:03:43,490 --> 00:03:44,330 Equals. 48 00:03:46,710 --> 00:03:49,460 Will Smith. 49 00:03:51,610 --> 00:03:52,250 Yahoo! 50 00:03:52,270 --> 00:03:52,850 Dot com. 51 00:03:53,320 --> 00:03:59,740 OK, and then let section write the boolean variable it equals. 52 00:04:01,090 --> 00:04:02,800 True, and that's it. 53 00:04:02,830 --> 00:04:08,890 These are actually four variables for different types of variables that you can write in Python. 54 00:04:09,070 --> 00:04:12,520 So the first one is an integer date in here. 55 00:04:12,520 --> 00:04:16,480 You can see that we don't need to specify that this variable is integer. 56 00:04:16,870 --> 00:04:18,910 Python automatically specifies that. 57 00:04:19,420 --> 00:04:22,720 Then we have the final word usually afloat. 58 00:04:23,240 --> 00:04:24,980 But here we are also looking to specify. 59 00:04:25,010 --> 00:04:29,880 Then we have an email which is a string and finally we have a boolean. 60 00:04:30,190 --> 00:04:33,900 So let's print each of this and see what's going to happen. 61 00:04:34,330 --> 00:04:40,870 So let's print the first date so you can print the dates like this print. 62 00:04:40,870 --> 00:04:46,210 And then the variable name is to refer directly to the value of date, which is twenty one. 63 00:04:47,440 --> 00:04:48,430 Then let's run. 64 00:04:51,440 --> 00:04:53,050 And here we getting twenty one. 65 00:04:53,980 --> 00:04:56,530 Then let's pour into the pie no. 66 00:04:57,980 --> 00:05:05,960 And you can see that by three point one four, then we can print the email and you can see that our 67 00:05:05,960 --> 00:05:07,880 email was Will Smith at Yahoo! 68 00:05:07,880 --> 00:05:08,450 Dot com. 69 00:05:09,450 --> 00:05:11,100 So it is quite simple, actually. 70 00:05:11,130 --> 00:05:19,080 OK, finally, I will print the volume, eat so to Rosewell so it doesn't matter what is the type of 71 00:05:19,080 --> 00:05:24,380 the variable, by doing the print statement, we can simply print it on our screens. 72 00:05:24,660 --> 00:05:25,390 So that's it. 73 00:05:25,620 --> 00:05:28,710 This is how we declare variables in Python.