00:01
Okay, so this question says, oh, there's a lot of examples.
00:07
It says, write a python program that asks the user for one number and tells if it is prime number or not.
00:20
The input number has to be an integer, prime number.
00:22
If a number has only two divisors, then it is prime.
00:25
If it is divisible by more numbers, then it is not prime.
00:29
Hint, use the divisor count from task 16.
00:34
So i obviously have no idea what that is because i'm, this is my first time seeing this question.
00:42
So i'm not going to use that.
00:44
I'm going to do it sort of my own way.
00:53
Okay, so let's do it.
00:54
Let's define a function called prime count, or let's call it divisor count.
01:00
I'm going to make my own.
01:01
I'm going to take n.
01:03
And so what i'm going to do is it's going to say, or i in range n.
01:12
If, and i'm going to say count zero, if and modulo i is equal to zero, and count plus equals one.
01:29
So this should say, in order to return count.
01:33
So this should return number of ways to divide a number, if i've done this correctly.
01:40
So let's try it.
01:41
Let's call divisor count.
01:46
Let's try it on number two.
01:51
Okay, so obviously this should go from 1 to n.
01:57
So there is 1 divisor, which is 1.
02:01
And so this should go from n to n plus 1, because we actually also want to include the number itself...