这个估计是里面第二简单的了,因为第一简单的是求ab 哈哈,一submit就ac了 题目如下: Description How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card lengt…
#_*_ codingutf-8
__author__ kysida
#定义函数
def leap_year(year):if year % 4 0:if (year / 100) % 4 0:return "the year is a leap year"return "the year is not a leap year"
#主程序
if __name__ __main__:year int(raw_input("Please …
引言
for i in [1,2,3,4,5,6]:print(i)这是一个非常简单的for in语句,什么样的对象可以被用来迭代呢?
容器、可迭代对象、迭代器
在Python中一切皆是对象,对象的抽象就是类,而对象的集合就是容器。
列表list:[0,1,2]ÿ…