Skip to content

Instantly share code, notes, and snippets.

@ehedaoo
Created April 30, 2017 18:07
Show Gist options
  • Save ehedaoo/069b6491c421c8b8c9f668a377d50ebe to your computer and use it in GitHub Desktop.
Save ehedaoo/069b6491c421c8b8c9f668a377d50ebe to your computer and use it in GitHub Desktop.
Ask the user for two numbers: one number to check (call it num) and one number to divide by (check). If check divides evenly into num, tell that to the user. If not, print a different appropriate message.
# Ask the user for two numbers: one number to check (call it num) and one number to divide by (check).
# If check divides evenly into num, tell that to the user.
# If not, print a different appropriate message.
num = int(input("Enter a number: "))
check = int(input("Enter a number to divide by: "))
if num % check == 0:
print("Yusssss")
else:
print("Naaaaaawwww")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment