第 13 步:使用我们函数中的信息,让我们使用逻辑来确定我们的动物是否是爬行动物。

不翻转布尔值。例如, not True变为False并且not False变为True 。

  • 从,将if and内部拖动到classify_animal()的底部。
  • choice1 == "yes"更改为has_scales , choice2 == "no"更改为not eggs_in_water 。
  • 最后,在,拖动 if 语句内缩进的String Variable 。

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)