返回列表 發帖

變數宣告與基本輸出 (二)

  1. age,name=18,"Tony"
  2. print("我叫"+name+"今年"+str(age)+"歲!")
複製代碼

  1. age,name=18,"Tony"
  2. print("我叫"+name+"今年"+str(age)+"歲")
複製代碼

TOP

本帖最後由 tonyh 於 2021-1-28 11:50 編輯
  1. age,name=18,"Tony"
  2. print("我叫"+name+"今年"+str(age)+"歲!")
複製代碼

TOP

本帖最後由 tonyh 於 2021-1-28 11:51 編輯
  1. age,name=18,"Tony"
  2. print("我叫"+name+"今年"+str(age)+"歲!")
複製代碼

TOP

  1. age,name=18,"Tony"
  2. print("我叫"+name+"今年"+str(age)+"歲")
  3. print("我叫",name,"今年",age,"歲",sep="")
複製代碼

TOP

  1. age,name=18,"Tony"
  2. print("我叫"+name+"今年"+str(age)+"歲")
複製代碼

TOP

  1. name, age = "eugene", 12
  2. print("我是"+name+"我今年"+str(age)+"歲")
  3. print("我是",name,"我今年",age,"歲",sep="")
複製代碼

TOP

  1. age,name=12,"milu"
  2. print("我叫",name,"今年",age,"歲")
複製代碼

TOP

返回列表