{"id":348274,"student_id":10,"content":"\"\"\"\n程式會用 True 和 False 來表示比較後的結果。\n\n首先我們看到前三行程式,\n第一行會比較左邊是否大於右邊,結果是沒有,因此變數 a 會儲存 False 表示比較的結果,\n第二行會比較左邊是否小於右邊,結果是沒有,因此變數 b 會儲存 False 表示比較的結果,\n第三行會比較左邊是否等於右邊,結果是相等,因此變數 c 會儲存 True 表示比較的結果。\n\n第七行是在比較變數 a 儲存的結果與變數 c 儲存的結果是否相等,\n根據第一行與第三行執行後的結果,變數 a 和 b 裡儲存的內容不一樣,\n因此變數 g 會儲存 False。\n\"\"\"\n\na = 10 \u003e 10 # False:10 沒有大於 10\nb = 10 \u003c 10 # False:10 沒有小於 10\nc = 10 == 10 # True:10 和 10 相等\nd = a and b and c # False\ne = a or b or c # True\nf = a == b # True\ng = a == c # False\n\nprint('a 變數裡存:', a)\nprint('c 變數裡存:', c)\nprint('a == c 比較變數 a 和 c 是否相等,並將結果存至 g')\nprint('g 變數裡存:', g)","created_at":"2022-02-23T17:39:41.373+08:00","updated_at":"2022-02-23T17:45:26.878+08:00","name":"#2 資料型態,詳解","language":"python","screenshot":{"url":"https://cdn7.koding.school/uploads/project/screenshot/348274/9deb3fd8f20a91703e3a103a50c067a7.jpg"},"parent_id":348270,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":165,"hashid":"882sqg9r3","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":7528997,"file_name":"cloud.png","project_id":348274,"asset_id":302343,"created_at":"2022-02-23T17:39:41.378+08:00","updated_at":"2022-02-23T17:39:41.378+08:00"},{"id":7528998,"file_name":"bg.jpg","project_id":348274,"asset_id":302344,"created_at":"2022-02-23T17:39:41.379+08:00","updated_at":"2022-02-23T17:39:41.379+08:00"},{"id":7528999,"file_name":"calm.mp3","project_id":348274,"asset_id":302345,"created_at":"2022-02-23T17:39:41.380+08:00","updated_at":"2022-02-23T17:39:41.380+08:00"},{"id":7529000,"file_name":"koding.png","project_id":348274,"asset_id":302346,"created_at":"2022-02-23T17:39:41.381+08:00","updated_at":"2022-02-23T17:39:41.381+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦