num = int(input('请输入一个数')) for i in range(2, num): if num % i == 0: print('这不是一个质数') break else: print('这是一个质数')