Computer Science, asked by jennifersherpa19, 4 months ago

5. WAP to input a number, if it  is a three digit number, then check that the product of the digits is a Buzz number or not.

Answers

Answered by valeriy69
2

\small\mathsf\color{pink}{Solution\: using\: python\: 3}

def find_product(n):

p = 1

while (n != 0):

p = p * (n % 10)

n = n // 10

return p

while True:

n = int(input("enter num: "))

if len(str(n)) != 3:

print("ENTER A 3 DIGIT NUMBER!")

continue

else:

if n % 7 == 0 or n % 10 == 7:

print("tis a buzz number!")

else:

print("tis not a buzz number")

break

\small\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Answered by Anonymous
3

Answer:

def find_product(n):

p = 1

while (n != 0):

p = p * (n % 10)

n = n // 10

return p

while True:

n = int(input("enter num: "))

if len(str(n)) != 3:

print("ENTER A 3 DIGIT NUMBER!")

continue

else:

if n % 7 == 0 or n % 10 == 7:

print("tis a buzz number!")

else:

print("tis not a buzz number")

break

Similar questions