[nothing]
TOPIC | Press CTRL+V
def prime(max):
primes=[]
for i in range(2,max):
isprime=True
for j in range(2,i-1):
if float(i/j).is_integer():
isprime=False
if isprime == True:
primes.append(i)
print(primes)
print("Type a number in integer format, and this program will find prime numbers up to the number that you input.")
print("NOTE: Large numbers may take a while, depending on your computer's speed.")
while True:
num=int(input())
prime(num)
The formatting is wrong but if you fix that and chuck it into Python it should work
primes=[]
for i in range(2,max):
isprime=True
for j in range(2,i-1):
if float(i/j).is_integer():
isprime=False
if isprime == True:
primes.append(i)
print(primes)
print("Type a number in integer format, and this program will find prime numbers up to the number that you input.")
print("NOTE: Large numbers may take a while, depending on your computer's speed.")
while True:
num=int(input())
prime(num)
def prime(max):
primes=[]
for i in range(2,max):
isprime=True
for j in range(2,i-1):
if float(i/j).is_integer():
isprime=False
if isprime == True:
primes.append(i)
print(primes)
print("Type a number in integer format, and this program will find prime numbers up to the number that you input.")
print("NOTE: Large numbers may take a while, depending on your computer's speed.")
while True:
num=int(input())
prime(num)
The formatting is wrong but if you fix that and chuck it into Python it should work
primes=[]
for i in range(2,max):
isprime=True
for j in range(2,i-1):
if float(i/j).is_integer():
isprime=False
if isprime == True:
primes.append(i)
print(primes)
print("Type a number in integer format, and this program will find prime numbers up to the number that you input.")
print("NOTE: Large numbers may take a while, depending on your computer's speed.")
while True:
num=int(input())
prime(num)
Newmoon | She/her | FRT +17-19 (depending on daylight savings)
Fandergs | Wishlist
I made a cheap UMA! Click here to order it!
Fandergs | Wishlist
I made a cheap UMA! Click here to order it!
[url=https://www1.flightrising.com/dragon/47956990][img]https://www1.flightrising.com/rendern/350/479570/47956990_350.png[/img][/url]
---•----•----•----•----•----•----•----•---•----•--- ---•----•----•----•----•----•----•----•---•----•--- {100 Generations Challenge} Avatar Dragon | Random Dragon |
[url=https://www1.flightrising.com/dragon/91594050][img]https://www1.flightrising.com/rendern/350/915941/91594050_350.png[/img][/url]