<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>pytho筆記 by 606-15-王昱智</title>
      <link>https://padlet.com/leo0227/k5tfk5jhj58aagre</link>
      <description></description>
      <language>en-us</language>
      <pubDate>2024-06-02 14:26:25 UTC</pubDate>
      <lastBuildDate>2024-06-02 14:47:16 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title>1</title>
         <author>leo0227</author>
         <link>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015436816</link>
         <description><![CDATA[<div><br><br>變量和數據類型<br><br>在 Python 中，可以輕鬆地定義和使用不同類型的變量，如整數、浮點數、字符串和布爾值：<br><br># 整數<br>a = 10<br><br># 浮點數<br>b = 20.5<br><br># 字符串<br>c = "Hello, World!"<br><br># 布爾值<br>d = True<br><br>注意要點：<br><br>&nbsp;• 變量名稱區分大小寫（如 a 和 A 是不同的變量）。<br>&nbsp;• 使用有意義的變量名稱有助於提高代碼的可讀性。<br><br><br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2024-06-02 14:29:35 UTC</pubDate>
         <guid>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015436816</guid>
      </item>
      <item>
         <title>2</title>
         <author>leo0227</author>
         <link>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015437508</link>
         <description><![CDATA[<div><br><br>列表<br><br>列表是一種有序的數據結構，可以包含多個元素：<br><br># 定義列表<br>my_list = [1, 2, 3, 4, 5]<br><br># 訪問元素<br>print(my_list[0])&nbsp; # 輸出: 1<br><br># 修改元素<br>my_list[0] = 10<br><br># 添加元素<br>my_list.append(6)<br><br># 刪除元素<br>my_list.remove(4)<br><br># 列表切片<br>print(my_list[1:3])&nbsp; # 輸出: [2, 3]<br><br>注意要點：<br><br>	•	列表是可變的，意味著可以修改其內容。<br>	•	列表的索引從 0 開始。</div>]]></description>
         <enclosure url="" />
         <pubDate>2024-06-02 14:31:02 UTC</pubDate>
         <guid>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015437508</guid>
      </item>
      <item>
         <title>3</title>
         <author>leo0227</author>
         <link>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015438372</link>
         <description><![CDATA[<div><br>字典是一種無序的鍵值對數據結構：<br><br># 定義字典<br>my_dict = {'name': 'Alice', 'age': 25}<br><br># 訪問值<br>print(my_dict['name'])&nbsp; # 輸出: Alice<br><br># 修改值<br>my_dict['age'] = 26<br><br># 添加鍵值對<br>my_dict['city'] = 'New York'<br><br># 刪除鍵值對<br>del my_dict['age']<br><br>注意要點：<br><br>	•	字典的鍵必須是不可變類型，如字符串、數字或元組。<br>	•	字典是無序的，Python 3.7+ 中字典保持插入順序。</div>]]></description>
         <enclosure url="" />
         <pubDate>2024-06-02 14:32:45 UTC</pubDate>
         <guid>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015438372</guid>
      </item>
      <item>
         <title>4</title>
         <author>leo0227</author>
         <link>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015440514</link>
         <description><![CDATA[<div>條件語句<br><br>條件語句用於根據條件執行不同的代碼塊：<br><br>x = 10<br>if x &gt; 0:<br>&nbsp; &nbsp; print("Positive")<br>elif x == 0:<br>&nbsp; &nbsp; print("Zero")<br>else:<br>&nbsp; &nbsp; print("Negative")<br><br>注意要點：<br><br>	•	注意條件語句的縮進，Python 使用縮進來劃分代碼塊。<br>	•	使用 elif 而不是多個 if，提高代碼效率。<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2024-06-02 14:37:21 UTC</pubDate>
         <guid>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015440514</guid>
      </item>
      <item>
         <title>5</title>
         <author>leo0227</author>
         <link>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015440749</link>
         <description><![CDATA[<div>for 循環<br><br>for 循環用於遍歷一個序列（如列表）：<br><br># 使用範圍<br>for i in range(5):<br>&nbsp; &nbsp; print(i)<br><br># 遍歷列表<br>for item in my_list:<br>&nbsp; &nbsp; print(item)<br><br>注意要點：<br><br>	•	range(5) 生成從 0 到 4 的數字。<br>	•	for 循環適用於任何可迭代對象（如列表、元組、字符串等）。<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2024-06-02 14:37:47 UTC</pubDate>
         <guid>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015440749</guid>
      </item>
      <item>
         <title>6</title>
         <author>leo0227</author>
         <link>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015440894</link>
         <description><![CDATA[<div>while 循環<br><br>while 循環在條件為真時重複執行一個代碼塊：<br><br>count = 0<br>while count &lt; 5:<br>&nbsp; &nbsp; print(count)<br>&nbsp; &nbsp; count += 1<br><br>注意要點：<br><br>	•	小心無限循環，確保循環條件最終會變為假。<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2024-06-02 14:38:09 UTC</pubDate>
         <guid>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015440894</guid>
      </item>
      <item>
         <title>7</title>
         <author>leo0227</author>
         <link>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015441016</link>
         <description><![CDATA[<div>函數是可重用的代碼塊，可以使用 def 關鍵字來定義：<br><br># 定義函數<br>def greet(name):<br>&nbsp; &nbsp; return f"Hello, {name}!"<br><br># 調用函數<br>print(greet("Alice"))&nbsp; # 輸出: Hello, Alice!<br><br>注意要點：<br><br>	•	函數名稱應該具有描述性。<br>	•	可以使用默認參數值和關鍵字參數來提高靈活性。</div>]]></description>
         <enclosure url="" />
         <pubDate>2024-06-02 14:38:29 UTC</pubDate>
         <guid>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015441016</guid>
      </item>
      <item>
         <title>8</title>
         <author>leo0227</author>
         <link>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015441202</link>
         <description><![CDATA[<div># 定義類<br>class Dog:<br>&nbsp; &nbsp; def __init__(self, name, age):<br>&nbsp; &nbsp; &nbsp; &nbsp; self.name = name<br>&nbsp; &nbsp; &nbsp; &nbsp; self.age = age<br><br>&nbsp; &nbsp; def bark(self):<br>&nbsp; &nbsp; &nbsp; &nbsp; return "Woof!"<br><br># 創建對象<br>my_dog = Dog("Buddy", 3)<br><br># 訪問屬性和方法<br>print(my_dog.name)&nbsp; # 輸出: Buddy<br>print(my_dog.bark())&nbsp; # 輸出: Woof!<br><br>注意要點：<br><br>	•	__init__ 方法是類的構造函數，用於初始化對象屬性。<br>	•	self 參數用於指代當前對象的實例。<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2024-06-02 14:38:55 UTC</pubDate>
         <guid>https://padlet.com/leo0227/k5tfk5jhj58aagre/wish/3015441202</guid>
      </item>
   </channel>
</rss>
