{"id":890697,"student_id":1443,"content":"from game import *\n\nbg = create_sprite('bg.png') #背景\nrabbit = create_sprite('rabbit.png') #兔子\nturtle = create_sprite('turtle.png') #烏龜\n\ndef loop():\n # 烏龜或兔子超過範圍就和背景一起向左捲動\n if turtle.x \u003e 650 or rabbit.x \u003e 650:\n turtle.x -= 10\n rabbit.x -= 10\n bg.x -= 10\n if bg.x \u003c 0: bg.x += 2400 #重置背景\n \n #draw_text('實況播報文字', 30, 30, 'black', 40)\n if turtle.x \u003e rabbit.x:\n draw_text('烏龜超前!', 30, 30, 'black', 40)\n if turtle.x \u003c rabbit.x:\n draw_text('兔子超前!', 30, 30, 'black', 40)\n if turtle.x == rabbit.x:\n draw_text('雙方勢均力敵!', 30, 30, 'black', 40)\n\ndef turtle_move():\n turtle.x += 50\n \ndef rabbit_move():\n rabbit.x += 50\n\non('keydown', 'space', turtle_move) #空白鍵烏龜向右移動\non('keydown', 'enter', rabbit_move) #enter 鍵兔子向右移動\nforever(loop)","created_at":"2024-11-22T23:41:28.337+08:00","updated_at":"2024-11-22T23:45:13.552+08:00","name":"5_延伸_龜兔賽跑_預設版 副本","language":"python","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/890697/2326431eacf87c701f933a026f3cef7e.jpg"},"parent_id":829996,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":49,"hashid":"6rpsr6qgq","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":34622333,"file_name":"rabbit.png","project_id":890697,"asset_id":771779,"created_at":"2024-11-22T23:41:28.343+08:00","updated_at":"2024-11-22T23:41:28.343+08:00"},{"id":34622334,"file_name":"turtle.png","project_id":890697,"asset_id":771780,"created_at":"2024-11-22T23:41:28.344+08:00","updated_at":"2024-11-22T23:41:28.344+08:00"},{"id":34622335,"file_name":"bg.png","project_id":890697,"asset_id":771781,"created_at":"2024-11-22T23:41:28.345+08:00","updated_at":"2024-11-22T23:41:28.345+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
繁中
简中
English
日本語
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦