第 7 步:我们希望矩形使用rectangle_area以便它始终表示正确的区域。

我们仍然需要使用str()因为rectangle_area是一个整数变量,所以我们不能只将它添加到字符串中。

  • .say()命令中,将str()内部的8更改为rectangle_area
  • say 命令的末尾应该有两个)) 。一个用于str() ,另一个用于.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)