{"id":85086,"student_id":37,"content":"stopRendering();\npen.size = 0;\n\npen.fillColor = \"#5500DD\";\npen.drawRect(0, 0, 640, 480);\nvar o = 0;\nvar e = 0;\nforever(function() {\n for (var i = 0; i \u003c 1000; i++) {\n\n var x = Math.random()*480;\n var y = Math.random()*480;\n var c = (240-x)*(240-x)+(240-y)*(240-y);\n c = Math.sqrt(c);\n\n\n if (c \u003c 240) {\n pen.fillColor = \"orange\";\n e++\n } else {\n pen.fillColor = \"red\";\n }\n o++\n pen.drawRect(x, y, 1, 1);\n\n }\n pen.fillColor = \"white\";\n pen.drawRect(0,0,200,35);\n print(\"PI:\"+e*4/o ,10,10);\n});","created_at":"2019-07-28T10:15:26.374+08:00","updated_at":"2019-11-11T13:13:58.208+08:00","name":"蒙地卡羅求 PI 副本","language":"javascript","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/85086/d9ca9f812f1bf16027ada4bb956b064d.jpg"},"parent_id":31606,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":49,"hashid":"wdks8wd2","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
到這台電腦