Playing with Numbers in Python – 3

#---------------------------- counting the total number of digit ----------------------------

num = int(input("Enter the number :"))
count =0
while(num>0):
    num=num//10
    count += 1
print(count)
#---------------------------- counting the key in digit ------------------------------------

num = int(input("Enter the number :"))
count =0
key= int(input("Enter the key : "))
while(num>0):
    ld = num%10
    num=num//10
    if(key == ld):
        count += 1
print(count)
#---------------------------- multiply all digits in number ----------------------------------

num = int(input("Enter the number :"))
mul=1
while(num>0):
    ld =num%10
    num=num//10
    mul=ld*mul

print(mul)
#---------------------------- find prime digits in number ----------------------------------

num = int(input("Enter the number :"))
rev =0
count =0

while(num>0):
    ld =num%10
    num=num//10
    rev = rev*10+ld

while(rev>0):
    ld =rev%10
    rev=rev//10
    if(ld == 2 or  ld == 3 or ld == 5 or ld == 7 ):
        
        print(ld,end =' ')
#---------------------------- checking palindrome by digits --------------------------------

num = int(input("Enter the number :"))
rev =0

val= num
while(num>0):
    ld =num%10
    num=num//10
    rev = rev*10+ld
if rev== val:
    print("Palindrome Number")
else:
    print("Not a Palindrome Number")
#---------------------------- checking adam number by digits --------------------------------

num = int(input("Enter the number :"))
rev =0
final =0
val= num
sq_n=num*num
while(num>0):
    ld =num%10
    num=num//10
    rev = rev*10+ld
sqr =rev * rev
while(sqr>0):
    ld =sqr%10
    sqr=sqr//10
    final = final*10+ld
if(final == sq_n):
    print("Adam Number")
else:
    print("Not a adam number")

Join our team, where career growth knows no limits.

For More Details

Our internship program guarantees personalized attention for optimal career development in the tech industry.

+91 97879 68375

-> You should bring your own laptop during the internship

Who can apply?

Internships are open for students who: B.E / B.Tech / M.E / M.Tech / B.Sc / M.Sc / M.C.A / B.C.A / Diploma.

  • Ongoing Students Only
  • days, 5days/ 10days or Based on Student Preference
  • Limited 1 to 10 students per slot
  • Registration fees : 1000 INR
  • Slots are filling quickly only fewer slots are available