(下)接下來,讓我們學著用Python寫出屬於自己的番茄鐘!
本篇為下篇,上篇請點此 連結 這一篇提供給你完整的Pyhon語法,讓你寫出你專屬的番茄鐘!! 跟上 人工智慧 的腳步,自己用 Python 「寫」一個番茄鐘 現今,無論是手機 APP,或是電腦桌面軟體,都有番茄鐘可供下載。但如果想為自己量身打造一個專屬番茄鐘,這時就可以參考 GitHub 上的「番茄鐘 Python 教學」: Python 番茄鐘「tomato-clock」教學網址請點此 。 如果是最簡潔的番茄鐘,只要短短代碼就可以了。以下是原始碼: $ ./tomato.py # start a 25 minutes tomato clock + 5 minutes break $ ./tomato.py -t # start a 25 minutes tomato clock $ ./tomato.py -t <n> # start a <n> minutes tomato clock $ ./tomato.py -b # take a 5 minutes break $ ./tomato.py -b <n> # take a <n> minutes break $ ./tomato.py -h # help 同時,教學內也會提供你使用 Python 套件管理工具 pip 安裝的程式碼: $ tomato # start a 25 minutes tomato clock + 5 minutes break $ tomato -t # start a 25 minutes tomato clock $ tomato -t <n> # start a <n> minutes tomato clock $ tomato -b # take a 5 minutes break $ tomato -b <n> # take a <n> minutes break $ tomato -h # help ▲ 「tomato-clock」 Ubuntu 系統桌面通知 想一心多用?神經學家:大腦無法多工...