So I'm new to python coming from a java background and it's hard for me to get use to python's syntax and scoping and loops etc. This was a question my instructor asked and I'm lost to what I'm doing wrong
Q. write a function or just use some if-else statement to figure out how many prime numbers are there between 100 and 200
def isPrime(num):
if num > 1:
for i in range(2, num):
if(num % i) == 0:
return True
def primeNumbers():
count = 0
for num in range(100, 200):
prime = isPrime(num)
if prime == True:
count += 1
print(count)
primeNumbers()