1 00:00:00,009 --> 00:00:02,470 OK. So let us begin. 2 00:00:02,480 --> 00:00:07,550 And the first thing we're gonna do is we're gonna create the user interface 3 00:00:07,900 --> 00:00:14,710 that would allow the user to choose from the register login and exit options. OK? So 4 00:00:15,149 --> 00:00:20,479 let's call this function the main function. OK? So I'm gonna say, define main 5 00:00:20,840 --> 00:00:22,590 brackets, colon. 6 00:00:23,450 --> 00:00:27,030 And now let us say while true. 7 00:00:27,229 --> 00:00:29,520 OK. So as long as the program is running, 8 00:00:29,870 --> 00:00:33,069 let us display the menu options. So 9 00:00:33,490 --> 00:00:35,610 I'm going to say first of all prints 10 00:00:36,169 --> 00:00:39,150 and we can say number one. 11 00:00:40,220 --> 00:00:42,439 Uh let me add my coats right there. 12 00:00:43,189 --> 00:00:47,369 So I'm gonna say option number one dot register. 13 00:00:48,630 --> 00:00:49,369 Ok. 14 00:00:49,750 --> 00:00:50,970 Let's close the colon 15 00:00:52,250 --> 00:00:55,189 and then let's print out option number two 16 00:00:55,909 --> 00:00:58,409 to dot log in. 17 00:00:59,490 --> 00:01:04,169 And then option number three very, very, very boring option 18 00:01:04,589 --> 00:01:06,540 simply are exits. 19 00:01:07,220 --> 00:01:07,800 OK? 20 00:01:08,769 --> 00:01:11,160 All right. Actually, you know what, let's print out 21 00:01:11,519 --> 00:01:15,279 one other statement at the very top kind of like a welcome message. 22 00:01:15,809 --> 00:01:18,300 So let's print, let's say welcome 23 00:01:18,809 --> 00:01:20,199 to the 24 00:01:20,930 --> 00:01:22,269 uh user 25 00:01:23,279 --> 00:01:24,980 registration 26 00:01:26,559 --> 00:01:27,540 uh system. 27 00:01:28,330 --> 00:01:28,739 OK? 28 00:01:30,389 --> 00:01:34,800 And there you go. All right. So we've got the options all laid out. 29 00:01:35,069 --> 00:01:38,199 Now let us prompt the user to provide us with 30 00:01:38,309 --> 00:01:41,569 an option, which particular option would they want to go for? 31 00:01:42,040 --> 00:01:45,139 I'm gonna call the variable choice to store 32 00:01:45,930 --> 00:01:47,190 the particular option. 33 00:01:47,529 --> 00:01:50,190 So I'm gonna say input and then let us say, 34 00:01:50,550 --> 00:01:55,309 what would you like to do? 35 00:01:56,480 --> 00:01:57,339 Ok. 36 00:01:58,110 --> 00:01:59,540 And there it is. All right. 37 00:01:59,849 --> 00:02:02,559 So once the user has provided their option, 38 00:02:02,569 --> 00:02:05,410 we need to create scenarios that cater to each one of them. 39 00:02:05,419 --> 00:02:05,769 So 40 00:02:06,089 --> 00:02:08,690 I'm going to start off with the very first one in here and say 41 00:02:09,029 --> 00:02:12,759 if our choice equals option number one, 42 00:02:13,289 --> 00:02:15,850 we are going to print, 43 00:02:17,479 --> 00:02:20,550 let's say registration, 44 00:02:22,309 --> 00:02:24,039 uh registration 45 00:02:26,839 --> 00:02:28,089 uh selected. 46 00:02:29,080 --> 00:02:33,179 OK? Now, obviously nothing else is gonna happen for now, we will add 47 00:02:33,750 --> 00:02:36,210 the actual functionality later, 48 00:02:36,600 --> 00:02:39,940 but let's move on to the next option. So I will say 49 00:02:40,080 --> 00:02:40,580 if 50 00:02:41,630 --> 00:02:43,330 choice equals 51 00:02:44,350 --> 00:02:48,149 and then option number two, let's add a colon. 52 00:02:48,369 --> 00:02:50,850 So what's gonna happen in here? We can say print 53 00:02:51,759 --> 00:02:54,130 and then we can say uh 54 00:02:54,789 --> 00:02:56,300 log in 55 00:02:56,509 --> 00:02:57,300 selected. 56 00:02:59,009 --> 00:02:59,789 OK? 57 00:03:01,029 --> 00:03:04,000 And now let us add option number three, 58 00:03:05,070 --> 00:03:06,759 if choice 59 00:03:07,250 --> 00:03:08,160 equals 60 00:03:08,919 --> 00:03:11,220 option number three, add a colon, 61 00:03:12,059 --> 00:03:14,679 we can just say print and 62 00:03:17,300 --> 00:03:18,100 exit in 63 00:03:20,169 --> 00:03:21,350 the system. 64 00:03:21,669 --> 00:03:22,229 OK? 65 00:03:22,990 --> 00:03:25,410 And I think this should be fine. So 66 00:03:25,529 --> 00:03:29,240 remember that we also need to add the break statement 67 00:03:29,479 --> 00:03:32,830 should in case the user decides to choose an option 68 00:03:33,119 --> 00:03:34,279 that doesn't exist. 69 00:03:34,479 --> 00:03:38,000 So I'm going to come in and say break and now 70 00:03:39,210 --> 00:03:40,179 break, 71 00:03:40,610 --> 00:03:41,160 enter, 72 00:03:43,250 --> 00:03:44,720 add a colon 73 00:03:45,059 --> 00:03:46,550 and now we can print, 74 00:03:47,759 --> 00:03:48,839 let's say 75 00:03:48,940 --> 00:03:50,820 uh invalid 76 00:03:51,889 --> 00:03:53,979 choice. Please try again. OK? I like this 77 00:03:54,880 --> 00:03:56,990 invalid choice please try again 78 00:03:57,789 --> 00:04:01,089 and there it is. Ok. So 79 00:04:01,550 --> 00:04:05,410 let us go ahead right now to run the program. 80 00:04:05,699 --> 00:04:08,389 So I'm gonna say main and now 81 00:04:08,589 --> 00:04:09,419 brackets 82 00:04:09,869 --> 00:04:12,809 and let's see what will happen. Let's go ahead and run the program 83 00:04:13,550 --> 00:04:17,048 and there you go. Ok, let's try. Option number one. 84 00:04:17,730 --> 00:04:20,089 Ok. We're just selected, option number two, 85 00:04:20,519 --> 00:04:24,239 login selected option number three exit in the system. Ok. 86 00:04:24,489 --> 00:04:28,549 So far so good. We've added the first component of our program. 87 00:04:28,630 --> 00:04:31,040 We have added the user interface. So join 88 00:04:31,239 --> 00:04:33,130 in the next video where we will not begin to tackle 89 00:04:33,140 --> 00:04:37,989 each option at a time starting with the registration function.