{"id":151917,"student_id":10,"content":"#1 - 印出 0-9\nprint('印出 0-9')\ni = 0\nwhile i \u003c 10:\n print(i)\n i += 1\n\n\n#2 - 印出 0-100 之間的偶數\nprint('印出 0-100 之間的偶數')\ni = 0\nwhile i \u003c= 100:\n print(i)\n i += 2\n\n#3 - 倒過來印出 100 - 50 之間的偶數\nprint('倒過來印出 100 - 50 之間的偶數')\ni = 100\nwhile i \u003e= 50:\n if i %2 == 0: print(i)\n i -= 1\n \n#4 - for 迴圈改寫\nprint('for 迴圈改寫')\nfor i in range(10):\n print(i)\n \n \n#5 - 遍尋陣列\nprint('遍尋陣列')\narr = [80, 60, 30, 70, 30]\nfor i in arr:\n print(i)\n\n# 同上計算平均成績\nprint('同上計算平均成績')\ntotal = 0\nfor i in arr:\n total += i\n\navg = total/len(arr)\n\nprint('平均' + str(avg) + '分')\n\n\n","created_at":"2020-05-25T11:37:13.292+08:00","updated_at":"2020-05-25T11:43:34.586+08:00","name":"印數列","language":"python","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/151917/78c61e7f1ead7988a942b4dbd445e807.jpg"},"parent_id":4,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":248,"hashid":"npmsnky4","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦