Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability. Use the python tag for all Python related questions. If you believe your question may be even more specific, you can include a version specific tag such as python-3.x.
0
votes
2
answers
215
views
My prime sieve using Python
print("Welcome to the Sieve of Eratosthenes, where you can generate prime numbers from 1 to n : ")
n = int(input("Enter your n : "))
y = [y for y in range(1,n) if y*y < n]
primes = [p for p in rang …
4
votes
4
answers
215
views
My prime number generation program in Python
So I did my own take (I wrote my own algorithm) for generating prime numbers from 1 to 1000.
lst = [y for y in range(1000)]
for i in range(0,len(lst)): #i = 1 and i is traversal
print("iterate …