## Blog Pages

### Python program to find prime numbers in a range and time taken to calculate

import time
lo = int(input("Enter lower range: "))
up = int(input("Enter upper range: "))
print("Prime numbers between",lo,"&",up,"are:\t")
start_time=time.time()
for n in range(lo,up + 1):
if n > 1:
for i in range(2,n):
if (n % i) == 0:
break
else:
print("\t\t\t",n)
elapsed_time = time.time() - start_time
print ("Time taken to calculate:",elapsed_time)
{"ft_lang_label":"__label__en","ft_lang_prob":0.5448217,"math_prob":0.9993836,"size":383,"snap":"2019-35-2019-39","text_gpt3_token_len":117,"char_repetition_ratio":0.11081794,"word_repetition_ratio":0.0,"special_character_ratio":0.3550914,"punctuation_ratio":0.22988506,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99262065,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-08-23T02:35:08Z\",\"WARC-Record-ID\":\"<urn:uuid:044e170d-88d1-4c55-bbba-214337014d09>\",\"Content-Length\":\"66547\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:100c9cd4-d96c-4648-8c93-bad4dea8268d>\",\"WARC-Concurrent-To\":\"<urn:uuid:2dc98eb5-fdbd-43b8-a438-3e63740d9533>\",\"WARC-IP-Address\":\"172.217.12.225\",\"WARC-Target-URI\":\"https://pythonforengineers.blogspot.com/2018/10/program-to-find-prime-numbers-in-range.html\",\"WARC-Payload-Digest\":\"sha1:65J4WQTZGZSJC65JNN4SZPKMBQTD5O76\",\"WARC-Block-Digest\":\"sha1:4ROIG4M35ZLLILBY3OJ3M24FXNI7HULV\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-35/CC-MAIN-2019-35_segments_1566027317817.76_warc_CC-MAIN-20190823020039-20190823042039-00065.warc.gz\"}"}