開始使用免費開始

辨識合格的 docstring

我們已經介紹如何撰寫完整的 docstring。 在你親自撰寫之前,這個練習會先讓你透過辨識格式正確的 docstring 來練習。

在這個練習中,你會使用已載入到你環境中的函式 goldilocks()rapunzel()mary()sleeping_beauty()

本練習屬於課程

Python 的軟體工程原則

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Run the help on all 4 functions
help(goldilocks)
____(rapunzel)
help(____)
____(____)
編輯並執行程式碼