def is_prime(number):
if number < 2:
return False
for i in range(2, int(number ** 0.5) + 1):
if number % i == 0:
return False
return True
def Sum_of_Primes(m, n):
prime_sum = 0
for number in range(m, n + 1):
if is_prime(number):
prime_sum += number
return prime_sum
# Define your range m to n
m = 10
n = 40
result = Sum_of_Primes(m, n)
print(f"The sum of prime numbers from {m} to {n} is: {result}")