看你的代码, print 应该和第一个for 对齐。
你目前是是 非7 的次数才输出
与第二个if平齐的话 , 是输出99次。
当条件满足else的时候,就会进行输出,而且不会输出99次。
table=99
for number in range(1,100):
if number%7==0:
continue
else:
string=str(number)
if string.endswith("7"):
continue
table-=1
print("从一到99共拍桌:",table,"次")