Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. print("This program will help you to divide")
  2. num1 = input("Give me the numerator: ")
  3. num2 = input("Give me the denominator: ")
  4.  
  5. if int(num1) % 4 == 0:
  6. print("DYK your " +num1 + " numerator is divisible by 4")
  7. elif int(num1) % 2 == 0:
  8. print("DYK your " +num1 + " numerator is divisible by 2 meaning an even digit")
  9. else:
  10. print("DYK your " +num1 + " numerator is NOT divisible by 2 meaning an odd digit")
  11.  
  12. if int(num1) % int(num2) == 0:
  13. print("Numerator " + num1 + " is completely divisible by denominator " + num2)
  14. else:
  15. print("Numerator " + num1 + " is NOT divisible by denominator " + num2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement