
Python 入門指南 5.0
exercise1010.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # 定義函數 def do_something(a, b, c): # 依據參數回傳計算結果 if a > b: return a + b else: return b + c # 印出計算結果 r1 = do_something(c=10,a=9,b=8) print(r1) r2 = do_something(c=10,a=8,b=9) print(r2) # 檔名: exercise1010.py # 說明:《Python入門指南》的練習 # 網站: http://kaiching.org # 作者: 張凱慶 # 時間: 2023 年 8 月 |
