00:01
Hello, welcome to this lesson.
00:02
In this lesson, we write a python function.
00:04
It's a vowel that takes a character that is a string of length one and returns true if the character is a vowel and false otherwise.
00:16
So let's define the function.
00:20
It's a vowel.
00:22
Now let's take a character c.
00:25
Alright, so i'm going to do ch which is the character that user has given to me.
00:37
I'm going to simply take the first.
00:42
So i'm doing a substring and i'm taking just the first item.
00:49
It can be just one but i'm making sure that user does not supply a string of length two or length three or any length that is greater than one.
01:07
Alright, so i'm taking the first item or the first character in a string.
01:13
Then i'm also going to define vowel, which will be a list of the vowels.
01:23
So i have a, i have e, i have i, i have o, and i have u.
01:43
So i'm simply going to return the character.
01:53
I'm going to let b be a lowercase so that i will not have to worry about case.
02:00
So i'm going to say if the character is a vowel.
02:05
Okay, so if it's in vowel or return true, if it's not, it'll return false.
02:11
Alright, so let's use the main method to test this.
02:25
So if name is equals to main, then i'm going to request for user inputs...