第10步:更改循环内部的指令以适应程序。

    • 将变量的名称更改为 code_word
    • 将要添加的变量名称更改为 value

    这个循环将列表中的每个字母添加在一起,并将它们作为字符串存储在变量 code_word 中。

    如果我们将 "hello" 赋予函数,code_word 现在将存储值:"ellohay"

    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)