{"id":168585,"student_id":3232,"content":"import random\nimport game\nlow_bound = 0\nup_bound = 100\ngame.set_backdrop(\"start.png\") \nans = random.randint(low_bound, up_bound)\n\ndef onclick():\n global low_bound, up_bound\n \n guess = int(input(\"輸入數值\" + str(low_bound) + \"-\" + str(up_bound)))\n \n if guess \u003c= up_bound and guess \u003e= low_bound:\n if guess \u003e ans:\n game.set_backdrop(\"big.png\")\n up_bound = guess\n \n if guess \u003c ans:\n game.set_backdrop(\"small.png\")\n low_bound = guess\n if guess == ans:\n game.set_backdrop(\"bingo.png\")\n up_bound = guess\n low_bound = guess\n \ndef loop():\n game.draw_text(str(low_bound) + \"-\" + str(up_bound), 550, 750, \"black\", 70)\n\ngame.on(\"click\", onclick) \ngame.forever(loop)\n","created_at":"2020-07-20T13:18:25.324+08:00","updated_at":"2020-07-20T15:25:16.338+08:00","name":"終極密碼_S 副本","language":"python","screenshot":{"url":"https://cdn5.koding.school/uploads/project/screenshot/168585/7cdc24426bd918b132436b75d0ece56b.jpg"},"parent_id":162825,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":44,"hashid":"6rpsprdp","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2920209,"file_name":"start.png","project_id":168585,"asset_id":231968,"created_at":"2020-07-20T13:18:25.331+08:00","updated_at":"2020-07-20T13:18:25.331+08:00"},{"id":2920210,"file_name":"small.png","project_id":168585,"asset_id":231967,"created_at":"2020-07-20T13:18:25.332+08:00","updated_at":"2020-07-20T13:18:25.332+08:00"},{"id":2920211,"file_name":"bingo.png","project_id":168585,"asset_id":231966,"created_at":"2020-07-20T13:18:25.334+08:00","updated_at":"2020-07-20T13:18:25.334+08:00"},{"id":2920212,"file_name":"big.png","project_id":168585,"asset_id":231965,"created_at":"2020-07-20T13:18:25.335+08:00","updated_at":"2020-07-20T13:18:25.335+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦