← Projects

Find PI to the Nth Digit

52a11ea56f2417bf9deeb3dfef8ebe46a6883f2d · Karan Goel · Jul 4, 2013 20:40

+7 · 1 file changed

  • Numbers/pi.py +7 −0
diff --git a/Numbers/pi.py b/Numbers/pi.py
new file mode 100644
index 0000000..198a194
--- /dev/null
+++ b/Numbers/pi.py
@@ -0,0 +1,7 @@
+# Find PI to the Nth Digit
+
+import math
+
+digits = raw_input('Enter number of digits to round PI to: ')
+
+print round(math.pi, int(digits))