{"id":162815,"student_id":2589,"content":"import game\n\ngame.set_backdrop(\"輸入.png\")\n\ndef is_triangle():\n a = input(\"邊長a: \")\n b = input(\"邊長b: \")\n c = input(\"邊長c: \")\n\n a = int(a)\n b = int(b)\n c = int(c)\n\n if a+b\u003ec and b+c\u003ea and a+c\u003eb:\n \n s = (a+b+c)/2\n A = (s*(s-a)*(s-b)*(s-c))**(1/2)\n print(A)\n \n if a==b and b==c:\n game.set_backdrop(\"正三角形.png\")\n elif a==b or b==c or a==c:\n setBackdrop(\"等腰三角形.png\")\n elif (a**2)+(b**2) == c**2 or (a**2)+(c**2) == b**2 or (b**2)+(c**2) == a**2:\n game.set_backdrop(\"直角三角形.png\")\n else:\n game.set_backdrop(\"三角形.png\")\n \n else:\n game.set_backdrop(\"不是三角形.png\")\n\ngame.on('click', is_triangle)\n\n","created_at":"2020-07-06T00:29:14.334+08:00","updated_at":"2020-07-12T17:34:08.059+08:00","name":"這不是三角形_T ","language":"python","screenshot":{"url":null},"parent_id":159891,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":114,"hashid":"2pdsnepr","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2832364,"file_name":"輸入.png","project_id":162815,"asset_id":233915,"created_at":"2020-07-06T00:29:14.339+08:00","updated_at":"2020-07-06T00:29:14.339+08:00"},{"id":2832365,"file_name":"等腰三角形.png","project_id":162815,"asset_id":233914,"created_at":"2020-07-06T00:29:14.341+08:00","updated_at":"2020-07-06T00:29:14.341+08:00"},{"id":2832366,"file_name":"直角三角形.png","project_id":162815,"asset_id":233913,"created_at":"2020-07-06T00:29:14.342+08:00","updated_at":"2020-07-06T00:29:14.342+08:00"},{"id":2832367,"file_name":"正三角形.png","project_id":162815,"asset_id":233912,"created_at":"2020-07-06T00:29:14.343+08:00","updated_at":"2020-07-06T00:29:14.343+08:00"},{"id":2832368,"file_name":"不是三角形.png","project_id":162815,"asset_id":233911,"created_at":"2020-07-06T00:29:14.344+08:00","updated_at":"2020-07-06T00:29:14.344+08:00"},{"id":2832369,"file_name":"三角形.png","project_id":162815,"asset_id":233910,"created_at":"2020-07-06T00:29:14.345+08:00","updated_at":"2020-07-06T00:29:14.345+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦