python_exercises/thinkcspy/Chapter-8-Exercises/Problem3.py

13 lines
216 B
Python
Raw Permalink Normal View History

2023-09-29 12:39:26 -06:00
# Runestone.Academy thinkcspy course
# Chapter 8
# Problem 3
def is_prime(n):
2023-10-15 18:11:45 -06:00
# your code
for i in range (2, n):
if n % i == 0:
return False
return True
2023-09-29 12:39:26 -06:00
2023-10-15 18:11:45 -06:00
print(is_prime(25))