编写Python程序输出450到501中所有能被3整除但不能被5整除的数
for i in range(450, 502):
if i % 3 == 0 and i % 5 != 0:
print(i)
输出结果为:
453
456
459
462
468
471
474
477
483
486
489
492
498
501
原文地址: https://www.cveoy.top/t/topic/6wc 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
for i in range(450, 502):
if i % 3 == 0 and i % 5 != 0:
print(i)
输出结果为:
453
456
459
462
468
471
474
477
483
486
489
492
498
501
原文地址: https://www.cveoy.top/t/topic/6wc 著作权归作者所有。请勿转载和采集!