WEBVTT

0
00:00.560 --> 00:01.340
Hey, guys.

1
00:01.340 --> 00:05.660
Welcome to Day 8 of 100 Days of Code.

2
00:05.660 --> 00:11.300
And today we're going to be looking at functions that allow you to give them inputs.

3
00:11.630 --> 00:18.620
And once we've learned all of that and we've grasped it, then we're going to be building a cipher program.

4
00:18.620 --> 00:21.830
And the cypher program is called Caesar Cipher.

5
00:21.830 --> 00:27.320
So Caesar cipher is a really quite ancient type of encryption.

6
00:27.320 --> 00:35.440
So the story goes that when Caesar wanted to send highly sensitive military messages, he would

7
00:35.440 --> 00:41.500
encode his message so that each letter would be shifted by a predetermined amount.

8
00:41.500 --> 00:47.590
So let's say that we wanted to encode the letter A and we shift it by three.

9
00:47.590 --> 00:53.110
Well then A becomes D, B becomes E, and so on and so forth.

10
00:53.920 --> 00:56.910
And this is what the final version will look like.

11
00:56.910 --> 00:59.430
Let's go ahead and encode something.

12
00:59.430 --> 01:03.450
So I'm going to type encode to start encrypting a message,

13
01:03.450 --> 01:07.440
and then I'm going to type my message with no spaces in between.

14
01:08.190 --> 01:10.620
And then I'm going to give it a shift number.

15
01:10.620 --> 01:14.250
So this is going to be a number that the recipient and I are going to agree on

16
01:14.250 --> 01:16.290
so that we know how to decode the message.

17
01:16.290 --> 01:18.180
Let's put that at 9.

18
01:18.180 --> 01:23.190
And then it's going to give us the encoded results which is something like this.

19
01:23.190 --> 01:28.110
And this will be the message that I'm going to transmit to my friend, either through a letter or through

20
01:28.110 --> 01:28.860
an email.

21
01:28.860 --> 01:33.180
And it means that whenever somebody comes across this message, they won't really know what's going

22
01:33.180 --> 01:35.580
on unless they knew the shift number.

23
01:35.580 --> 01:37.980
So let's say that I am my friend.

24
01:37.980 --> 01:45.300
I've just received this message, and I'm going to go ahead and type 'yes' to go again,

25
01:45.300 --> 01:48.710
and in this case I'm going to decode instead of encoding.

26
01:48.710 --> 01:52.190
And then I'm going to type out the message from previous and hit Enter.

27
01:52.190 --> 01:54.980
And of course the shift number is 9,

28
01:54.980 --> 01:59.240
and now I have the decoded result which I can read and understand.

29
02:00.560 --> 02:04.100
By the end of today, you would have learned about functions with inputs,

30
02:04.100 --> 02:09.440
you'll know what the difference is between arguments and parameters. Once you're ready,

31
02:09.440 --> 02:14.150
once you're loaded up on coffee, then head over to the next lesson, and let's get started.