{"id":42189,"student_id":119,"content":"stopRendering();\nvar c = 0;\nvar d = 0;\npen.size = 0;\npen.fillColor = \"white\";\npen.drawRect(0, 0, 640, 480);\npen.fillColor = \"red\";\nforever(function() {\n for (var i = 0; i \u003c 1000; i++) {\n var a = Math.random()*480;\n var b = Math.random()*480;\n if (Math.sqrt((a-240)*(a-240)+(b-240)*(b-240))\u003c240) {\n pen.fillColor = \"orange\";\n c++;\n d++;\n }else{pen.fillColor = \"red\";\n c++;\n }\n pen.drawRect(a, b, 1, 1);\n }\npen.fillColor = \"white\";\npen.drawRect(0, 0, 220, 20);\nprint(\"PI:\"+d*4/c,0,0,\"black\",20);\n});","created_at":"2018-09-15T10:00:30.752+08:00","updated_at":"2019-10-28T07:50:59.400+08:00","name":"蒙地卡羅求 PI 副本","language":"javascript","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/42189/89edcce60b8890776f43b51e69f48ea4.jpg"},"parent_id":31606,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":68,"hashid":"zpes8epd","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦