1 00:00:00,060 --> 00:00:01,230 That's true statement. 2 00:00:05,520 --> 00:00:12,210 The syntax if statement is first, we type the word if then followed by the statement we need to test 3 00:00:12,210 --> 00:00:13,470 inside Brackett's. 4 00:00:23,280 --> 00:00:28,420 Keep in mind that we have to leave a space after the first break and before the second one. 5 00:00:29,790 --> 00:00:32,250 Now let's try the statement we want to test. 6 00:00:41,940 --> 00:00:45,270 We will check if age is greater than or equal 70. 7 00:00:46,090 --> 00:00:50,040 As you noticed, we use a dash GGGI for greater than or equal. 8 00:00:51,270 --> 00:00:54,510 Next step is to read the word then on a new line. 9 00:00:59,380 --> 00:01:03,790 Now, we can write all our code here if the previous statement was true. 10 00:01:13,360 --> 00:01:16,240 We can also test something else using the Eliot. 11 00:01:38,640 --> 00:01:47,010 We used a dash early for a less than or equal, if there was any other case we haven't tested, we can 12 00:01:47,010 --> 00:01:52,740 include it in our final Kelsh command and that will cover the age between 19 and 69. 13 00:02:01,790 --> 00:02:08,390 Finally, we end our live statement with the word if reversed, which will be F.I.. 14 00:02:33,730 --> 00:02:41,260 We can also use the greater than less than an equal sign instead of the Daschle and Daschle, but in 15 00:02:41,260 --> 00:02:45,630 order for us to do that, we have to put our statement in double parenthesis. 16 00:02:46,630 --> 00:02:47,620 Let's try that. 17 00:03:35,930 --> 00:03:36,420 Nice. 18 00:03:37,310 --> 00:03:40,840 Now, what if we want to test two statements at the same time? 19 00:03:41,810 --> 00:03:48,470 We can do that by using the ampersand, but this time we need also to add extra brackets to our statement. 20 00:03:52,750 --> 00:03:59,570 In this example, we are testing the input we get from the user against the user name and password. 21 00:03:59,590 --> 00:04:00,730 I love Peche. 22 00:04:01,820 --> 00:04:03,220 I'm sorry, I love Besch. 23 00:04:03,880 --> 00:04:07,240 If it's true for both of them, then we print access granted. 24 00:04:07,960 --> 00:04:13,060 If even one of them is not true or both of them not true, we print access denied. 25 00:04:13,360 --> 00:04:14,140 Let's try that. 26 00:04:33,190 --> 00:04:35,170 It's working now. 27 00:04:35,190 --> 00:04:41,890 What if we want only one of them to be true this time we had the or operator or the double vertical 28 00:04:41,890 --> 00:04:42,310 bar. 29 00:04:43,990 --> 00:04:44,860 Let's try that. 30 00:05:15,940 --> 00:05:22,360 As you can see, the only case that gave us access denied was one both of them do not match.