Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = int(input("Enter a number: "))
- if m%2==0:
- print("{} is an even number".format(m))
- else:
- print("{} is an odd number".format(m))
- ## Extras
- n = int(input("Enter a number: "))
- if n%4==0:
- print("{} is multiple of 4".format(n))
- elif n%2==0:
- print("{} is an even number".format(n))
- else:
- print("{} is an odd number".format(n))
- num = int(input("Enter a number to check: "))
- check = int(input("Enter a divisor: "))
- if num % check ==0:
- print("{} evenly divides {}".format(check,num))
- else:
- print("{} is not divisible by {}".format(num,check))
Add Comment
Please, Sign In to add comment