+ 1
Python function to check if a given number is a prime number. ( I NEED HELP)
def is_prime(number): aif number <= 1: return False for i in range(2, int(number**0.5) + 1):
4 Respostas
+ 1
remove the ( a ) before if and see the output
+ 7
Code With Nouman,
your code is incomplete, so please show the complete code.
> put your code in playground, save it there, create a link to the code and post this link here
+ 1
Remove the a before the if and the < before the =
+ 1
def is_prime(number):
if number<=1:
print ("false")
for i in range (2,int(number**0.5)+1):
print("true")
is_prime(5)
Output:-
True