{"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":"/uploads/project/screenshot/151917/78c61e7f1ead7988a942b4dbd445e807.jpg"},"parent_id":4,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":412,"hashid":"npmsnky4","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[]
Orange Apple Learning Platform
My Projects
View Project Page
Export
Remix
Import
Delete
Screenshot
繁中
简中
English
日本語
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer