What do you want to save?
Add Code snippet
New code examples
-
CSS 2021-11-02 17:06:08
ptython math methods
math.acos() Returns the arc cosine of a number math.acosh() Returns the inverse hyperbolic cosine of a number math.asin() Returns the arc sine of a number math.asinh() Returns the inverse hyperbolic sine of a number math.atan() Returns the arc tangent of ... Add solution -
Other 2021-10-09 17:15:05
Factorial of a number using recursion
# Factorial of a number using recursion def recur_factorial(n): if n == 1: return n else: return n*recur_factorial(n-1) num = 7 # check if the number is negative if num < 0: print("Sorry, factorial does not exist for nega... Add solution -
CSS 2021-10-05 11:10:05
ptython math constants
math.acos() Returns the arc cosine of a number math.acosh() Returns the inverse hyperbolic cosine of a number math.asin() Returns the arc sine of a number math.asinh() Returns the inverse hyperbolic sine of a number math.atan() Returns the arc tangent of ... Add solution -
Shell/Bash 2021-09-21 05:28:02
write a program in shell script to find factorial of a number
#Bash script to find factorial of a number echo -n "Enter a number: " read number factorial=1 for(( i=1; i<=number; i++ )) do factorial=$[ $factorial * $i ] done echo "The factorial of $number is $factorial" Add solution
Best helpers
Ranking is empty