Python——for循環語句及練習

一.for語句 1.基本格式 for 變量 in 序列: 循環要執行的動作 range(stop): 0 - stop-1 range(start,stop): start - stop-1 range(start,stop,step): start - stop-1 step(步長) 示例: 2.練習 用戶輸入一個整型數,求該數的階乘 5 = 5 * 4 * 3 * 2 * 1 二.break和
相關文章
相關標籤/搜索