def init_recipe(self): #기존 음식 떡볶이 = Recipe('떡볶이') 떡볶이.people = 2 떡볶이.video = 'youtube.com' 떡볶이.ingredient = {'떡': '200', '고추장': '100', '물': '100', '어묵': '100'} self.recipe_list.append(떡볶이) #객체 추가 (string x) 카레 = Recipe('카레') 카레.ingredient = {'카레가루': '50', '감자': '200', '당근': '100'} self.recipe_list.append(카레) 파스타 = Recipe('파스타') 파스타.contents = '맛있게 만드세요!' 파스타.ingredient = {'면': '100', '토마토소스': '200'} self.recipe_list.append(파스타)
def init_recipe(self): 떡볶이 = Recipe('떡볶이') 떡볶이.people = 2 떡볶이.video = 'youtube.com' 떡볶이.ingredient = { '떡': '200', '고추장': '20', '어묵': '3', '물': '50', '소세지': '5' } self.recipe_list.append(떡볶이) 카레 = Recipe('카레') 카레.people = 4 카레.video = 'youtube.com' 카레.ingredient = {'카레가루': '200', '감자': '20', '당근': '30', '물': '50'} self.recipe_list.append(카레) 파스타 = Recipe('파스타') 파스타.people = 3 파스타.video = 'youtube.com' 파스타.contents = '맛있게드세요' 파스타.ingredient = {'면': '200', '토마토소스': '20', '물': '30', '소세지': '5'} self.recipe_list.append(파스타)