Boolean operators:
notis evaluated first;
andis evaluated next;
oris evaluated last.
For example,True or not False and FalsereturnsTrue.
Boolean operators:
notis evaluated first;
andis evaluated next;
oris evaluated last.
For example,True or not False and FalsereturnsTrue.
“break" ouside the loop
break 不能用來中止 if statement,而是中止 Loop
unindent does not match any outer indentation level
新的 python 語法中,代碼縮進 (indentation) 不支援 Tab 和 Space 混用
name ‘raw_input’ is not defined
python 3 只需要 ‘input‘ 即可,沒有 ‘raw_input’
name='Jumping'
quest='learning Python'
color='black'
print('Ah, so your name is %s, your quest is %s,' \
' and your favorite color is %s.' % (name, quest, color))
Ah, so your name is Jumping, your quest is learning Python, and your favorite color is black.
從小時候的單機遊戲、國中開始接觸線上遊戲,到現在每天都在玩各種不同手機遊戲,不同時期、不同平台,一直以來都覺得能寫出一個程式、app或遊戲是一件很酷的事,2017年7月開始出社會後漸漸覺得,資訊科技一日千里,將來的趨勢會越來越需要資訊相關的技能,也因為本身對這方面很有興趣,8月初決定自學程式語言,搜尋了許多資料,決定以外行者最好入門的Python開始。
之前看到有前輩建議自學者可以寫部落格,記錄自己的學習過程以及解決問題的過程,當時還沒有實踐,但一個月後發現,很多學過的語法沒有複習或是應用,真的很容易遺忘,或是遇到相同問題又再次卡關之類的,於是這個部落格就誕生了,雖然不知道能持續多久,但希望自己的自學之路能因此更加順遂有動力。