Яне обнови решението на 14.03.2012 15:30 (преди почти 13 години)
+
+def prepare_meal( number ):
+ s = ''
+ if ( number > 0 and number % 3 == 0 ):
+ number = number / 3
+ s = 'spam'
+ while ( number > 0 and number % 3 == 0 ):
+ number = number / 3
+ s = s + ' spam'
+
+ if ( number > 0 and number % 5 == 0 ):
+ if ( s == '' ):
+ s = 'eggs'
+ else:
+ s = s + ' and eggs'
+
+ return s