Wed Mar 13 2024 09:31:19 GMT+0000 (Coordinated Universal Time)
Saved by @pvignesh
n=int(input("enter max range")) num=1 while(num<=n): count=0 i=2 while(i<=num/2): if (num%i==0): count=count+1 break i=i+1 if(count==0&num!=1): print(num) num=num+1
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments