#EMRE ALPOGUNC PI WORKS ALGORITHM SOLUTION #I tried to keep time complexity as low as possible. #Settting our interval maxi = 599#Maximum value mini = 500#Minimum value count=0#Counter for the total amount of numbers #For loop with range from lowest value to highest. # We add 1 to maxi/highest value since range(a,b) # method given that a is the min value and b is the maximum value #takes the integers between a to b-1. for i in range(mini, maxi+1): if i>1:#Prime number must be bigger than 1 for j in range(2,i):#if it divides with 2 or any value before the j value if(i%j)==0: break#Don't include else: count+=1#Increase the counter by 1 print("Result number",str(count),":",str(i))#Otherwise it's a prime number and print. print("There are",str(count),"prime numbers between", str(mini),"and",str(maxi))#Print the total number of prime numbers