Python基礎一(認識Python、搭建程式設計環境、第一個Python程式)
阿新 • • 發佈:2018-12-04
認識Python
Python的起源
Python的作者是著名的“龜叔”Guido van Rossum,他希望有一種語言能夠像C語言那樣,能夠全面的呼叫計算機的功能介面,又能像shell那樣,可以輕鬆的程式設計。
龜叔從ABC語言看到了希望,龜叔也參與到ABC語言的開發,由於一系列原因ABC語言便沒有的快速傳播使用,因此龜叔開始寫Python語言。
Python的誕生
1989年龜叔為了打發無聊的聖誕節,開始編寫Python。1991年Python的第一個編譯器誕生,它使用C語言編寫的,要能夠呼叫C語言的庫檔案。
Python的定位
Python一開始龜叔給他的定位是“優雅、簡單、明確”
Python的官網:Python官網下載
搭建程式設計環境
下載地址:Python官網根據自己的版本下載自己的程式
IDE下載地址:PyCharm下載
PyCharm的註冊碼:
CZBSQ81IF5-eyJsaWNlbnNlSWQiOiJDWkJTUTgxSUY1IiwibGljZW5zZWVOYW1lIjoiTGl0dGxlIGZlaSIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDE5LTAxLTMwIn0seyJjb2RlIjoiUlMwIiwicGFpZFVwVG8iOiIyMDE5LTAxLTMwIn0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMTktMDEtMzAifSx7ImNvZGUiOiJSRCIsInBhaWRVcFRvIjoiMjAxOS0wMS0zMCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDE5LTAxLTMwIn0seyJjb2RlIjoiREMiLCJwYWlkVXBUbyI6IjIwMTktMDEtMzAifSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAxOS0wMS0zMCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8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1kA9N2Qachl+2yBfaqUqr8h7Z2gsx5LcIf5kYNsqJ0GavXTVyWh7PYiKX4bs354ZQLUwwa/cG++2+wNWP+HtBhVxMRNTdVhSm38AknZlD+PTAsWGu9GyLmhti2EnVwGybSD2Dxmhxk3IPCkhKAK+pl0eWYGZWG3tJ9mZ7SowcXLWDFAk0lRJnKGFMTggrWjV8GYpw5bq23VmIqqDLgkNzuoog==
Python第一個程式
print("hello Python")
思考題:
編寫一段程式輸出自己的姓名和年齡(使用變數)。
1 name = input("請輸入您的姓名:") 2 age = input("請輸入您的年齡:") 3 print("您的姓名是:",name,"您的年齡是:",age)