--- title: 19-7:無傳回值函數 lang: zh-tw tags: DICE Python --- 19-7:無傳回值函數 === > [name=Chinglin-K] --- 目錄:[Dice 程式教學-Python完整版](https://hackmd.io/@Chinglin-K/Dice-menu) 上一篇:[19-6:質數個數](https://hackmd.io/@Chinglin-K/Dice-19-6) 下一篇:[20-1:1到N之和](https://hackmd.io/@Chinglin-K/Dice-20-1) --- ## 題目 使用自訂函式的方法,寫一個 crazyprint() 函式,印出為什麼需要副程式,方便我瘋狂列印。 輸入一個整數 N,決定列印次數。 輸入範例: 10 輸出範例: 為什麼需要副程式,方便我瘋狂列印。 為什麼需要副程式,方便我瘋狂列印。 為什麼需要副程式,方便我瘋狂列印。 為什麼需要副程式,方便我瘋狂列印。 為什麼需要副程式,方便我瘋狂列印。 為什麼需要副程式,方便我瘋狂列印。 為什麼需要副程式,方便我瘋狂列印。 為什麼需要副程式,方便我瘋狂列印。 為什麼需要副程式,方便我瘋狂列印。 為什麼需要副程式,方便我瘋狂列印。 --- ## 程式碼 ```Python= def crazyprint(n): for i in range(n): print("為什麼需要副程式,方便我瘋狂列印。") n=int(input()) crazyprint(n) ``` --- ## 輸出 ```Python= 為什麼需要副程式,方便我瘋狂列印。 ``` --- 目錄:[Dice 程式教學-Python完整版](https://hackmd.io/@Chinglin-K/Dice-menu) 上一篇:[19-6:質數個數](https://hackmd.io/@Chinglin-K/Dice-19-6) 下一篇:[20-1:1到N之和](https://hackmd.io/@Chinglin-K/Dice-20-1) --- :::info 「盡多少本分,得多少本事」😊 ::: --- {%hackmd i1nMRrZcTFmTvoF897K9zg %}
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up