{"id":235672,"student_id":1998,"content":"import game\nimport random\n\ngame.set_backdrop(\"bg.jpg\") #設定背景.backdrop('bg.jpg')\ngame.create_sound('bgm.mp3', True)\n\nanswer = random.randrange(1, 101)\nprint(answer)\n\nlow = 0\nhigh = 101\n\ndef loop():\n\n # game.draw_text(answer, 10, 10, 'white', 60)\n game.draw_text(low, 320, 680, 'black', 60)\n game.draw_text(high, 750, 680, 'black', 60)\n\ndef onclick():\n global low, high\n guess = int(input('1~100?'))\n if guess == answer:\n game.set_backdrop(\"bingo.jpg\")\n high = guess\n low = guess\n game.create_sound('bingo.mp3')\n if guess \u003e answer:\n game.set_backdrop(\"too_high.jpg\")\n high = guess \n game.create_sound('lol.mp3')\n if guess \u003c answer:\n game.set_backdrop(\"too_low.jpg\")\n low = guess\n game.create_sound('lol.mp3')\ngame.forever(loop)\ngame.on('click', onclick)","created_at":"2021-03-14T13:49:35.584+08:00","updated_at":"2021-05-03T21:48:01.244+08:00","name":"終極密碼(預設版) 副本","language":"python","screenshot":{"url":"https://cdn2.koding.school/uploads/project/screenshot/235672/403c31ceae5cb14da5a66ccdc5047a6c.jpg"},"parent_id":194468,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":36,"hashid":"vngsyngj6","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":4271000,"file_name":"bingo.mp3","project_id":235672,"asset_id":267825,"created_at":"2021-03-14T13:49:35.589+08:00","updated_at":"2021-03-14T13:49:35.589+08:00"},{"id":4271001,"file_name":"lol.mp3","project_id":235672,"asset_id":267826,"created_at":"2021-03-14T13:49:35.590+08:00","updated_at":"2021-03-14T13:49:35.590+08:00"},{"id":4271002,"file_name":"bgm.mp3","project_id":235672,"asset_id":267827,"created_at":"2021-03-14T13:49:35.591+08:00","updated_at":"2021-03-14T13:49:35.591+08:00"},{"id":4271003,"file_name":"bingo.jpg","project_id":235672,"asset_id":267828,"created_at":"2021-03-14T13:49:35.592+08:00","updated_at":"2021-03-14T13:49:35.592+08:00"},{"id":4271004,"file_name":"too_high.jpg","project_id":235672,"asset_id":267829,"created_at":"2021-03-14T13:49:35.593+08:00","updated_at":"2021-03-14T13:49:35.593+08:00"},{"id":4271005,"file_name":"too_low.jpg","project_id":235672,"asset_id":267830,"created_at":"2021-03-14T13:49:35.594+08:00","updated_at":"2021-03-14T13:49:35.594+08:00"},{"id":4271006,"file_name":"bg.jpg","project_id":235672,"asset_id":267831,"created_at":"2021-03-14T13:49:35.595+08:00","updated_at":"2021-03-14T13:49:35.595+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦