python中“end=”用法:例如print(“#”,end=" \n"),默认换行,print(“#”,end=" ")则在循环中不换行
day = 0
month = input(“请输入月份值:”)
if (month == 1,3,5,7,8,10,12):
day = 31
print(month,“月有31天”)
elif (month == 4,6,9,11):
day = 30
print(month,“月有30天”)
else:
day = 28
print(“2月有28天”)
value = 1
while value <= day:
# 重复执行的内容:打印当前遍历到的天数值
print(value, end=" ")
# 循环变量的更改:
value += 1