Take in a number
from the user print if it's divisible by 3 or 5 or 3 and 5
n = int(input())
if n % 3 == 0:
if n % 5 == 0:
print(f'{n} divisible by 3 and 5')
else:
print(f'{n} divisible by 3 ')
elif n % 5 == 0:
print(f'{n} divisible by 5')
Comments
Leave a comment