{"id":238247,"student_id":10,"content":"from random import random\n\nsetBackdrop(\"black\") #設定背景圖\nkoding = createSprite('koding.png') #創造叩叮\nballs = [] #存放雪球的串列\nkoding.y = 600\n\n# 創造 1000 個雪球\nfor i in range(1000):\n b = createSprite('ball.png')\n b.x = random() * 1200\n b.y = random() * 900\n b.opacity = random()\n b.scale = random()\n balls.append(b)\n\ndef gameloop ():\n\n for b in balls:\n b.x += 2\n b.y += 3\n if b.y \u003e 900:\n b.y = 0\n if b.x \u003e 1200:\n b.x = 0\n\n\nforever(gameloop) #重複不斷執行遊戲迴圈","created_at":"2021-03-26T09:43:22.792+08:00","updated_at":"2021-03-26T12:05:59.497+08:00","name":"下雪","language":"python","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/238247/1cabd00f86d724c802a3da60f87ca568.jpg"},"parent_id":4,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":202,"hashid":"882sqjre4","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":4349330,"file_name":"koding.png","project_id":238247,"asset_id":330400,"created_at":"2021-03-26T09:45:01.350+08:00","updated_at":"2021-03-26T09:45:01.350+08:00"},{"id":4349328,"file_name":"ball.png","project_id":238247,"asset_id":330401,"created_at":"2021-03-26T09:44:36.707+08:00","updated_at":"2021-03-26T09:44:36.707+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦