1 00:00:00,000 --> 00:00:02,955 One important thing in programming is to make 2 00:00:02,967 --> 00:00:06,000 your code easy to read and easy to understand. 3 00:00:06,001 --> 00:00:08,885 It shouldn't take long for someone else to 4 00:00:08,897 --> 00:00:12,000 get what your code is about and what it does. 5 00:00:12,001 --> 00:00:15,023 So in addition to make your code as clean as 6 00:00:15,035 --> 00:00:18,000 possible, you can add what we call comments 7 00:00:18,001 --> 00:00:22,384 in order to add some notes to your code so you can explain some 8 00:00:22,396 --> 00:00:27,000 parts or simply tell what you're going to do next in your program. 9 00:00:27,001 --> 00:00:31,309 To create a comment, this is very easy. You just 10 00:00:31,321 --> 00:00:36,000 use the hashtag sign and then whatever is after this 11 00:00:36,001 --> 00:00:39,560 is going to be a comment. So this is a comment and 12 00:00:39,572 --> 00:00:43,000 as you can see here in the IDE, this is going to 13 00:00:43,001 --> 00:00:52,000 be in gray. If I run the program, so stop and rerun, if I run the program, 14 00:00:53,000 --> 00:00:57,343 you can see here the line "This is a comment" 15 00:00:57,355 --> 00:01:02,000 is not executed. So for example, you could add a 16 00:01:02,001 --> 00:01:06,293 comment here to say username, let's say "Ask 17 00:01:06,305 --> 00:01:11,000 the username" and then another comment which is. 18 00:01:12,000 --> 00:01:23,000 "Ask the user age" and then let's say "Print username and age". 19 00:01:23,001 --> 00:01:27,346 If you want, you can also add a comment at the 20 00:01:27,358 --> 00:01:32,000 end of the line. So whenever you start a comment, 21 00:01:32,001 --> 00:01:35,900 whatever after this is going to be a comment 22 00:01:35,912 --> 00:01:40,000 but before is going to be a valid instruction. 23 00:01:41,000 --> 00:01:44,946 You can also, if you want, comment a line. If I 24 00:01:44,958 --> 00:01:49,000 comment "This", it means simply that this is not 25 00:01:49,001 --> 00:01:56,000 going to be executed. So I can just run the program, what is your name, how old are you 26 00:01:56,001 --> 00:01:58,869 and then you can see we don't have the print. We 27 00:01:58,881 --> 00:02:02,000 don't have "Hello username" because I have commented 28 00:02:02,001 --> 00:02:05,054 this line. So when you comment a line, it's not 29 00:02:05,066 --> 00:02:08,000 going to be executed. That can be very useful 30 00:02:08,001 --> 00:02:11,489 when you want to test some code. You can comment 31 00:02:11,501 --> 00:02:15,000 a line to test without this instruction and then 32 00:02:15,001 --> 00:02:18,378 uncomment to test with your instruction. So to 33 00:02:18,390 --> 00:02:22,000 recap on comments, first of course make your code 34 00:02:22,001 --> 00:02:24,414 as clean and as easy to read as possible and then 35 00:02:24,426 --> 00:02:27,000 you can add comments to make it easier to understand 36 00:02:27,001 --> 00:02:30,489 what a certain part of your code does or maybe 37 00:02:30,501 --> 00:02:34,000 add some warnings for any other developers who 38 00:02:34,001 --> 00:02:36,866 would like to modify this code in the future or 39 00:02:36,878 --> 00:02:42,000 well just anything you want if it can make the code easier to read.