Python Web 開發學習 - 第一個Python程式

橘_O發表於2016-09-23

第一個Python程式

(1) 新建一個名為 first.py的檔案,檔案中輸入以下程式碼

x = int(input("Please enter an integer:"))
if x < 0:
    print("this number < 0")
if x > 0:
    print("this number > 0")

(2) 儲存檔案。


執行結果:


相關文章