I have written a code(in python) that produces a number and checks if the number is prime or not, if it is a prime it will print it. But my code keeps producing numbers and printing them, can you give feedback on what is wrong in my approach?
val = 10
for i in range (2, (val+1)//2):
while (val+1) % i != 0 :
print(val + 1)
val = val *10
I want to check if any number ( that is multiple of ten added by one) is considered a prime number or not.