← coderbyte_practice

rename, add

26807f551068e1074e2a096415003260d2ab04f3 · ovidiucs · May 4, 2015 11:00

+20 · 2 files changed

  • easy/{firstreverse.py => 01-first-reverse.py} +0 −0
  • easy/02-first-factorial.py +20 −0
diff --git a/easy/firstreverse.py b/easy/01-first-reverse.py
similarity index 100%
rename from easy/firstreverse.py
rename to easy/01-first-reverse.py
diff --git a/easy/02-first-factorial.py b/easy/02-first-factorial.py
new file mode 100644
index 0000000..6335cda
--- /dev/null
+++ b/easy/02-first-factorial.py
@@ -0,0 +1,20 @@
+"""
+Have the function FirstFactorial(num) take the num parameter being passed and return the factorial of it 
+(ie. if num = 4, return (4 * 3 * 2 * 1)). For the test cases, 
+the range will be between 1 and 18. 
+
+Use the Parameter Testing feature 
+in the box below to test your code with different arguments.
+"""
+
+from math import factorial
+
+def FirstFactorial(num): 
+
+  return factorial(num)
+    
+    
+# keep this function call here  
+# to see how to enter arguments in Python scroll down
+print FirstFactorial(raw_input())           
+