iT邦幫忙

第 11 屆 iThome 鐵人賽

DAY 3
1
自我挑戰組

自我學習python系列 第 3

Hello World!

程式老師基本都會先教hello world~ 之前在大學一年級有學過java,
那我也來試看看Python的看看!!

java的hello world長這樣

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello! World!");
    }
}

接著要來打python的hello world ~
第一步:開啟IDLE
https://ithelp.ithome.com.tw/upload/images/20190917/201210249DkEekpdai.png
第二步:如何印上去
然後搜尋了一下! python的print 真的就只有print
於是動手打了一波~
https://ithelp.ithome.com.tw/upload/images/20190917/20121024KNi9iMtBHF.png
第三步:Enter!
https://ithelp.ithome.com.tw/upload/images/20190917/20121024jGrqjt4ntN.png
就這樣印出來了~

print('hello world')

然而要打進階一點的需要打開編譯使用ctrl+N開啟編譯
https://ithelp.ithome.com.tw/upload/images/20190917/20121024riQ7BnPuQf.png
https://ithelp.ithome.com.tw/upload/images/20190917/20121024CItc0toK2V.png
案f5執行! 這時他會要你儲存
https://ithelp.ithome.com.tw/upload/images/20190917/2012102417btZtqcMr.png
此時跑好 結果就出來囉!

比起學過的java,python真的簡潔有力,不愧是在各個領域都發光發熱的程式碼!
看來把python學好對未來的發展真的會大大的加分,省時又不費力,還有大量函式庫可以用
我要堅持下去好好學習!


上一篇
安裝簡易開發環境:idle
下一篇
Python的數值資料型態!
系列文
自我學習python30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言