@Utkarsh If I understand it correctly, if you have a given is_prime() function, you can give it any argument, let's say:
is_prime(int(input())) # checks a user-input number
is_prime(int(math.sqrt(625)) # checks the result
But if we give 1 as input it displays True, which is wrong.
How can we avoid providing non positive or 1 as the input to the function and still use it to serve our purpose, again in a shortest way
thanks everyone for your posts👍
@the coding sloth
i still have this doubt.
we all can understand which numbers are prime or composite or neither prime nor composite.
but this won't be the case if the function is taking input from output of other function or from the results of some code.
Then what could be a possible solution for it?