trendy
Write a Python Program to check whether the
given number is a
number or not
not. A
number is said to be trendy
number if and only
if it has 3 digits and the middle digit is
divisible by 3. Input format: The input containing
an integer and which denotes the given number
output format: If the given number is a trendy
number, then print
"Trendy Number", otherwise
P runt "Not a Trendy
Number
Answers
Answered by
2
Answer:
go to python official site or solo learn ur prob is already solved there and if u r on s.o.lo plz f.ol.l.o.w me there u ll get first ans for this on my acc
Explanation:
Answered by
1
Answer:
import math
num=int(input())
m=(num/10)%10
n=round(m)
l=len(str(num))
num = int((num // math.pow(10, l // 2))) % 10;
if l ==3 and num%3==0:
print("Trendy Number")
else:
print("Not a Trendy Number")
Explanation:
Similar questions