Question #321595

Take in a number




from the user print if it's divisible by 3 or 5 or 3 and 5

Expert's answer

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')
LATEST TUTORIALS
APPROVED BY CLIENTS