第4步:让精灵说出用户输入的名字。

  • 中,将 Say拖出,删除文本及引号。
  • 在.say() 指令的括号中输入变量 user_name
  • 运行 程序,看看你的精灵是否说出你在问题提示中输入的名字。
  • 由于精灵所说的取决用户输入,所以我们在 say 指令中使用一个变量。

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)