python使用while循环,输出1-100的奇数和偶数
a=1
while a<=100:
if a%2==0:
print("偶数:",a)
else:
print("奇数:",a)
a+=1
a=1
while a<=100:
if a%2==0:
print("偶数:",a)
else:
print("奇数:",a)
a+=1