Python if語句Demo

num = int(input("請輸入你的數字:")) if(num < 3): print(num + 2) elif(num >4 and num < 6): print("好吧") else: print("還好") 結果:   主要就是邏輯運算符跟C++/C#之類的不太一樣 and  與 or    或 not   非
相關文章
相關標籤/搜索