Guest User

Untitled

a guest
Jan 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. m = int(input("Enter a number: "))
  2. if m%2==0:
  3. print("{} is an even number".format(m))
  4. else:
  5. print("{} is an odd number".format(m))
  6.  
  7. ## Extras
  8.  
  9. n = int(input("Enter a number: "))
  10. if n%4==0:
  11. print("{} is multiple of 4".format(n))
  12. elif n%2==0:
  13. print("{} is an even number".format(n))
  14. else:
  15. print("{} is an odd number".format(n))
  16.  
  17. num = int(input("Enter a number to check: "))
  18. check = int(input("Enter a divisor: "))
  19. if num % check ==0:
  20. print("{} evenly divides {}".format(check,num))
  21. else:
  22. print("{} is not divisible by {}".format(num,check))
Add Comment
Please, Sign In to add comment