Мирослав обнови решението на 12.03.2012 21:33 (преди почти 13 години)
+def prepare_meal(number):
+ meal = ""
+ has_eggs = (number % 5) == 0
+ while(number % 3 == 0):
+ number = number / 3
+ meal += "spam "
+ if (has_eggs):
+ if (len(meal) > 0):
+ meal += "and eggs"
+ else:
+ meal += "eggs"
+ return meal.strip()