{"id":169064,"student_id":3232,"content":"import random\nimport game\nimport time\nenter = game.create_sprite(\"start.png\", \"stop.png\") #創造角色\nt = str(random.randint(10, 30))\ngame_start = False\nA = 0\nt_s = 0\nn = 0\ndef a():\n global game_start, A, t_s, n\n game.draw_text(\"Target: \" + t + \"s\", 380, 200, \"black\", 90)\n if key.enter and game_start == False and A == 0:\n enter.costume_id = 1\n t_s = time.time()\n game_start = True\n if game_start == True:\n n = time.time()\n if n - t_s \u003e 7:\n game.draw_text(\"??.?? s\", 380, 700, \"black\", 90)\n else:\n r = n-t_s\n r = round(r, 2)\n game.draw_text(str(r) + \" s\", 500, 700, \"black\", 90)\n if key.space and game_start == True:\n n = time.time()\n game_start = False\n A = 1\n if A == 1:\n b = n - t_s\n b = round(b, 2)\n game.draw_text(\"Time: \" + str(b) + \" s\", 380, 700, \"black\", 90)\n \ngame.forever(a) #重複不斷執行","created_at":"2020-07-21T16:39:24.192+08:00","updated_at":"2020-07-21T17:22:21.309+08:00","name":"人體計時器_T 副本","language":"python","screenshot":{"url":"https://cdn0.koding.school/uploads/project/screenshot/169064/466e035c58c3f3223165ab96c251fef1.jpg"},"parent_id":162868,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":43,"hashid":"4y3sn9wy","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2924176,"file_name":"start.png","project_id":169064,"asset_id":233822,"created_at":"2020-07-21T16:39:24.197+08:00","updated_at":"2020-07-21T16:39:24.197+08:00"},{"id":2924177,"file_name":"stop.png","project_id":169064,"asset_id":233823,"created_at":"2020-07-21T16:39:24.198+08:00","updated_at":"2020-07-21T16:39:24.198+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦