Skip to content

Commit 94a9cf2

Browse files
committed
is_prime.py was added
1 parent 215ed06 commit 94a9cf2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

is_prime.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def is_prime(num: int) -> bool:
2+
'''this function returns True if there is a prime number, else returns False'''
3+
for i in range(2, int(num**0.5)+1):
4+
if num%i==0:
5+
return False
6+
return True

0 commit comments

Comments
 (0)