HW#01 Python 環境建立和Hello World

1.https://notebook.google.com/notebook/e969fd97-8039-4740-a5cc-7299375429b1

2.



3.學習卡
    測驗











4.

1. 程式碼範例

Python
# 1. 設定兩個數字變數
num1 = 6
num2 = 7

# 2. 計算相乘結果
result = num1 * num2

# 3. 印出結果
print(f"{num1} 乘以 {num2} 的結果是:{result}")

2. 程式重點解析

  • 變數與運算:num1 = 6 和 num2 = 7 分別設定了兩個整數變數。接著用 * 符號將它們相乘,並把答案存進新的變數 result 裡面。

  • f-string 格式化字串: 在 print() 裡面使用了 f"...",可以把 {num1}、{num2} 和 {result} 直接嵌入文字中,讓輸出結果變得非常清楚易讀。

3. 執行後的畫面

如果執行這段程式,螢幕上就會印出:

Plaintext
6 乘以 7 的結果是:42

kaggle learn python

5.執行畫面




6.使用心得

kaggle learn python在使用上無難度,很容易查詢到來自世界各地的大量數據及資料,能夠參考更加多元的想法。

留言