{"id":1023859,"student_id":2589,"content":"from time import time\nfrom game import (\n create_sprite,\n create_sound,\n draw_text,\n forever,\n stop,\n)\n\nroad = create_sprite('road.png')\ncheck1 = create_sprite('check.png')\ncheck2 = create_sprite('check.png')\nborder = create_sprite('border.png')\ncar = create_sprite('car.png')\ndashboard = create_sprite('dashboard.png')\nresult_board = create_sprite('result.png')\n\nroad.rotation_style = 'fixed'\ncheck1.rotation_style = 'fixed'\ncheck2.rotation_style = 'fixed'\nborder.rotation_style = 'fixed'\n\nresult_board.hidden = True\n\ncheck1.move_to(600, 400)\ncheck2.move_to(600, -1750)\n\nstart_time = time()\nspeed = 5\nturns = 1\ntimer = 0\nt1 = 0\nt2 = 0\nt3 = 0\nis_checked = False\n\n\n\ndef loop():\n global speed, start_time, turns, is_checked, timer, t1, t2, t3\n\n if key.left == True:\n car.direction = car.direction - 3\n\n if key.right == True:\n car.direction = car.direction + 3\n\n border.direction = car.direction + 180\n border.step_forward(speed)\n road.direction = car.direction + 180\n road.step_forward(speed)\n check1.direction = car.direction + 180\n check1.step_forward(speed)\n check2.direction = car.direction + 180\n check2.step_forward(speed)\n\n if car.touched(check1) == True and is_checked == True:\n turns = turns + 1\n is_checked = False\n\n if car.touched(check2) == True:\n is_checked = True\n \n if turns == 4:\n result_board.hidden = False\n stop()\n\n timer = time() - start_time\n\n draw_text(str(turns) + '/3', 350, 80, 'black', 40)\n draw_text(str(round(timer, 3)) + 's', 1000, 80, 'white', 40)\n\n\nforever(loop)\n","created_at":"2025-05-29T12:16:46.134+08:00","updated_at":"2025-05-29T12:17:37.142+08:00","name":"9_A_C_瘋狂賽車_正課_【講解】計算秒數 副本","language":"python","screenshot":{"url":null},"parent_id":1011950,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":59,"hashid":"rdvs33jyd","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":38686594,"file_name":"road.png","project_id":1023859,"asset_id":251810,"created_at":"2025-05-29T12:16:46.138+08:00","updated_at":"2025-05-29T12:16:46.138+08:00"},{"id":38686595,"file_name":"result.png","project_id":1023859,"asset_id":251811,"created_at":"2025-05-29T12:16:46.140+08:00","updated_at":"2025-05-29T12:16:46.140+08:00"},{"id":38686596,"file_name":"engine.mp3","project_id":1023859,"asset_id":251812,"created_at":"2025-05-29T12:16:46.140+08:00","updated_at":"2025-05-29T12:16:46.140+08:00"},{"id":38686597,"file_name":"dashboard.png","project_id":1023859,"asset_id":251813,"created_at":"2025-05-29T12:16:46.141+08:00","updated_at":"2025-05-29T12:16:46.141+08:00"},{"id":38686598,"file_name":"check.png","project_id":1023859,"asset_id":251814,"created_at":"2025-05-29T12:16:46.142+08:00","updated_at":"2025-05-29T12:16:46.142+08:00"},{"id":38686599,"file_name":"car.png","project_id":1023859,"asset_id":251815,"created_at":"2025-05-29T12:16:46.143+08:00","updated_at":"2025-05-29T12:16:46.143+08:00"},{"id":38686600,"file_name":"border.png","project_id":1023859,"asset_id":251816,"created_at":"2025-05-29T12:16:46.144+08:00","updated_at":"2025-05-29T12:16:46.144+08:00"},{"id":38686601,"file_name":"bgm.mp3","project_id":1023859,"asset_id":251817,"created_at":"2025-05-29T12:16:46.145+08:00","updated_at":"2025-05-29T12:16:46.145+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
繁中
简中
English
日本語
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦