filmov
tv
How to do python program for find factorial of a number
Показать описание
def recur_factorial(n):
if n==1:
return n
else:
return n*recur_factorial(n-1)
num=int(input("Enter a number:"))
if num =0:
print("SORRY,The factorial number doesn't exist for negative number..")
elif num==0:
print("The factorial number for 0 is 1")
else:
print("The factorial number for",num,"is",recur_factorial(num))
In this description angle bracket is not given(if num lesser than or equal to 0)
if n==1:
return n
else:
return n*recur_factorial(n-1)
num=int(input("Enter a number:"))
if num =0:
print("SORRY,The factorial number doesn't exist for negative number..")
elif num==0:
print("The factorial number for 0 is 1")
else:
print("The factorial number for",num,"is",recur_factorial(num))
In this description angle bracket is not given(if num lesser than or equal to 0)
Python for Beginners - Learn Coding with Python in 1 Hour
Learn Python in Less than 10 Minutes for Beginners (Fast & Easy)
How to Run Python Programs ( .py files ) on Windows 11 ( All Options )
👩💻 Python for Beginners Tutorial
15 Minute Python Tutorial For Beginners In Hindi (Full & Complete Python Crash Course)
Python Tutorial - Your First Program
How to create graphics using Python turtle 🐍🐢 #coding
Python Full Course for Beginners
Day 96: Python Program to Concatenate Two Dictionaries
Python Tutorial for Absolute Beginners #1 - What Are Variables?
How to confuse a Python Developer?
#01 Python Programming Tutorial Series 📚| Introduction to Python 🧑💻| EMC ACADEMY 💪
How To Master Python
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
Functions in Python are easy 📞
Python in 100 Seconds
ALL Python Programmers Should Know This!! #python #programming #coding
How to Run First Python Program using IDLE
Python Tutorial for Beginners with VS Code 🐍
you need to learn Python RIGHT NOW!! // EP 1
Python Decorators in 1 Minute!
How I Would Learn Python FAST in 2023 (from zero)
Learn Classes in Python in 4 Minutes
FASTEST Way to Learn Coding and ACTUALLY Get a Job
Комментарии