Computer Science, asked by champachakraborty80, 6 months ago

Write a menu driven program using a method Number() to perform the
following tasks:
(1) Accept a number from the user and check whether it is BUZZ number
or not. A BUZZ number is the number which either ends with 7 or is divisible by 7.
(ii) Accept a number from the user and check whether it is a composite number or not. A composite number has more than one
factor(excluding 1 and the number itself).​

Answers

Answered by nkcthereaper
0

Answer:

#1

x=input('enter number=')

xx=int(x)

if x[-1]=='7' or xx%7==0:

   print('it is a BUZZ number')

else:

   print('it is not a buzz number')

#(ii)

x=int(input('enter number='))

q=[]

for i in range(1,x):

   if x%i==0:

       q.append(i)

if len(q)>1:

   print("it is a composite number")

else:

   print("it is not a composite number")

       

Explanation:

Answered by sara29jose
0

Explanation:

show variable description table

Similar questions