Лазар обнови решението на 10.03.2012 01:43 (преди почти 13 години)
+def prepare_meal(number):
+ power_of_three = 9
+ result = ''
+ space = ' '
+ if number % 3 == 0:
+ result='spam'
+ while number % power_of_three == 0:
+ power_of_three = power_of_three * 3
+ result = result + space + 'spam'
+ if number % 5 == 0:
+ if result:
+ result = result + space + 'and eggs'
+ else:
+ result = 'eggs'
+ return result