Advertisement
ganiyuisholaafeez

Division

Feb 19th, 2020
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  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))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement