{"id":247698,"student_id":2589,"content":"#串列裡的字典\ndata = [\n { 'name': 'Chia', 'age': 18 },\n { 'name': 'Tony', 'age': 26 },\n { 'name': 'Debbie', 'age': 18 },\n { 'name': 'Poyi', 'age': 13 },\n { 'name': 'Vivian', 'age': 16 }\n]\n\ntotal = 0\nfor d in data:\n total += d['age']\n\navg = total / len(data) #計算平均年齡\nprint(avg)","created_at":"2021-04-29T09:08:57.877+08:00","updated_at":"2021-04-29T09:11:59.510+08:00","name":"考前筆記_範例","language":"python","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/247698/78c61e7f1ead7988a942b4dbd445e807.jpg"},"parent_id":247697,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":72,"hashid":"gk4sk5v3n","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦