Python program to check if it is a Duck Number or not

 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")

Comments

Popular posts from this blog

Binary Search, Linear Search, Selection Sort and Bubble sort Python Menu Program

Housie/Tambola using Python with Tickets in PDF file