10 步:我们已经设置了两个条件!让我们使用新的逻辑运算符检查是否至少有一个为True

如果一侧或两侧为True ,则逻辑运算符or将返回True 。只有False双方都是False

  • 并将if or拖到程序底部。
  • 用变量condition_1替换此代码选择· == · "yes" 。不要删除or
  • or之后,用变量condition_2替换此代码选择· == · "y" 。不要删除冒号!

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)