1,求100到200内的素数
list = []
for a in range(100,200)
k=0
for i in range(2,a)
if a%i==0:
list.append(a)
print(list)
- def fun():
- year = int(input("输入一个年份:"))
- if (year%400 == 0) or (year%4==0 and year%100 != 0):
- print("您输入的年份[%d]是润年"%year)
- else:
- print("您输入的年份[%d]不是润年"%year)
- fun()
原文地址:https://www.cnblogs.com/xubing111/p/8965266.html
时间: 2024-10-27 08:07:42