aboutsummaryrefslogtreecommitdiff
path: root/challenge-254/eric-cheung/python/ch-1.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-254/eric-cheung/python/ch-1.py')
-rwxr-xr-xchallenge-254/eric-cheung/python/ch-1.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-254/eric-cheung/python/ch-1.py b/challenge-254/eric-cheung/python/ch-1.py
new file mode 100755
index 0000000000..3a08de1539
--- /dev/null
+++ b/challenge-254/eric-cheung/python/ch-1.py
@@ -0,0 +1,13 @@
+
+import math
+
+## nInput = 27 ## Example 1
+## nInput = 0 ## Example 2
+nInput = 6 ## Example 3
+
+dCubicRoot = nInput ** (1. / 3.)
+
+if dCubicRoot - int(dCubicRoot) > 0:
+ print (False)
+else:
+ print (True)