import time
number = int(input("Enter a number : "))
def printer(number):
a = 0
while a <= number:
print("This works!!! \n Great!!!")
a += 1
if a == number/2:
check = int(input("Enter a prime number to stop this printing : "))
count = 2
x = 0
while count < check:
if check % count == 0:
x += 1
count += 1
if x == 0:
break
time.sleep(0.5)
printer(number)
此程序不会在第11行结束。我必须通过按Ctrl + C
手动停止它。我是Python的新手,请帮助我。