文章目录 一、Data structure: vectors二、Indexing vectors三、Re-assign values to vector elements四、Generic function for vectors五、Vector of random samples from a distribution六、Vector arithmetic七、Recycling八、Element-wise comparisons of vectors九、Comp…
year eval(input(请输入一个四位年份:))
if (year%40 and year%100!0) or year%4000:print(year,年是闰年)
else:print(year,年是平年)在这段代码中,我们实现了一个简单的年份判断程序,用于确定用户输入的四位年份是否为闰年。下面将详细解释…