第 7 步:让我们添加另一个函数参数,这样我们就可以自定义更多内容,而不仅仅是背景!

  • 在代码编辑器中找到函数定义def · draw_card( theme )¬
  • theme之后,添加一个逗号,后跟color 。这是一个新的函数参数变量。
  • 在代码编辑器中找到函数调用draw_card( "moon" )
  • "moon"之后,添加一个逗号,后跟字符串"aqua" 。这将是函数内部color的值!

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)