這是SICP課程的第二個project,主要功能是測驗打字速度,您可以開啟自動改正功能來更正您在輸入時的一些小錯誤,完整版的在線體驗地址如下:
Cats
我個人的代碼地址如下(自動改正功能不算太完善):
https://box.nju.edu.cn/f/1442ae97e9b3419cabe4/?dl=1
如何在本地運行這個 software 呢?
首先,我們需要在本地安裝 python 環境,方法如下(如果已安裝請忽略):

其中 python 官方網站地址為 Welcome to Python.org
接下來,我們打開 Windows powershell: 右鍵螢屏左下角的“開始”圖示,點擊 Windows Powershell(I) ,或者按下 Win +R, 然后輸入 Powershell 回車運行,
下一步,找到記憶體放代碼檔案的地址,例如(C:\Users\Admin Yu\Desktop\cats)
然后在 powershell 中輸入 cd: ' 您的地址 ' 并按下回車:

上圖表示成功切換當前地址(如果出現錯誤,可以嘗試把引號去掉)
最后,我們鍵入 python gui.py
如無意外,我們就會在瀏覽器中打開圖形互動頁面,在這里您可以體驗到打字的樂趣,還可以和您的朋友來一場pk!

注:It seems that your
gui.pyis running in your own brower, then how could they communicate with each other? In fact,gui.pys do not know each other, they are just a client which will connect tocats.cs61a.org's server program. That program will handle all clients requests and response back.
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/356994.html
標籤:python
