{"id":440909,"student_id":26492,"content":"import game#載入遊戲套件\nimport random\ngame.set_backdrop('bg.jpg') #背景圖\n\nanswer = random.randrange(1,101)\nlow = 0 #下界\nhigh = 101 #上界\nprint(answer)\ndef loop():\n game.draw_text(answer, 10, 10, 'white', 60) #答案暫時印在左上測試\n game.draw_text(low, 320, 680, 'black', 60) #印出下界\n game.draw_text(high, 720, 680, 'black', 60) #印出上界\ndef onclick():\n global low, high\n guess = int(input('1-100?'))\n \n if guess == answer: \n game.set_backdrop('bingo.jpg')\n high = guess\n low = guess\n \n if guess \u003e answer:\n if guess \u003c high:\n game.set_backdrop('too_high.jpg')\n high = guess\n \n if guess \u003c answer:\n if guess \u003e low:\n game.set_backdrop('too_low.jpg')\n low = guess\n \ngame.forever(loop)\ngame.on('click', onclick)","created_at":"2022-09-28T19:03:12.560+08:00","updated_at":"2022-09-28T20:21:08.258+08:00","name":"終極密碼(預設版) 副本","language":"python","screenshot":{"url":"https://cdn7.koding.school/uploads/project/screenshot/440909/f4e6ab5b578c46fbd15390953d7f3cd6.jpg"},"parent_id":194468,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":6,"hashid":"wdks5pnk6","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":9944005,"file_name":"bingo.mp3","project_id":440909,"asset_id":267825,"created_at":"2022-09-28T19:03:12.565+08:00","updated_at":"2022-09-28T19:03:12.565+08:00"},{"id":9944006,"file_name":"lol.mp3","project_id":440909,"asset_id":267826,"created_at":"2022-09-28T19:03:12.567+08:00","updated_at":"2022-09-28T19:03:12.567+08:00"},{"id":9944007,"file_name":"bgm.mp3","project_id":440909,"asset_id":267827,"created_at":"2022-09-28T19:03:12.568+08:00","updated_at":"2022-09-28T19:03:12.568+08:00"},{"id":9944008,"file_name":"bingo.jpg","project_id":440909,"asset_id":267828,"created_at":"2022-09-28T19:03:12.569+08:00","updated_at":"2022-09-28T19:03:12.569+08:00"},{"id":9944009,"file_name":"too_high.jpg","project_id":440909,"asset_id":267829,"created_at":"2022-09-28T19:03:12.570+08:00","updated_at":"2022-09-28T19:03:12.570+08:00"},{"id":9944010,"file_name":"too_low.jpg","project_id":440909,"asset_id":267830,"created_at":"2022-09-28T19:03:12.571+08:00","updated_at":"2022-09-28T19:03:12.571+08:00"},{"id":9944011,"file_name":"bg.jpg","project_id":440909,"asset_id":267831,"created_at":"2022-09-28T19:03:12.572+08:00","updated_at":"2022-09-28T19:03:12.572+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦