第2步:编写精灵让它可以向用户自我介绍。

  • 中,拖出 Say。 将绿色文本更改为"Hi! I'm Alex!"
  • 中,拖出 Wait

say指令中的绿色文本是一个字符串。在Python中,字符串是前后有引号的任何字母、单词或句子。在Codesters中,字符串总显示为绿色"This is a string."

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)