FixItAli

If divisible by 2 and/or 3

May 8th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. num = int(input("Please enter a number: "))
  2. if num%2 == 0:
  3. if num%3 == 0:
  4. print ("Divisible by 3 and 2.")
  5. else:
  6. print ("Divisible by 2 not divisible by 3.")
  7. else:
  8. if num%3 == 0:
  9. print ("Divisible by 3 not divisible by 2.")
  10. else:
  11. print ("Not divisible by 2 not divisible by 3.")
Add Comment
Please, Sign In to add comment