count = 99
for n in range(1, 100):
if n % 7 == 0 or str(n).endswith("7"):
continue
count = count - 1
print("计算员工一共拍腿{}次".format(count))
#第二种方法
count = 0
for n in range(1, 100):
if n % 7 == 0 or str(n).endswith("7"):
count = count + 1
print("计算员工一共拍腿{}次".format(count))
编写程序-用continue和不用continue的区别
猜你喜欢
转载自blog.csdn.net/m0_62491934/article/details/121256587
今日推荐
周排行