iT邦幫忙

鐵人檔案

第 12 屆 iThome 鐵人賽
回列表
自我挑戰組

笨方法學python 大家來一起開心學python XD 系列

大家一起學python本篇文章將從(Learn Python 2 the Hard Way: A Very Simple Introduction to the Terrifyingly Beautiful World of Computers and Code)內抽取主題來慢慢自我挑戰30天。

參賽天數 0 天 | 共 12 篇文章 | 1 人訂閱 訂閱系列文 RSS系列文

Day1:Hello World!

print 'Hello world!' #你就會看到你的第一個程式 Hello world這就是你的第一個python 程式XD 你的第二個python 程...

2021-02-28 ‧ 由 YUYU 分享

Day2:How to use comments,octothorpe and variable in Python

Comment is a very important part in programing Comments can tell you something d...

2021-03-06 ‧ 由 YUYU 分享

Day3:String Formatting 字串格式化

字串格式化有幾種方法 字串 功用 %% 在字串 中顯示% %d 以10 進位整數方式輸出 %f 將浮點 數以10進位方式輸出 %e,...

2021-03-07 ‧ 由 YUYU 分享

Day4:Input 輸入

在Python 2中raw_input( )將所有輸入作為字符串(String)看待,返回字符串類型input( )只接收“數字”的輸入,在對待純數字輸入時具有...

2021-03-08 ‧ 由 YUYU 分享

Day5:def函數

Python定義函式有幾種方法 Class函式 def函式我們今天先介紹def函式。 先來解釋函式(function)是甚麼? 函式(function)就像...

2021-03-09 ‧ 由 YUYU 分享

Day6:class函數

半夜睡不著來更新XD Python屬於「物件導向程式語言」(Object-oriented programming language, OOPL) 那什麼是物...

2021-03-10 ‧ 由 YUYU 分享

Day7:函數返回

我們已經使用過"="給變量命名,今天主要演示的是如何使用"return"來將變量設置成一個函數的值。 [In] def...

2021-03-11 ‧ 由 YUYU 分享

Day8:如果怎樣就怎樣

在講else、elif之前,先來讓我們看看什麼是"if" 程式碼如下: [In] kids=20 snack=100 soda=21 can...

2021-03-13 ‧ 由 YUYU 分享

Day9:串列(list)

串列(list)是一種資料型態(Data type),在串列中的每一個元素都會被分配一個值從"0"開始。 壹、如何建立串列? 把想儲存的元素...

2021-03-16 ‧ 由 YUYU 分享

Day10:串列的循環

在我們有Day9串列的基礎之後,讓我們來試試看這些程式碼吧! [In] drinks=['cola','water','juice'] fruit=['appl...

2021-03-17 ‧ 由 YUYU 分享