Skip to content

Instantly share code, notes, and snippets.

@ashokbharat
Created May 26, 2017 11:24
Show Gist options
  • Save ashokbharat/34780b036298b0e3c9145ccffbcd34b6 to your computer and use it in GitHub Desktop.
Save ashokbharat/34780b036298b0e3c9145ccffbcd34b6 to your computer and use it in GitHub Desktop.
Practice_2
'''Ask the user for a number. Depending on whether the number is even or odd, print out an appropriate message to the user.'''
num1 = int(input("Enter a number"))
num2 = int(input("Enter one more number"))
if num1%2==0:
if num1%4 ==0:
print("Your number is both an even number and also multiple of 4")
else:
print("You entered an even number")
else:
print("You entered an odd number")
if num2%num1 == 0:
print("Second number is evenly divisible by first number")
else:
print("Second number is not evenly divisible by first number")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment