第 6 步:让我们调用该函数,以便我们看到theme设置背景。

我们定义函数时的参数变量theme 。我们调用函数时的参数是参数"moon" 。这次函数运行时, theme将具有值"moon"

  • 在逻辑和添加Function Call with Parameter 。将调用重命名为draw_card()
  • 将函数调用参数从my_var更改为字符串"moon" 。现在该函数设置背景!

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)