Станислав обнови решението на 12.03.2012 15:44 (преди почти 13 години)
+def prepare_meal(number):
+ count = 0
+ str = ""
+ num = number
+
+ print ("Да сготвим с", number)
+ while number % 3 == 0:
+ number = number / 3
+ count = count + 1
+ if count > 1:
+ str = str + " spam"
+ else:
+ str = str + "spam"
+
+ if num % 5 == 0:
+ if (num / 5 > 1):
+ str = str + " and eggs"
+ print (str)
+ return str
+ else:
+ str = str + "eggs"
+ print (str)
+ return str
+ else:
+ print (str)
+ return str