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
Lambda
Gettinginput from users
Python examples - SIMPLE
irctcbot
Problem: fb_series
my first code
codeacademy python tasks
trial
two sum
gameboy