练习2-1:简单消息 将一条消息赋给变量,并将其打印出来
message = "Every single day is the chance for a new beginning."
print(message)
Every single day is the chance for a new beginning.
练习2-2:多条简单消息 将一条消息赋给变量,并将其打印出来;再将变量的值修改为一条新消息,并将其打印出来。
message = "Every single day is the chance for a new beginning."
print(message)
message = "Fate draws us back together."
print(message)
Every single day is the chance for a new beginning.
Fate draws us back together.
练习2-3:个性化消息 用变量表示一个人的名字,并向其显示一 条消息。显示的消息应非常简单,下面是一个例子。
Hello Eric, would you like to learn some Python today?
name = "Lufei"
print(f"Hello {name},would you like to learn some Python today?")
</