项目场景:
最近在学习python,长时间看书和看教学视频容易厌倦,分享给大家一个网站菜鸟教程 python 100例,里面有一百道python小练习,学习起来非常有趣 https://www.runoob.com/python/python-100-examples.html问题描述:
遇到以下这个小例题,发现提供得程序有个小bug,所以尝试进行bug修改
题目:输入某年某月某日,判断这一天是这一年的第几天?
#!/usr/bin/python3
year = int(input('year:\n'))
month = int(input('month:\n'))
day = int(input('day:\n'))
months = (0,31,59,90,120,151,181,212