Advertisement
rfmonk

codecademy_functions.py

Feb 1st, 2013
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. def cube(x):
  2.     return x**3
  3.    
  4. def by_three():
  5.     if x % 3 == 0:
  6.         return cube(x)
  7.     else:
  8.         return False
  9.  
  10.  
  11. by_three(11)
  12. by_three(12)
  13. by_three(13)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement