{"id":212602,"student_id":10,"content":"def to_strip(food):\n return food + '條'\n\ndef to_slice(food):\n return food + '片'\n\ndef mash(food):\n return food + '泥'\n\ndef squeeze(food):\n return food + '汁'\n\ndef to_soup(food):\n return food + '濃湯'\n\ndef to_sauce(food):\n return food + '醬'\n\ndef cook(food):\n return '煮' + food\n\ndef bake(food):\n return '烤' + food\n\ndef fry(food):\n return '炸' + food\n\ndef stew(food):\n return '燉' + food\n\ndef add(food1, food2):\n return food1 + '佐' + food2\n\n\n\n\n# 挑戰1\n# 菜色:玉米濃湯\n# 食材:玉米\na = to_soup('玉米')\nprint(a)\n\n\n# 挑戰2\n# 菜色:飯佐咖哩醬\n# 食材:飯、咖哩\na = add('飯', to_sauce('咖哩'))\nprint(a)\n\n\n# 挑戰3\n# 菜色:炸苦瓜條\n# 食材:苦瓜\na = fry(to_strip('苦瓜'))\nprint(a)\n\n\n# 挑戰4\n# 菜色:烤義大利麵佐生菜\n# 食材:義大利麵、生菜\na = add(bake('義大利麵'), '生菜')\nprint(a)\n\n\n# 挑戰5\n# 菜色:馬鈴薯濃湯佐香菜\n# 食材:馬鈴薯、香菜\na = add(to_soup('馬鈴薯'), '香菜')\nprint(a)\n\n\n# 挑戰6\n# 菜色:炸蝦佐蘿蔔泥\n# 食材:蝦、蘿蔔\na = add(fry('蝦'), mash('蘿蔔'))\nprint(a)\n\n\n# 挑戰7\n# 菜色:生鮭魚片佐芥末醬\n# 食材:生鮭魚、芥末\na = add(to_slice('生鮭魚'), to_sauce('芥末'))\nprint(a)\n\n\n# 挑戰8\n# 菜色:炸魚佐柳橙醬\n# 食材:魚、柳橙\na = add(fry('魚'), to_sauce('柳橙'))\nprint(a)\n\n\n# 挑戰9\n# 菜色:燉牛肉佐炸馬鈴薯條\n# 食材:牛肉、馬鈴薯\na = stew('牛肉')\nb = to_strip(fry('馬鈴薯'))\nc = add(a, b)\nprint(c)\n\n\n# 挑戰10\n# 菜色:燉煮榴蓮佐苦瓜醬佐香菜汁\n# 食材:榴蓮、苦瓜、香菜\na = stew(cook('榴蓮'))\nb = to_sauce('苦瓜')\nc = squeeze('香菜')\nd = add(a, add(b, c))\nprint(d)\n\n","created_at":"2020-12-17T11:10:45.024+08:00","updated_at":"2021-01-04T14:33:46.209+08:00","name":"料理之王(完整版)","language":"python","screenshot":{"url":null},"parent_id":151912,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":210,"hashid":"5j3s99g9k","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦