資源簡介
python打印楊輝三角,默認在每行的首位各加一個0,則使算法更加簡單
代碼片段和文件信息
#?author:?my
#?date:?2019/11/27
#?楊輝三角
def?triangles(m):
????L?=?[1]
????n?=?0
????while?n?????????#?yield?L
??????
評論
共有 條評論
python打印楊輝三角,默認在每行的首位各加一個0,則使算法更加簡單
#?author:?my
#?date:?2019/11/27
#?楊輝三角
def?triangles(m):
????L?=?[1]
????n?=?0
????while?n?????????#?yield?L
??????
共有 條評論