Hey guys, welcome to Day 8 of a 100 Days of Code.
And today we're going to be looking at functions that allow you to give them
inputs. And once we've learned all of that and we've grasped it,
then we're going to be building a cipher program.
And the cipher program is called Caesar cipher.
So Caesar cipher is a really quite ancient type of encryption.
So the story goes that, um,
when Caesar wanted to send highly sensitive military messages,
he would encode his message so that each letter would be shifted by a
predetermined amount.
So let's say that we wanted to encode the letter "A" and we shift it by three,
well
then A becomes D, B becomes E and so on and so forth.
And this is what the final version will look like.
Let's go ahead and encode something.
So I'm going to type encode to start encrypting a message.
And then I'm going to type my message with no spaces in between.
And then I'm going to give it a shift number.
So this is going to be a number that
the recipient and I are going to agree on so that we know how to decode the
message. Let's put that at nine.
And then it's going to give us the encoded results
which is something like this.
And this will be the message that I'm going to transmit to my friend,
either through a letter or through an email
and it means that whenever somebody comes across this message
they won't really know what's going on unless they knew the shift number.
So let's say that I am my friend. I've just received this message.
And I'm going to go ahead and type yes to go again
and in this case, I'm going to decode instead of encoding.
And then I'm going to paste the message and hit enter.
And of course, the shift number is nine and now I have the decoded results
which I can read and understand. By the end of today,
you would have learned about functions with input,
you'll know what the difference is between arguments and parameters.
Once you're ready, once you're loaded up on coffee,
then head over to the next lesson and let's get started.