Check if number is divisible by three and two
Instead of checking for division by 2 and 3 separately twice, you can make use of the fact that:
$$ 2 * 3 = 6$$
num = int(input(&quot;enter number&quot;))
if num % 6 == 0:
    print(&quot;Divisible by 3 and 2&quot;)
elif num % 3 == 0:
    print(&quot;divisible by 3 not divisible by 2&quot;)
elif num % 2 == 0:
    print(&quot;divisible by 2 not divisible by 3&quot;)
else:
    print(&quot;not Divisible by 2 not divisible by 3&quot;)

python pep8 suggests to use 4-whitespace nesting as indentation levels.

Use 4 spaces per indentation level.


If you have more numbers to check divisibility against, keep a set of the numbers for which num % x == 0, and print the factors at the end.