I am new to the programming world. I was just writing this code in python to generate N prime numbers. User should input the value for N which is the total number of prime n
You don't need to declare that many variables, see the below code is simple and easy to understand.
for num in range(1,50): for i in range(2,num): if num%i == 0: break else: print(num,'is a prime')
First 50 prime numbers output