Python program to count number of words entered Get link Facebook X Pinterest Email Other Apps - September 30, 2021 n=input("Enter String :")f=len(n)count=0for i in range(0,f): z=ord(n[i]) if z==32: count+=1print("Number of words : ",count+1) Get link Facebook X Pinterest Email Other Apps Comments
Python program to check if it is a Duck Number or not - September 17, 2021 t=r=x=fag=0 n=int(input("ENTER N : ")) while n!=0: t=n%10 if t==0: fag+=1 n=n//10 if fag>0: print("It's a Duck Number") else: print("It's not a Duck Number") Read more
Comments
Post a Comment