第 7 步:让我们更改字符串,以便我们的精灵说出我们想要的内容!

空格不会自动添加到字符串的开头或结尾!由于我们要在末尾添加一个变量,因此我们需要确保在字符串的最后一个字母之后有一个空格。

  • .say()命令中的字符串更改为"My friend's favorite color is "

    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)