Find the Factorial of a Number - Python Program Tutorial🔥

preview_player
Показать описание


WsCube Tech is a leading Web, Mobile App & Digital Marketing company, and institute in India.

We help businesses of all sizes to build their online presence, grow their business, and reach new heights.

All the courses are job-oriented, up-to-date with the latest algorithms and modules, fully practical, and provide you hands-on projects.

📞 For more info about the courses, call us: +91-7878985501, +91-9269698122

✅ CONNECT WITH THE FOUNDER (Mr. Kushagra Bhatia) -

Connect with WsCube Tech on social media for the latest offers, promos, job vacancies, and much more:

--------------------------------------| Thanks |---------------------------
#pythontutorials #python #pythonprogramming
Рекомендации по теме
Комментарии
Автор

😎Hey, thanks for watching! We’d love to know your thoughts/doubts here in the comments.

wscubetech
Автор

a=int(input("enter a number"))
For x in range(a-1, 0, -1) :
a=a*x
Print(a)

OjasAgarwal-ouwk
Автор

a=int(input("enter a number"))
import math
print(math.factorial(a))

krish
Автор

def factorial(a):
return 1 if a==1 or a==0 else a*factorial(a-1)
print(factorial(4))

friend
Автор

In every video what a great explanation. Thank you very much ma'am. You helped a lot🙂.

AkashShukla
Автор

def fact(a):

f=1
for i in range(1, a+1):
f=f*i

return f

a = int(input("enter a number:"))
factorial = fact(a)
print("the factorial of the given number is", factorial)

abhijeetsinghyadav
Автор

Mam It looks like you have some syntax errors in your code. Here's a corrected version:

```python
num = int(input("Enter your number: "))
fact = 1

if num < 0:
print("Factorial of a negative number does not exist")
elif num == 0:
print("Factorial of 0 is 1")
else:
for i in range(1, num + 1):
fact = fact * i
print("Factorial of the given number is", fact)
```

I've fixed the indentation, added `elif` to handle the case when `num` is zero, and corrected the loop syntax. This code should work as intended.

Anshmajumdar
Автор

thanks a lot mam for your help watching your videos one day before my exame which helps a lot

dkscare
Автор

Thanks for teaching all these algorithms and Python language.

rishiraj
Автор

Thanks mam me Bahut mughe for loop samajh nahin aa rha tha what h great explanation mam

defenceloverupadhyay
Автор

It's a great job mam, Your teaching style is very good, because I'm learning python as a non technical person, I can understand very well.

Please a suggestion:-
Please next post videos asap..
Please solve and upload atleast more than 3to4 videos per day.

avinashjain
Автор

num = int(input("Enter the number : "))
F = 1
if num < 0:
print("This is not a Valid Input")
while num >= 1:
F *= num
num -= 1

print("The Factorial is", F)

PythonProjectSolver
Автор

Really great explanation. Want more videos like this YOU explaining basic programs with python. ❤

sukhadasatpute
Автор

Dear Mam I have a doubt here from for loop.
We write two program one is Factorial and second is Fibonacci series.
Methods are same but in result:
Factorial runs and gives single input of loop like 3! = 6 only (why it's not 1, 2, 6)
But same case in Fibonacci series the loop shows all result of series like if I input till 3 numbers results shows 0, 1, 1(but why not 1 only as in case of factorial)???

himanshusinghnegi
Автор

for recursion, the negative value will throw an error

pdtremf
Автор

Import math
integer = input("Enter the integer":)
factorial_integer = math.factorial(integer)
Print(factorial_integer)

AshishTomar-rkil
Автор

Digital marketing per bhi video bna do please 🙏 😀

facebookapp
Автор

if you remove the if statment of 0 than it also work no need to add addition if statement for 0

PythonProjectSolver
Автор

Hello mam please make one video what is sales funnel please 🙏 🙂

facebookapp
Автор

a=int(input('enter the number'))
t=1
for n in range (1, (a+1), 1):
t=t*n
Print(t)

anirudhpratapsingh