{"id":168555,"student_id":139,"content":"\nimport random\nimport game\nup_bound = 100\nlow_bound = 0\n# int = 整數!!!\n\ngame.setBackdrop(\"start.png\")\nanswer = random.randint(0,100)\ndef onclick():\n global up_bound, low_bound, answer\n value = int(input('GUESS A NUMBER!!'))\n if value \u003c low_bound or value \u003e up_bound:\n game.drawText('wtf are u doing', 500, 10, 'red', 50)\n stop()\n if(value \u003e answer):\n up_bound = value\n game.setBackdrop('big.png')\n elif(value \u003c answer):\n low_bound = value\n game.setBackdrop('small.png')\n else:\n up_bound = value\n low_bound = value\n game.setBackdrop('bingo.png')\n stop()\n \n # print('')\n # print('ans:', answer, ';input', value)\n # print(low_bound, '~', up_bound)\n \n \ndef loop():\n game.drawText(low_bound, 500, 770, 'red', 90)\n game.drawText('~', 600, 770, 'green', 90)\n game.drawText(up_bound, 700, 770, 'blue', 90)\ngame.forever(loop)\ngame.on(\"click\", onclick)","created_at":"2020-07-20T13:05:15.439+08:00","updated_at":"2020-07-20T14:36:25.771+08:00","name":"終極密碼_S 副本","language":"python","screenshot":{"url":"https://cdn4.koding.school/uploads/project/screenshot/168555/78c61e7f1ead7988a942b4dbd445e807.jpg"},"parent_id":162825,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":81,"hashid":"2pdskppw","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2920097,"file_name":"start.png","project_id":168555,"asset_id":231968,"created_at":"2020-07-20T13:05:15.444+08:00","updated_at":"2020-07-20T13:05:15.444+08:00"},{"id":2920098,"file_name":"small.png","project_id":168555,"asset_id":231967,"created_at":"2020-07-20T13:05:15.446+08:00","updated_at":"2020-07-20T13:05:15.446+08:00"},{"id":2920099,"file_name":"bingo.png","project_id":168555,"asset_id":231966,"created_at":"2020-07-20T13:05:15.447+08:00","updated_at":"2020-07-20T13:05:15.447+08:00"},{"id":2920100,"file_name":"big.png","project_id":168555,"asset_id":231965,"created_at":"2020-07-20T13:05:15.448+08:00","updated_at":"2020-07-20T13:05:15.448+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
繁中
简中
English
日本語
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦