Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Prime number finder and counter in range (ex: 0-100) using python
lower = int(raw_input('Enter the minimum number:')) print '\n' upper = int(raw_input('Enter the maximum number:')) print '\n' primenums = 0 for num in range(lower,upper + 1): # prime numbers are greater than 1 if num > 1: for i in range(2,num): if (num % i) == 0: break else: primenums += 1 print(num) print "\nFound", primenums, "prime numbers between", lower, "and", upper
run
|
edit
|
history
|
help
0
project euler 16
bacs_class
problem rstring
1 code
Python examples - SIMPLE
Code2
Python learning
Hi
Test
on_off