{"id":133523,"student_id":1998,"content":"Game.set({\n autoRendering: false\n});\npen.size = 0;\npen.fillColor = 'white'\npen.drawRect (0, 0, 640, 480)\nvar insideCircle = 0;\nvar total = 0\nforever(function() {\n for (var i = 0; i \u003c 1000; i++) {\n pen.fillColor = 'yellow'\n var x = Math.random() * 480;\n var y = Math.random() * 480;\n var a = x - 240;\n var b = y - 240;\n var c = Math.sqrt(a*a+b*b);\n if (c \u003c= 240) {\n pen.fillColor = 'yellow';\n insideCircle++\n } else {\n pen.fillColor = 'blue';\n }\n\n pen.drawRect(x, y, 1, 1);\n total ++\n\n }\n pen.fillColor = 'white';\n pen.drawRect(0, 0, 200, 30);\n pi = insideCircle * 4 / total;\n print(pi, 5, 10, \"black\", 20)\n\n\n})","created_at":"2020-03-14T16:13:45.941+08:00","updated_at":"2020-03-14T20:56:43.401+08:00","name":"蒙地卡羅求 PI 副本 副本","language":"javascript","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/133523/dedddd9d00edb04a9565044e1e0f8236.jpg"},"parent_id":122131,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":58,"hashid":"rdvsyg23","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
到這台電腦