Python Tutorial to learn Python programming with examples

Complete Python Tutorial for Beginners Playlist :

Python Tutorial in Hindi :

Github :-

Editing Monitors :

Check out our website:

Follow Telusko on Twitter:

Follow on Facebook:

Telusko :

Navin Reddy :

Follow Navin Reddy on Instagram:

Subscribe to our other channel:

Navin Reddy :

Telusko Hindi :

Donation:

PayPal Id : navinreddy20

Patreon : navinreddy20

Rahul AgarwalSeptember 2, 2020 at 9:14 ami want to make a code for making a code language. i tried a lot but i failed every time. plss make a video on that too

Saurav NarangSeptember 2, 2020 at 9:14 amdef factorial(a):

for i in range(1,a):

a = a*i

print(a)

factorial(10)

Jay patelSeptember 2, 2020 at 9:14 amlength=int(input('Enter the lenght: '))

num=int(input('Numbers: '))

f=1

for i in range(1,length+1):

f=f*i

print(f)

if i == length:

print('the answer is:', f)

Jay patelSeptember 2, 2020 at 9:14 ama=0

b=1

n=int(input('Enter how many'))

print(a)

print(b)

for i in range(n):

a+=b

b+=a

print(a)

print(b)

Bilol NormuminovSeptember 2, 2020 at 9:14 amdef fact(n): return 1 if n == 0 else n * fact(n – 1) if n > 0 else None

Aayush SharmaSeptember 2, 2020 at 9:14 amdef tino(n):

f=1

for i in 5,2,3,4:

f=f*i

return f

x=5

result=tino(x)

print(result)

Y this code is giving an output value of 5 ?

Laith WahibSeptember 2, 2020 at 9:14 amef fact(n):

x = n

r = 1

while x >= 1:

r*=x

x-=1

print('the result is {}'.format(r))

f = int(input('please input the value of your nummber to accont the factorial'))

fact(f)

abhishek tripathiSeptember 2, 2020 at 9:14 amMan, best python series.

Suvir AroraSeptember 2, 2020 at 9:14 am1:00

Noor KhanSeptember 2, 2020 at 9:14 amBest Explanation and Teaching Method. Simply Awesome!!

Souvik MallikSeptember 2, 2020 at 9:14 amWhy do I need to specify x =4?

I mean I can directly put result = fact(4)

ii. B. Sasi kumar RajuSeptember 2, 2020 at 9:14 amI gain more persistence after watching ur python videos sir tq sir…..🤝🤝

ii. B. Sasi kumar RajuSeptember 2, 2020 at 9:14 amI'm little bit miserable sir bcz I did some errors in coding anything errors means coding right so no problem I practice more examples tq sir for giving such a life platform……👌👌🙏🙏

Pubg GamingSeptember 2, 2020 at 9:14 amThank you very much Sir. After watching your videos I have not any confusion

Dhruvin LoharSeptember 2, 2020 at 9:14 amsir i had written the code properly but i'm not getting the correct output please help me with that

Daksh DagarSeptember 2, 2020 at 9:14 amprint("program to find factorial of numbers")

n=int(input("enter a number to find factorial "))

def fact():

i=1

f=1

while i<=n:

f=f*i

i+=1

print(f)

fact()

Nikhil PatnaikSeptember 2, 2020 at 9:14 am# FACTORIAL

def Fact(y):

f = 1 if y == 1 else y * Fact(y – 1)

return f

m = Fact(int(input("Enter a number: ")))

print("Factorial of the number is: "+str(m))

Vijay SahalSeptember 2, 2020 at 9:14 amnice 👍👍👍

nayana NRSeptember 2, 2020 at 9:14 amtried like this

def fact(n):

result=1

while n>=1:

result*=n

n-=1

return result

a= int(input("enter a positive number: "))

result= fact(a)

print("factorial of given number is: ", result)

gaurav guptaSeptember 2, 2020 at 9:14 amdef fact(n):

f = 1

if n == 0:

return 1

for i in range(1, n + 1):

f = i * f

return f

def fact_recursion(n):

if n == 0:

return 1

else:

return (fact_recursion(n-1) * n)

n = 10

result = fact(n)

print('Factorial of number {} is {}'.format(n, result))

result = fact_recursion(10)

print('Factorial of number {} is {}'.format(n, result))

kiyan kmSeptember 2, 2020 at 9:14 amThank you 😊❤️

Shajahan SmartSeptember 2, 2020 at 9:14 amn=int(input("enter "))

k=1

for i in range(n):

k=k*n

n-=1

print(k)

RAVI KRISHNASeptember 2, 2020 at 9:14 ambuy adding if c<=n:

print c we may get the ans

Kyle HeinzSeptember 2, 2020 at 9:14 amGreat teacher! Thank you

ii. B. Sasi kumar RajuSeptember 2, 2020 at 9:14 amAmazing sir…… 👍👍

Hackerxx spacexSeptember 2, 2020 at 9:14 amHERE IS AN EASIER CODE FOR BEGINNERSfactorial = 1

fac = int('Enter any number: ')

if fac == 0:

print('0! = 1)

else:

for x in range(1, fac + 1) :

factorial = factorial * x

print((str(fac) + '! = ') + str(factorial))

syra awanSeptember 2, 2020 at 9:14 amn=5

x=n-1

for i in range(1,n):

result=n*x

x=x-1

n=result

print(result)

vasu srinivasSeptember 2, 2020 at 9:14 amIt's simply awesome sir

Aniket MahadikSeptember 2, 2020 at 9:14 amAll those who studied c++ know whats recursion.

venkatesh prasadSeptember 2, 2020 at 9:14 amHELLO SIR, I am getting issue while debugging anycode….can u please resolve my issue regarding debugging process.

Yash SuranaSeptember 2, 2020 at 9:14 amIf the factorial of a number is given, find the number whose factorial it is?

For eg. find the number whose factorial is 120.

How do we solve this?

Gaurav KumarSeptember 2, 2020 at 9:14 amIn case of recursion:

x = int(input())

def factorial(n):

if n <= 1:

return 1

else:

return n * factorial(n-1)

print(factorial(x))

IshanSeptember 2, 2020 at 9:14 amdef fact(num):

a=1;

for i in range(1,num+1):

a=a*i

return a

num=int(input("enter the number"))

a=fact(num)

print(a)

Chirag DhabhaiSeptember 2, 2020 at 9:14 amdef fac(n):

c=1

for i in range(n,1,-1):

c=c*i

print(c)

fac(5)

Yash SharmaSeptember 2, 2020 at 9:14 amx=0

n=int(input("Enter the number whose fact you want to find"))

for i in range(n,1,-1):

if(i==n):

x=n

else:

n=n*i

print("Factorial is…")

print(n)

quit()

Tried something different….

WaterisGoodSeptember 2, 2020 at 9:14 amthis is a advice for ur channel mate, talk slower and try to wipe that english from ur lips,so u talk cleaner , no ofennce just saying , it will impruve the view

hemanth bSeptember 2, 2020 at 9:14 amn=int(input('enter a num'))

F=1

for i in range(1,n+1):

F=F*i

print(f)

Angelo TraviSeptember 2, 2020 at 9:14 amfrom math import *

x = int(input("Factorial of this number"))

k = factorial(x)

print("the factorial of {} is {}".format(x, k))

def fattoriale(n):

p = n

if n == 0:

return 1

else:

for i in range(1, n):

p *= i

return p

print("the factorial of {} is {}".format(x, fattoriale(x)))

shubham singhSeptember 2, 2020 at 9:14 am#not geeting the result ??

def fact(n):

f=1

for i in range(1,n+1):

f=f*i

return f

x=5

result= fact(x)

print(result)

output:-

1

sharup sheikhSeptember 2, 2020 at 9:14 amThe factorial of 0 is also 1 which means we have to use if statement too

hozaifa shakeelSeptember 2, 2020 at 9:14 ammy code for finding factorial->

a=int(input("enter the number:"))

def fac(a):

b = 1

for i in range(1,a+1):

b=b*i

print(b)

fac(a)

Karthi MSeptember 2, 2020 at 9:14 amyou got great acting skills n also you have an amazing future in cinema man

Sreerag RajSeptember 2, 2020 at 9:14 amthis code not working

Ritika SharmaSeptember 2, 2020 at 9:14 amNo one can beat you in teaching python thanku ❤️

YASH MUNDANKARSeptember 2, 2020 at 9:14 amdef fact(n):

f=1

for i in range(1,n+1):

f=f*i

print(f)

n=int(input("Enter the number you want"))

fact(n)

Shivansh SinghSeptember 2, 2020 at 9:14 amn = int(input("Enter the factorial number"))

def fact(n):

f = 1

for i in range(1,n+1):

f = f * i

return f

result = fact(n)

print(result)

Riyaz DSeptember 2, 2020 at 9:14 amHi naveen in python how to make a variable private as in java??