Python:Recursion

From Progzoo
Jump to: navigation, search

4) At McDonalds one can buy chicken nuggets in packages containing 6, 9 or 20 pieces. Write a Python function that accepts an integer, num, as an argument and decides whether or not it is possible to buy num nuggets at McDonalds.


Taken from: John Guttag, course materials for 6.00 Introduction to Computer Science and Programming, Fall 2007. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on 5 Nov 2008

[Font] [Default] [Show] [Resize] [History] [Profile]