SHARE
TWEET

Division

ganiyuisholaafeez Feb 19th, 2020 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. """ The function determines if a number is evenly divisible by both 3 and 4
  2. and it accepts a number argument"""
  3. def divisible_by_three_and_four(number):
  4.  
  5. # Mathematical expression of determining evenness in the division    
  6.     if number % 3 == 0 and number % 4 == 0:
  7.         return True
  8.     else:
  9.         return False
  10.  
  11. # Function Invokation
  12. print(divisible_by_three_and_four(3))
  13. print(divisible_by_three_and_four(4))
  14. print(divisible_by_three_and_four(12))
  15. print(divisible_by_three_and_four(18))
  16. print(divisible_by_three_and_four(24))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top